Presumably you mean in the same Java application? Not easily. You'd probably have to muck about with Java class loaders and JNA library settings. Just use 1.1!1.) Is it possible to have more than one version of VLCJ? For example, if someone has VLC 1.0.6 installed and another VLC 1.1 that the software still works.
You need to realise the Java bindings are simply calling the underlying libvlc API. When you call getTime() on the Java bindings, you are simply calling the libvlc get_time() function. What you're seeing returned is whatever libvlc is returning at the time you called it.2.) I found an issue regarding the time returned by VLCJ: my program needs to be updated every 100ms which is done by a thread. This thread retrieves the current playtime and displays it. JMF returned nearly always 100ms steps but VLCJ sometimes returns twice 0.167 and then the next higher time is 0.384 or something like that. Does somebody know how to tell VLCJ to return always 100ms steps without skipping some times or is it not possible? I cannot go to seconds level because I need to be more granular in case of time.
This was never a great implementation because it simply uses the AWT Robot class to do a partial screen capture - that explains why it doesn't work if something else is overlaying it. You could make sure you do window.toFront() before you invoke the method.But now I have found another issue regarding the function getVideoSurfaceContents(): it does not return the video surface like in 1.0.3 instead I get a black surface (because I have initialized it black) and if a window is overlaying this part will now be taken as surface but the video itself not.
Use the other snapshot function, e.g. mediaPlayer.getShapshot(). This calls the native libvlc snapshot function with a temporary file name, and then it loads that file as a BufferedImage and deletes the temporary file.How could I else get the currently displayed frame.
That's not a Java bindings issue, these are options you pass to libvlc, I can't remember what they are however.And another question: how could I remove the filename displayed within the video when I start to play it?
Code: Select all
--no-osd
--no-video-title-show
--no-overlay
Setting the plugin path should not be needed. That is to say, LibVLC is supposed to scan for plugins inside the directory from where it was loaded. For instance /usr/lib/libvlc.so will load plugins from /usr/lib/vlc/plugins/. This is supposed to work on Linux and Windows. On BSD and Solaris, the path will be hard-coded at compilation time (which should be OK on those platforms anyway). On MacOS X, there is some autodetection, though I don't know if it depends on the VLCKit.yeah. as it turns out i had a relative path to the plugins directory in my code, replaced it with the full path and it all works now.Aren't those type of errors usually because of the plugin-path setting being missing?edit: okay recompiling the drivers was gonna be more effort than it was worth, i have however installed a 32-bit JDK and run the application in that and it seems to work although i get 'no access module matched "any"' errors. back to the drawing board...
Thanks to a vlcj user contribution we now have this working in the vlcj Java bindings. It's pretty experimental right now and the API will surely change, but if any vlcj users want to try it out (I've had a few people asking me about whether this was possible in Java) then check out the latest code from the vlcj googlecode project and have a look. Any feedback on how this functionality should be presented and used in the vlcj API would be welcome.libvlc_video_set_callbacks() and libvlc_video_set_format() allow grabbing video frames from a chosen memory location in real-time
I always reply to my email, so I must not have received anything from you.Ok I recasted the mediaPlayer object to WindowsEmbeddedMediaPlayer for the setVideoSurface() and can compile. Bad news is when creating the instance of vlc the code now hangs as if the creation is taking forever. This is new since I upgraded to vlcj 1.1.1. I will let you know what I find. Please update your test code because you might run into the same issues I am.
Thanks,
-Tony
Well, I do say to use the specific type of media player the factory returns rather than the base-class. I accept I could have been clearer though.Okay I read your comments about 1.1.0 to 1.1.1 but no mention of the issue regarding setVideoSurface() and recasting to use it. Not that I expected details but that is why I looked at the test case examples and frowned and left this message.
Is this in your own application or with my test player? Because my test player was definitely broken in that release (hard-coded plugin path), but I've fixed it now.I need to focus back on the issue of creating a vlc instance taking forever next.
Sorry I missed this message the first time.Hi Sherington,
It was only one issue so far with a small change it's I am just not sure you intended that to happen with the setVideoSurface since that means the users of the vlcj api now have to add a reference to a particular OS which I think you were trying to avoid? I will add code changes to accomidate different OS's now for just that one method. I will check the web site for anything else I might have missed.
What is the purpose of using a LOG instance of libvlc? Is that the default now for the instance? I have not included log4j with my deployment so commented out all the log statements and used the old non-logging instance of libvlc. Will that be an issue with 1.1.1 vlcj? I will look into adding log4j any vendor and specific version I need to deploy? There seem to be multiple sources for log4j.
Thanks,
-Tony
For the log output did you try the usual "-vvv" libvlc args?I will see how to setup debug mode since I think you set it up to return all messages that are sent to the message window in vlc? That would be usefull if I can get those messages.
Do you have any remaining issues with the latest vlcj?I did fix the remaining issue (around 5:00AM my time) where I was playing youtube videos with my app. So now I can play them again using 1.1.2 nightly.
Code: Select all
JSplitPane splitPane = new JSplitPane();
splitPane.setLeftComponent(videoSurface);
splitPane.setRightComponent(new JButton("Other thing"));
mainFrame.add(splitPane, BorderLayout.CENTER);
Code: Select all
mainFrame.setLayout(new BorderLayout());
mainFrame.setBackground(Color.black);
JSplitPane splitPane = new JSplitPane();
splitPane.setLeftComponent(videoSurface);
splitPane.setRightComponent(new JButton("Other thing"));
mainFrame.add(splitPane, BorderLayout.CENTER);
mainFrame.add(controlsPanel, BorderLayout.SOUTH);
mainFrame.add(videoAdjustPanel, BorderLayout.EAST);
A couple of things working in isolation or together may be causing this...I have a problem with the videoSurface and JSplitPane in my program. I can enlarge the videoSurface but can't shirk it.
Return to “Development around libVLC”
Users browsing this forum: No registered users and 11 guests