Commit 347cc8cc authored by Filippo Carone's avatar Filippo Carone

Extra info about compiler and revision name added binded from libvlc

parent a3b88389
...@@ -293,6 +293,12 @@ public interface LibVlc extends Library ...@@ -293,6 +293,12 @@ public interface LibVlc extends Library
LibVlcInstance libvlc_new(int argc, String[] argv, libvlc_exception_t exception); LibVlcInstance libvlc_new(int argc, String[] argv, libvlc_exception_t exception);
void libvlc_release(LibVlcInstance libvlc_instance_t); void libvlc_release(LibVlcInstance libvlc_instance_t);
String libvlc_get_version();
String libvlc_get_compiler();
String libvlc_get_changeset();
// video // video
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package org.videolan.jvlc.internal; package org.videolan.jvlc.internal;
import java.awt.Canvas; import java.awt.Canvas;
import java.awt.Component;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
...@@ -56,14 +55,18 @@ public class LibVlcImpl ...@@ -56,14 +55,18 @@ public class LibVlcImpl
final Object lock = new Object(); final Object lock = new Object();
System.out.println("Starting vlc"); System.out.println("Starting vlc");
System.out.println("version: " + libVlc.libvlc_get_version());
System.out.println("changeset: " + libVlc.libvlc_get_changeset());
System.out.println("compiler: " + libVlc.libvlc_get_compiler());
LibVlcInstance libvlc_instance_t = libVlc.libvlc_new(0, new String[] {"/usr/local/bin/vlc"}, exception); LibVlcInstance libvlc_instance_t = libVlc.libvlc_new(0, new String[] {"/usr/local/bin/vlc"}, exception);
LibVlcMediaDescriptor mediaDescriptor = libVlc LibVlcMediaDescriptor mediaDescriptor = libVlc
.libvlc_media_new(libvlc_instance_t, "/home/carone/a.avi", exception); .libvlc_media_new(libvlc_instance_t, "/home/carone/a.avi", exception);
LibVlcMediaInstance mediaInstance = libVlc.libvlc_media_player_new_from_media(mediaDescriptor, exception); LibVlcMediaInstance mediaPlayer = libVlc.libvlc_media_player_new_from_media(mediaDescriptor, exception);
LibVlcEventManager mediaInstanceEventManager = libVlc.libvlc_media_player_event_manager(mediaInstance, exception); LibVlcEventManager mediaInstanceEventManager = libVlc.libvlc_media_player_event_manager(mediaPlayer, exception);
LibVlcCallback played = new LibVlcCallback() LibVlcCallback played = new LibVlcCallback()
{ {
...@@ -115,9 +118,9 @@ public class LibVlcImpl ...@@ -115,9 +118,9 @@ public class LibVlcImpl
frame.pack(); frame.pack();
long drawable = com.sun.jna.Native.getComponentID(canvas); long drawable = com.sun.jna.Native.getComponentID(canvas);
libVlc.libvlc_video_set_parent(libvlc_instance_t, drawable, exception);
libVlc.libvlc_media_player_play(mediaInstance, exception); libVlc.libvlc_media_player_play(mediaPlayer, exception);
libVlc.libvlc_media_player_set_drawable(mediaPlayer, drawable, exception);
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment