Hi, finally got JNA to load libvlc.dylib.
Apparently, I was working with an universal 1.0.X version of vlc. I downloaded the 0.9.10 ppc specific binaries (the arch of my test machine) and pointed jna.library.path to the "lib" folder of this new ppc build. Same for the plugins. The library loading works great. I'm having another problem thou.
With this code:
Code: Select all
...
int i = 0;
String[] params = new String[4];
params[i++] = "--intf=dummy";
params[i++] = "--ignore-config";
params[i++] = "--no-plugins-cache";
params[i++] = "--plugin-path=/Users/linkare/Desktop/testeJVLC/libsvlc/ppc/modules";
JVLC jvlc = new JVLC(params);
MediaDescriptor md = new MediaDescriptor(jvlc, "/Users/linkare/Desktop/testeJVLC/video.mp4");
MediaPlayer mp = new MediaPlayer(md);
mp.play();
...
I get the following error:
[00000001] main libvlc debug: VLC media player - version 0.9.10 Grishenko - (c) 1996-2009 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ../configure '--enable-release' '--with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk'
[00000001] main libvlc debug: translation test: code is "C"
[00000362] macosx opengl error: no MacOS X interface present
2010-01-17 16:16:27.961 java[664:10b] *** _NSAutoreleaseNoPool(): Object 0x1e00b0 of class NSException autoreleased with no pool in place - just leaking
Stack: (0x92ccddac 0x92bfae14 0x92c018c8 0x9122b0d4 0x569c 0x27bc)
2010-01-17 16:16:27.976 java[664:10b] *** _NSAutoreleaseNoPool(): Object 0x1baee0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x92ccddac 0x92bfae14 0x92c04d08 0x91298dc4 0x92ec34ec 0x9122bb50 0x569c 0x27bc)
2010-01-17 16:16:27.978 java[664:10b] *** _NSAutoreleaseNoPool(): Object 0x17fbe0 of class NSCFData autoreleased with no pool in place - just leaking
Stack: (0x92ccddac 0x92bfae14 0x92c0c884 0x92c0c730 0x91298e18 0x92ec34ec 0x9122bb50 0x569c 0x27bc)
2010-01-17 16:16:27.979 java[664:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow'
2010-01-17 16:16:27.981 java[664:10b] Stack: (
2435419376,
2464953580,
2435419136,
2435419192,
2505453724,
2506548816,
2505804680,
2504955668,
2504953412,
2504952320,
143615940,
143619528,
2462062312,
2434969812,
22172,
10172
)
Apparetly, i'm not able to create a native window that JVLC can use the display the video. I get a "macosx opengl error: no MacOS X interface present". Am i'm missing any required library?
If I create my video output window myself (with a Canvas), I can load the first frame into the canvas, but the video doesn't play. I have no sound or video playing, just a still image (sometimes I only get a black canvas). Here's my code:
Code: Select all
int i = 0;
String[] params = new String[4];
params[i++] = "--intf=dummy";
params[i++] = "--ignore-config";
params[i++] = "--no-plugins-cache";
params[i++] = "--plugin-path=/Users/linkare/Desktop/testeJVLC/libsvlc/ppc/modules";
Canvas c = new Canvas();
c.setSize(320, 240);
c.setBackground(Color.BLACK);
JFrame frame = new JFrame();
frame.add(c);
frame.setBackground(Color.DARK_GRAY);
frame.setSize(480, 360);
frame.setVisible(true);
JVLC jvlc = new JVLC(params);
jvlc.setVideoOutput(c);
MediaDescriptor md = new MediaDescriptor(jvlc, "/Users/linkare/Desktop/testeJVLC/video.mp4");
MediaPlayer mp = new MediaPlayer(md);
mp.play();
I get the following output:
[00000001] main libvlc debug: VLC media player - version 0.9.10 Grishenko - (c) 1996-2009 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ../configure '--enable-release' '--with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk'
[00000001] main libvlc debug: translation test: code is "C"
*** LibVLC Exception not handled: (null)
Set a breakpoint in 'libvlc_exception_not_handled' to debug.
I might have to pass more (or maybe less) than the four parameters in the String array when I initialize the JVLC object to be able to display the video on mac, but i don't know which ones. Does anyone have any idea how to solve this?
Thank you.