[vlc-devel] commit: Extra info about compiler and revision name added binded from libvlc ( Filippo Carone )

git version control git at videolan.org
Sat Jul 19 11:58:57 CEST 2008


vlc | branch: master | Filippo Carone <littlejohn at videolan.org> | Sat Jul 19 12:00:24 2008 +0200| [347cc8cc494f02050c3c1685fa35825e257c5a5d]

Extra info about compiler and revision name added binded from libvlc

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=347cc8cc494f02050c3c1685fa35825e257c5a5d
---

 .../java/org/videolan/jvlc/internal/LibVlc.java    |    6 ++++++
 .../org/videolan/jvlc/internal/LibVlcImpl.java     |   15 +++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
index 037b826..4a6438f 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlc.java
@@ -293,6 +293,12 @@ public interface LibVlc extends Library
     LibVlcInstance libvlc_new(int argc, String[] argv, libvlc_exception_t exception);
 
     void libvlc_release(LibVlcInstance libvlc_instance_t);
+    
+    String libvlc_get_version();
+    
+    String libvlc_get_compiler();
+    
+    String libvlc_get_changeset();
 
     // video
 
diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
index 5a163f5..93506e6 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/internal/LibVlcImpl.java
@@ -26,7 +26,6 @@
 package org.videolan.jvlc.internal;
 
 import java.awt.Canvas;
-import java.awt.Component;
 
 import javax.swing.JFrame;
 import javax.swing.JPanel;
@@ -56,14 +55,18 @@ public class LibVlcImpl
         final Object lock = new Object();
 
         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);
 
         LibVlcMediaDescriptor mediaDescriptor = libVlc
             .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()
         {
@@ -115,9 +118,9 @@ public class LibVlcImpl
         frame.pack();
         
         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);
     }
 }




More information about the vlc-devel mailing list