Pb with JVLC on MacOSX Leopard

This forum is about all development around libVLC.
nicolas00
New Cone
New Cone
Posts: 2
Joined: 26 Apr 2009 13:48

Pb with JVLC on MacOSX Leopard

Postby nicolas00 » 26 Apr 2009 13:56

Hello all,

First, as mentionned here, there is not much JVLC information on the web. I nevertheless noticed that JVLC is in fact now provided part of the standard VLC source tree which is good.
I try to get it to work on MacOSX Leopard, using standard JDK 1.6.0.

First I had to hack LibVLC.java so that it uses the correct "libvlc.dylib" library name of Mac :

Code: Select all

LibVlc INSTANCE = (LibVlc) Native.loadLibrary( Platform.isWindows() ? "libvlc.dll" : Platform.isMac() ? "libvlc.dylib" : "vlc", LibVlc.class, options);
But still, it does not load, failing on :

Code: Select all

Unable to load library 'libvlc.dylib': dlopen(.../vlc/vlc_install_dir/lib/libvlc.dylib, 1): no suitable image found. Did find: .../vlc/vlc_install_dir/lib/libvlc.dylib: mach-o, but wrong architecture
Googling this error seems to point out that the JDK (and JNA libs) are 64-bits while libvlc is 32-bits. Is that the correct interpretation for this error ?

If so what are the options ?
- Compiling VLC as 64-bits binary (seems to be NOT an option at the moment) ?
- Forcing off-the shelf JNA to load 32-bits libraries (is that even possible) ?
- Using a 32-bit JDK for MacOSX (is there even one) ?
- Building another Java / Vlc binding, maybe using true JNI (will I encounter a similar problem) ?
- Using another method than JVLC to use VLC within Java (which one) ?

Any help would be greatly appreciated.
Thanks !

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Pb with JVLC on MacOSX Leopard

Postby Jean-Baptiste Kempf » 26 Apr 2009 15:00

You should ask on vlc-devel.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

nicolas00
New Cone
New Cone
Posts: 2
Joined: 26 Apr 2009 13:48

Re: Pb with JVLC on MacOSX Leopard

Postby nicolas00 » 26 Apr 2009 16:22

Just to let you know, I confirm that the pb is 32-bit vs. 64-bit.
JDK 1.6 is 64-bit on MacOSX Leopard (1.5 was 32-bit, though).
Same problem arise for simple JNI calls, the dylib has to be 64-bit, and it doesn't seem to be permitted to mix 32-bit and 64-bit archs...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests