JVLC status

This forum is about all development around libVLC.
kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: JVLC status

Postby kryptonite » 28 Aug 2009 15:49

Well, since a Java application works fine, I don't see roadblocks in the applet version.

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: JVLC status

Postby ivoire » 31 Aug 2009 18:38

Why aren't you sending patches to update the jvlc binding inside the vlc source tree ?

Best regards

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: JVLC status

Postby kryptonite » 01 Sep 2009 09:16

My app is quite customized and since it's been a learning process for me, it's not modularized well enough for general use.
Once I get through my project deadline though, I'll try to get it into a shareable format.

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: JVLC status

Postby ivoire » 02 Sep 2009 09:22

That's a good idea. I will try to update the JVLC binding on my own but I'm not really confident with java so it might take a while, so patches are really welcome :D

JeffM-35
New Cone
New Cone
Posts: 4
Joined: 13 Dec 2007 15:08

Re: JVLC status

Postby JeffM-35 » 16 Sep 2009 20:19

Hi,

I finally got around to bundling up my own Java bindings that have been discussed in this forum topic.

I hope it's ok to post external links here, it's a GPL project in keeping with VLC and the original JVLC bindings.

http://code.google.com/p/vlcj/
...
...
I hope someone finds it useful.
Thanks Sherington - you really save me hours getting my project started. Useful and then some. Awesome.

Anyone else looking to grab and go in Win environment, YOU MUST:

Code: Select all

public class TestPlayer { private static final String[] ARGS = {"--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins"};
or it will not work!
thanks again

ramsestom
New Cone
New Cone
Posts: 3
Joined: 21 Sep 2009 22:59

Re: JVLC status

Postby ramsestom » 21 Sep 2009 23:20

I'm experiencing a problem with the exemple class (TestPlayer.java) under Windows XP.
It throw me the following code:

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Le module spécifié est introuvable. at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:160) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:228) at com.sun.jna.Library$Handler.<init>(Library.java:140) at com.sun.jna.Native.loadLibrary(Native.java:372) at com.sun.jna.Native.loadLibrary(Native.java:357) at uk.co.caprica.vlcj.binding.LibVlc.<clinit>(LibVlc.java:52) at uk.co.caprica.vlcj.MediaPlayer.<init>(MediaPlayer.java:49) at uk.co.caprica.vlcj.test.TestPlayer.main(TestPlayer.java:59)
I've tried different path for the libvlc module:

Code: Select all

private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC"}
or

Code: Select all

private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins"}
which are path to the latest vlc release (VLC 1.0.1) installed on my computer

I've also tried with:

Code: Select all

private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC_0.9.9"}
or

Code: Select all

private static final String[] ARGS = { "--plugin-path=C:\\Program Files\\VideoLAN\\VLC_0.9.9\\plugins"}
which refer to an install of vlc previous release (VLC 0.9.9)

But nothing works! :(

Any idear about the origin of my problem would be higly appreciated...

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: JVLC status

Postby kryptonite » 22 Sep 2009 09:17

It's failing while loading the libvlc dll itself, changing plugin-path value might not help.

Before the call to

Code: Select all

Native.loadLibrary()
try adding:

Code: Select all

NativeLibrary.addSearchPath("libvlc", "C:\\Program Files\\VideoLAN\\VLC");

antpk
New Cone
New Cone
Posts: 1
Joined: 24 Sep 2009 15:02

Re: JVLC status

Postby antpk » 25 Sep 2009 15:29

Hi all,

Just wanted to say a big thank you to sherington for his work on vlcj. I have it working in windows with no fuss. What I'm stuck with is Mac OSX.

I originally had Leopard but had modified quite a bit so was looking at a fresh install.

I did a clean installed Snow Leopard and installed netbeans etc. I managed to get it working but only for a few frames of video before the program quits.

Here is the normal log.

Code: Select all

Playing Fontconfig error: Cannot load default config file Invalid memory access of location 0x20 rip=0x127f3ae64 Java Result: 139
I did have a look at the longer log but the only things that jump at me were the Fontconfig error and the invalid memory access. I really only changed this below:

Code: Select all

private static final String[] ARGS = {//"-vvv", "--ignore-config", "-I dummy", "-V opengl", "--plugin-path=/Applications/VLC.app/Contents/MacOS/modules/"};
the odd thing is if i set -V to dummy. It will play the video file no problem but as its the dummy video output module it wont show anything up on screen.

Any ideas?

antpk

ramsestom
New Cone
New Cone
Posts: 3
Joined: 21 Sep 2009 22:59

Re: JVLC status

Postby ramsestom » 27 Sep 2009 14:55

I encounter a problem when using vlcj with media having path with accentuated characters.
For exemple, If I try:

Code: Select all

mediaPlayer.playMedia("C:\\Documents and Settings\\Tom\\workspace\\VODPlayer\\TMP\\PLAYBUFFER\\karaoké Bouba karaoke.mp4");
VLC report the folowing error:

Code: Select all

[0x5ab2a7c] main input debug: Creating an input for 'karaok Bouba karaoke.mp4' [0x5ab2a7c] main input debug: thread (input) created at priority 1 (../.././src/input/input.c:230) [0x5ab2a7c] main input debug: thread started [0x5ab2a7c] main input debug: using timeshift granularity of 50 MBytes [0x5ab2a7c] main input debug: using timeshift path 'C:\DOCUME~1\Tom\LOCALS~1\Temp' [0x5ab2a7c] main input debug: `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' gives access `' demux `' path `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' [0x5ab2a7c] main input debug: creating demux: access='' demux='' path='C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' [0x5abc60c] main demux debug: looking for access_demux module: 3 candidates libdvdread: Using libdvdcss version 1.2.10 for DVD access libdvdread: Could not open C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 with libdvdcss. libdvdread: Can't open C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 for reading [0x5abc60c] dvdnav demux warning: cannot open dvdnav [0x5abc60c] main demux debug: TIMER module_need() : 49.734 ms - Total 49.734 ms / 1 intvls (Avg 49.734 ms) [0x5ab2a7c] main input debug: creating access '' path='C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' [0x5abcd64] main access debug: looking for access module: 4 candidates [0x5abcd64] access_file access debug: opening file `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' [0x5abcd64] access_file access error: cannot open file C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 (No such file or directory) [0x5abcd64] main access error: File reading failed [0x5abcd64] main access error: VLC could not open the file "C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4". [0x5abcd64] cdda access debug: trying .cue file: C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.cue [0x5abcd64] cdda access debug: could not find .cue file [0x5abcd64] cdda access warning: could not open C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4 [0x5abcd64] main access debug: TIMER module_need() : 13.490 ms - Total 13.490 ms / 1 intvls (Avg 13.490 ms) [0x5ab2a7c] main input error: open of `C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4' failed: no suitable access module [0x5ab2a7c] main input error: Your input can't be opened [0x5ab2a7c] main input error: VLC is unable to open the MRL 'C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaok Bouba karaoke.mp4'. Check the log for details. [0x5ab2a7c] main input debug: thread ended
As you can see, in the path returned by vlc, the "é" character of "karaoké" has been removed, wich explains that file could not be found

I first suspect a problem linked to jna while transcoding java String object to C char* object but trying a realy simple java code:

Code: Select all

public class HelloWorld { // This is the standard, stable way of mapping, which supports extensive // customization and mapping of Java to native types. public interface CLibrary extends Library { CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class); void printf(String format, Object... args); } public static void main(String[] args) { CLibrary.INSTANCE.printf("C:\\Documents and Settings\\Tom\\workspace\\VODPlayer\\TMP\\PLAYBUFFER\\karaoké Bouba karaoke.mp4"); } }
the result is just fine as it prints: C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaoké Bouba karaoke.mp4

So the problem seems to occur at the vlc level. However, runing "vlc.exe C:\Documents and Settings\Tom\workspace\VODPlayer\TMP\PLAYBUFFER\karaoké Bouba karaoke.mp4" in a dos command prompt console is working. So I did not really understand why going through libvlc causes problem. If anybody has an idear...

PS: I've also tryed the "-http-charset=ISO-8859-1" in the vlc arguments line and it do not solve the problem :(

jrsyboy_86
New Cone
New Cone
Posts: 1
Joined: 01 Oct 2009 19:38

Re: JVLC status

Postby jrsyboy_86 » 05 Oct 2009 18:10

Has anyone been able to implement a JSlider to search thru the video without using the deprecated Playlist class?

akuired
New Cone
New Cone
Posts: 3
Joined: 22 Aug 2009 12:28

Re: JVLC status

Postby akuired » 05 Oct 2009 19:47

Hello, I am working on a project using JVLC. Everything goes fine (thanks to sherington), but I am unable to set the correct canvas size. I need to know how to retrieve video height and width. I have tried to use "libvlc_video_get_height/width" but it always returns 0 saying "No active video output". However the RTP stream is playing and I can see it.

How can I retrieve video dimensions to make the canvas with the correct size?

Thank you very much for your help.

feil
New Cone
New Cone
Posts: 1
Joined: 07 Oct 2009 11:39

Re: JVLC status

Postby feil » 07 Oct 2009 12:14

I also encountered this problem
I have tried to use libvlc_video_get_width/height(m_libvlc_media_player, &ex) it always returns 0

Who can help me?
Thank you very much for your help!

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 09 Oct 2009 18:12

I have tried to use "libvlc_video_get_height/width" but it always returns 0 saying "No active video output". However the RTP stream is playing and I can see it.

How can I retrieve video dimensions to make the canvas with the correct size?
This is a timing issue.

What I have observed is this...

Inside libvlc the listener fires the "playing" event.
If you immediately try and invoke video_get_width you get the error you quoted.
You need to wait a bit longer then invoke video_get_width.

As a curiosity, since I don't really use libvlc anymore, I changed my vlcj project as an experiment thus:

1. In the MediaPlayer class instance creation, kick off a new thread.
2. The new thread has a for loop that loops forever.
3. The thread sleeps for one second.
4. The thread invokes has_vout.
5. If has_vout returns zero, go back to #3.
6. If has_vout returns non-zero, invoke video_get_width, video_get_height, invoke listeners with a new "meta data available" event and exit the thread

This approach does indeed work.

In short, if after you receive a "playing" event you create a thread loop that sleeps every Xms and invokes has_vout, eventually (very quickly actually) it will return non-zero and then you can invoke get_width/get_height.

It would be a lot easier if the "playing" event was generated _after_ the video output was guaranteed to be available.

What I have learned is that the threading and synchronisation code required on the Java side to integrate properly with libvlc can be very intricate and hard to get a full grasp of, and even though I made best efforts with my own vlcj project, I can not guarantee that there are no thread dead-locks or subtle races. I certainly don't recommend trying to re-use the MediaPlayer instance for example.

Hope that helps you solve your problem.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 09 Oct 2009 19:49

I should add that in the past I have seen major stability issues when calling has_vout multiple times so I would advise you wait 1000ms or so between calls to minimise the total number of calls you make.

I'm not sure if that's still an issue with my new implementation, but you have been warned!

The googlecode project (see earlier posts) has been updated with what we've just been talking about if anyone is interested.

debillin
New Cone
New Cone
Posts: 1
Joined: 26 Oct 2009 22:22

Re: JVLC status

Postby debillin » 26 Oct 2009 22:31

I am getting the same error ramsestom was getting:

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': The specified module could not be found. at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188) at com.sun.jna.Library$Handler.<init>(Library.java:123) at com.sun.jna.Native.loadLibrary(Native.java:255) at com.sun.jna.Native.loadLibrary(Native.java:241) at uk.co.caprica.vlcj.binding.LibVlc.<clinit>(LibVlc.java:52) at uk.co.caprica.vlcj.MediaPlayer.<init>(MediaPlayer.java:52) at uk.co.caprica.vlcj.test.TestPlayer.main(TestPlayer.java:63)
I am using windows with the latest release of VLC (1.0.2 Goldeneye). I am also using

I saw kryptonite's suggestion to use:
NativeLibrary.addSearchPath("libvlc", "C:\\Program Files\\VideoLAN\\VLC");

but I'm not sure where to add this..

my ARGS are "--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins" which is a valid path.

Any ideas?

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: JVLC status

Postby kryptonite » 27 Oct 2009 08:12

I use the addSearchPath() before creating the libvlc instance.
Also, for your vlc ARGS, try "--plugin-path=C:\\Program Files\\VideoLAN\\VLC" instead of "--plugin-path=C:\\Program Files\\VideoLAN\\VLC\\plugins"

317070
Blank Cone
Blank Cone
Posts: 10
Joined: 21 Feb 2009 23:50

Re: JVLC status

Postby 317070 » 12 Dec 2009 21:03

Well, I tried to move my project to your VLCJ to get rid of that .bat to edit the %path% for the previous JVLC.
So I downloaded the .svn repository to make a build like you suggested. This did not work, and since no information is available on how to do this. I abandoned quickly. I wanted to see if I could even use the one in the dist folder (which for some not-obvious reason is not the most recent version?)

So I tried a minimal approach and wrote this code:

Code: Select all

import java.awt.Canvas; import javax.swing.JFrame; import uk.co.caprica.vlcj.MediaPlayer; public class PlayVLCJVideoFrame extends JFrame{ /** * */ private static final long serialVersionUID = 1L; final private static String DEFAULTPLUGINFOLDER = "C:\\Program Files\\VideoLAN\\VLC"; final private static String DEFLOC = "C:\\Documents and Settings\\Jonas\\Bureaublad\\LyricsCatcher\\Videos\\Rammstein-Nebel[VID].mp4"; public static void main(String[] arguments) throws Exception { PlayVLCJVideoFrame vlc = new PlayVLCJVideoFrame(DEFLOC,true); } public PlayVLCJVideoFrame(String location, boolean sound){ this(location,sound,DEFAULTPLUGINFOLDER); } private static final String[] ARGS = {"--plugin-path=C:\\Program Files\\VideoLAN\\VLC"}; public PlayVLCJVideoFrame(String location, boolean sound, String pluginfolder){ MediaPlayer mediaPlayer = new MediaPlayer(ARGS);//TODO: ARGS? Canvas canvas = new Canvas(); this.add(canvas); mediaPlayer.setVideoSurface(canvas); mediaPlayer.playMedia(location); } }
And All I got was:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Kan opgegeven module niet vinden.

at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:260)
at com.sun.jna.Native.loadLibrary(Native.java:246)
at uk.co.caprica.vlcj.binding.LibVlc.<clinit>(LibVlc.java:52)
at uk.co.caprica.vlcj.MediaPlayer.<init>(MediaPlayer.java:49)
at mp3Player.PlayVLCJVideoFrame.<init>(PlayVLCJVideoFrame.java:23)
at mp3Player.PlayVLCJVideoFrame.<init>(PlayVLCJVideoFrame.java:18)
at mp3Player.PlayVLCJVideoFrame.main(PlayVLCJVideoFrame.java:15)
So my question: is there some mnml-code example which actually works? I have looked on many places, but I can't find any working example code. (http://code.google.com/p/vlcj/source/br ... layer.java didn't seem to help neither)
Or, is there some guidance on how I need to compile the repository? Just Download->Compile doesn't seem to work. Are there project dependencies who need to be set?

I apologise if I sound aggressive, I'm just dissapointed I spend another couple of hours on this VLC-thing without getting any result...

Yours sincerely,

Jnas

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 13 Dec 2009 14:26

Code: Select all

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'libvlc': Kan opgegeven module niet vinden. at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:114) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:157) at com.sun.jna.Library$Handler.<init>(Library.java:123) at com.sun.jna.Native.loadLibrary(Native.java:260) at com.sun.jna.Native.loadLibrary(Native.java:246)
Frankly, it's quite obvious what that error means. The JNA runtime can't find the libvlc.dll file. As to why it can't find it, that is either obvious or it isn't:

https://jna.dev.java.net/#getting_started

See Step #4:
4. Make your target library available to your Java program. There are two ways to do this:

* The preferred method is to set the jna.library.path system property to the path to your target library. This property is similar to java.library.path but only applies to libraries loaded by JNA.
* Change the appropriate library access environment variable before launching the VM. This is PATH on Windows, LD_LIBRARY_PATH on Linux, and DYLD_LIBRARY_PATH on OSX.
If you don't know how to do that, on the command line you use to execute your java program you add -Djna.library.path=/path/to/some/directory, such as

Code: Select all

java -Djna.library.path=c:/progra~1/vlc .....
So my question: is there some mnml-code example which actually works? I have looked on many places, but I can't find any working example code. (http://code.google.com/p/vlcj/source/br ... layer.java didn't seem to help neither)
Or, is there some guidance on how I need to compile the repository? Just Download->Compile doesn't seem to work. Are there project dependencies who need to be set?
Your error seems to be a JNA setup/configuration error.

As to whether it works or not, well it works for me on Linux and apparently it at least worked for JeffM on Windows on this very forum:
viewtopic.php?f=32&t=56939&start=30#p217285

And antpk on Windows:
viewtopic.php?f=32&t=56939&start=30#p218587
I apologise if I sound aggressive, I'm just dissapointed I spend another couple of hours on this VLC-thing without getting any result...
A couple of hours, eh? Count yourself lucky! I wish I could get back all the time I invested in JVLC before throwing the towel in.

Good luck.

317070
Blank Cone
Blank Cone
Posts: 10
Joined: 21 Feb 2009 23:50

Re: JVLC status

Postby 317070 » 23 Dec 2009 01:26

Frankly, it's quite obvious what that error means. The JNA runtime can't find the libvlc.dll file. As to why it can't find it, that is either obvious or it isn't:
That indeed seems to be the problem, but setting the jna.library.path (or any other property for that matter, classpath, library-path,...) didn't seem to help. However, when adding the proper libvlc.dll to the %PATH%-variable of my Windows XP, everything just works great... :(

Is there someone who knows who to set this up in XP? Supposing my libvlc.ddl is located in C:\Program Files\VideoLAN\VLC\, what is the exact thing I need to add to my java command.

This: "-Djna.library.path=C:\Program Files\VideoLAN\VLC" doesn't work. It only works when the directory is added to the path-variable... :(

So, what is the exact line I need to add???

Edit: does anyone know what this piece of code does?

Code: Select all

Map options = new HashMap() { { put(Library.OPTION_DLOPEN_GLOBAL, Boolean.TRUE); } };
Since there is no OPTION_DLOPEN_GLOBAL in my Library... :(

kryptonite
Blank Cone
Blank Cone
Posts: 52
Joined: 22 May 2009 12:01

Re: JVLC status

Postby kryptonite » 23 Dec 2009 08:21

I too am working on XP; I didn't need to add anything special to my Windows environment variables.
Just using the VLC option --plugin-path=.......
AND
NativeLibrary.addSearchPath("libvlc", vlcLocnPath); sufficed.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 23 Dec 2009 12:02

This: "-Djna.library.path=C:\Program Files\VideoLAN\VLC" doesn't work. It only works when the directory is added to the path-variable... :(

So, what is the exact line I need to add???
The way JNA works, I believe, on Windows is that it will first check jna.library.path for the dll, then the Windows path-variable as you have discovered.

Since I don't run Windows, I can't test this for you and this might be a load of rubbish, but maybe it's because that path has spaces in it.

Did you also try (note the alternative placement of the quote characters):

Code: Select all

-Djna.library.path="c:\program files\videolan\vlc"
Or:

Code: Select all

-Djna.library.path=c:\progra~1\videolan\vlc
Try in your Java application doing something like this:

Code: Select all

System.out.println(System.getProperty("jna.library.path"));
That might tell you if the property is being set to what you think it should be.
Edit: does anyone know what this piece of code does?

Code: Select all

Map options = new HashMap() { { put(Library.OPTION_DLOPEN_GLOBAL, Boolean.TRUE); } };
Since there is no OPTION_DLOPEN_GLOBAL in my Library... :(
If I remember correctly, someone, perhaps one of the JVLC developers, sent a patch to the JNA project asking to support this option. I don't know if the patch was ever accepted.

In the version of JNA originally used for JVLC, and the version of JNA available for my own bindings, this patch had not been applied to JNA so the library option is not available.

I don't have a link handy, but I'm pretty sure there's something on the JNA mailing lists about this, and why it was needed - it was not a recent post though.

I don't know if you still use my bindings, but I committed some debug code (just for you, even updated the jar file too!) to dump out where I think JNA is looking for the libvlc.dll - again, I can't test on Windows whether that debug is useful to you or not or even is correct, but it might be worth a try.

Or try kryptonite's suggestion of course.

All of the above obviously applies if you're using JVLC too, if you get this working, you can go back to JVLC if it suits you better.

curiousblue
New Cone
New Cone
Posts: 2
Joined: 23 Dec 2009 14:55

Re: JVLC status

Postby curiousblue » 23 Dec 2009 15:03

hi guys,
im not sure if this is an old topic or whatever, if it is i apologise but ive had similar problems over the last few days and thought id share my insight, and see if you guys can clarify.

Basically ive been trying to use the java libvlc bindings as a few people pointed out and following examples and even downloading a precompiled version i could not get it to work, as the jna module could not load libvlc.dll. i went over it with dependancy walker and noticed that although the libvlc dll is 32-bit, all my system dlls are 64-bit as im running 64-bit windows 7. ive just moved my project over to my other desktop running a 32bit windows XP and everything works peachily, so i believe that my problem lies in the fact that my java app is running in a 64 process it cannot load the 32bit dll.

i think my next course of action is gonna be to try and compile the libvlc and libvlccore dlls as i dont think they exist, but im a little out of my depth now so we'll see how it goes. if this is the problem for others ill keep posting my progress.


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...

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 23 Dec 2009 17:40

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...
Aren't those type of errors usually because of the plugin-path setting being missing?

curiousblue
New Cone
New Cone
Posts: 2
Joined: 23 Dec 2009 14:55

Re: JVLC status

Postby curiousblue » 23 Dec 2009 17:55

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...
Aren't those type of errors usually because of the plugin-path setting being missing?
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.

sherington i gotta say thanks for all your info, couldnt have got this far without it.

317070
Blank Cone
Blank Cone
Posts: 10
Joined: 21 Feb 2009 23:50

Re: JVLC status

Postby 317070 » 23 Dec 2009 23:37

Did you also try (note the alternative placement of the quote characters):
There you go, I indeed tried them all (and many more :D). But now at least I knew it had nothing to do with that. I thought jna was a default java library, so one of the things I tried was to reinstall Java. IT IS NOT THE CASE. When I removed my JVLC library, it had some of the JNA files in it!!! Removing JVLC, getting the latest JNA AND EVERYTHING WORKS.

I LOVE YOU GUYS

And to show my gratitude, I will post a short but good tutorial with how to do things to set up a mediaplayer (extended from sheringtons(?) version) in a matter of weeks :D Consider it my goal for 2010...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 4 guests