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

Extra info about compiler and revision name added binded from libvlc

parent a3b88389
...@@ -294,6 +294,12 @@ public interface LibVlc extends Library ...@@ -294,6 +294,12 @@ public interface LibVlc extends Library
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
void libvlc_video_set_parent(LibVlcInstance libvlc_instance, long drawable, libvlc_exception_t exception); void libvlc_video_set_parent(LibVlcInstance libvlc_instance, long drawable, libvlc_exception_t exception);
......
...@@ -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()
{ {
...@@ -116,8 +119,8 @@ public class LibVlcImpl ...@@ -116,8 +119,8 @@ public class LibVlcImpl
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(mediaPlayer, exception);
libVlc.libvlc_media_player_play(mediaInstance, 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