Adding video at the node

Adding video at the node

Postby ezedinho » Sat Nov 16, 2013 7:22 pm

Am planning to implement a feature to add a video file similarly like add image file at the node...i need a help where to start and how i can start implementing. Also to edit the menu to display word add video in the same menu having add image. Thank you...
ezedinho
 
Posts: 6
Joined: Sat Nov 16, 2013 7:20 pm

Re: Adding video at the node

Postby dpolivaev » Sat Nov 16, 2013 8:11 pm

Look at org.freeplane.view.swing.features.filepreview.ViewerController and how it is used by SVG plug-in freeplane_plugin_svg to add support for SVG images. I think you could do something quite similar.
Exactly the same answer I also posted in thread viewtopic.php?f=2&t=811 asking similar question.

Further information about what IDE you need and how to debug you find in http://freeplane.sourceforge.net/wiki/i ... ory:Coding

Dimitry
User avatar
dpolivaev
Site Admin
 
Posts: 667
Joined: Sat Jul 23, 2011 1:21 pm

Re: Adding video at the node

Postby ezedinho » Mon Nov 18, 2013 3:45 pm

Hello Dimitry and all,
i read that file intensively since yesterday and i understand at least what happened in case of image but still i need some help. In the file ViewController it seems to use BitmapViewerFactory.java and AddExternelImageAction.java with the help of paste function to add image on the specific node. But i fail to figure out how should at least add the "Add Video" link on the menu like "add Image" Also i try to change a video file extension to be (.gif) extension to test if it will display anything i just discover the link to the file captured corectly.
1)So my follow up quetions about this feature should i create new video supporting file like those above supporting image?
2)Since i have a link to a file (uri) can i use JMF libraries to play video on a media like MediaPlayer Bean?

i will be happy if i can get a good solution to implement this feature....
Thank you
Ally :cry:
ezedinho
 
Posts: 6
Joined: Sat Nov 16, 2013 7:20 pm

Re: Adding video at the node

Postby dpolivaev » Mon Nov 18, 2013 10:12 pm

Ally, please give me a couple of days, I shall explain more and better. Regards, Dimitry
User avatar
dpolivaev
Site Admin
 
Posts: 667
Joined: Sat Jul 23, 2011 1:21 pm

Re: Adding video at the node

Postby dpolivaev » Tue Nov 19, 2013 11:03 pm

Basically you should write a new implementation of org.freeplane.view.swing.features.filepreview.IViewerFactory which is a factory which can create a JComponent where some external resource given by its URI can be displayed.
Unfortunately this interface is not documented yet, I shall add the documentation on the weekend. As an example you can look at org.freeplane.plugin.svg.SvgViewerFactory which implements this interface for svg files.
It is registered by
Code: Select all
   final ViewerController extension = (ViewerController) modeController.getExtension(ViewerController.class);   extension.addFactory(new SvgViewerFactory());
from org.freeplane.plugin.svg.Activator.registerMindMapModeExtension(BundleContext)

Sorry I do not have more time right now but I shall come back to your question later this week.
Regards, Dimitry
User avatar
dpolivaev
Site Admin
 
Posts: 667
Joined: Sat Jul 23, 2011 1:21 pm

Re: Adding video at the node

Postby dpolivaev » Wed Nov 20, 2013 9:26 pm

I documented org.freeplane.view.swing.features.filepreview.IViewerFactory in the code (github, branch master or 1.3.x)

So now from now please ask questions if the new docu with SvgViewerFactory as an example and documentation at http://freeplane.sourceforge.net/wiki/i ... evelopment are not sufficient.

Regards, Dimitry
User avatar
dpolivaev
Site Admin
 
Posts: 667
Joined: Sat Jul 23, 2011 1:21 pm

Re: Adding video at the node

Postby ezedinho » Thu Nov 21, 2013 5:45 pm

Hey Dimitry am back again, now i fix a problem of JMF plugin because was not displaying anything rather than control buttons so now am using VLCJ and it seems to work well with video but with the JFrame so my question is...
1) Is it possible to display Jframe on the node because i understand is is possible by using Jpanel...or should i create new IViewerFactory.java with Jframe components instead of JComponents and change ViewerController.java PLEASE ANY HELP....
ezedinho
 
Posts: 6
Joined: Sat Nov 16, 2013 7:20 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron