[vlc-devel] commit: Java bindings: added log functions. Removed @Override for java 1. 5 compatibility (Cristian Maglie )

git version control git at videolan.org
Sun Apr 6 17:38:59 CEST 2008


vlc | branch: master | Cristian Maglie <megabug at autistici.org> | Sun Apr  6 17:37:58 2008 +0200| [e8eb613267bc9c9ba537fd99454e01aa14cc2137]

Java bindings: added log functions. Removed @Override for java 1.5 compatibility

Signed-off-by: Filippo Carone <littlejohn at videolan.org>

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

 .../videolan/jvlc/event/MediaInstanceCallback.java |    1 -
 .../java/org/videolan/jvlc/example/VLCExample.java |    5 --
 .../java/org/videolan/jvlc/internal/LibVlc.java    |   47 ++++++++++++++++++++
 .../org/videolan/jvlc/internal/LibVlcImpl.java     |    2 -
 4 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java b/bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java
index 9801338..c9a9c59 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/event/MediaInstanceCallback.java
@@ -49,7 +49,6 @@ public class MediaInstanceCallback implements LibVlcCallback
     /**
      * {@inheritDoc}
      */
-    @Override
     public void callback(libvlc_event_t libvlc_event, Pointer userData)
     {
         if (libvlc_event.type == LibVlcEventType.libvlc_MediaPlayerPlayed.ordinal())
diff --git a/bindings/java/core/src/main/java/org/videolan/jvlc/example/VLCExample.java b/bindings/java/core/src/main/java/org/videolan/jvlc/example/VLCExample.java
index c0597e9..53cac89 100644
--- a/bindings/java/core/src/main/java/org/videolan/jvlc/example/VLCExample.java
+++ b/bindings/java/core/src/main/java/org/videolan/jvlc/example/VLCExample.java
@@ -36,31 +36,26 @@ public class VLCExample
         mediaInstance.addListener(new MediaInstanceListener()
         {
 
-            @Override
             public void endReached(MediaInstance mediaInstance)
             {
                 System.out.println("Media instance end reached. MRL: " + mediaInstance.getMediaDescriptor().getMrl());
             }
 
-            @Override
             public void paused(MediaInstance mediaInstance)
             {
                 System.out.println("Media instance paused. MRL: " + mediaInstance.getMediaDescriptor().getMrl());
             }
 
-            @Override
             public void played(MediaInstance mediaInstance)
             {
                 System.out.println("Media instance played. MRL: " + mediaInstance.getMediaDescriptor().getMrl());
             }
 
-            @Override
             public void positionChanged(MediaInstance mediaInstance)
             {
                 // TODO Auto-generated method stub
             }
 
-            @Override
             public void timeChanged(MediaInstance mediaInstance, long newTime)
             {
                 System.out.println("new time: " + newTime);
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 421b9dc..9fd9f0e 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
@@ -52,6 +52,22 @@ public interface LibVlc extends Library
         public String message;
     }
 
+    public static class libvlc_log_message_t extends Structure
+    {
+
+        public int sizeof_msg; /* sizeof() of message structure, must be filled in by user */
+
+        public int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
+
+        public String psz_type; /* module type */
+
+        public String psz_name; /* module name */
+
+        public String psz_header; /* optional header */
+
+        public String psz_message; /* message */
+    }
+
     public static class libvlc_event_t extends Structure
     {
 
@@ -254,6 +270,14 @@ public interface LibVlc extends Library
     {
     }
 
+    public class LibVlcLog extends PointerType
+    {
+    }
+
+    public class LibVlcLogIterator extends PointerType
+    {
+    }
+
     // exception handling
     void libvlc_exception_init(libvlc_exception_t exception);
 
@@ -521,4 +545,27 @@ public interface LibVlc extends Library
 
     void libvlc_toggle_fullscreen(LibVlcMediaInstance instance, libvlc_exception_t exception);
 
+    // logging
+
+    int libvlc_get_log_verbosity(LibVlcInstance p_instance, libvlc_exception_t p_e);
+
+    void libvlc_set_log_verbosity(LibVlcInstance p_instance, int level, libvlc_exception_t p_e);
+
+    LibVlcLog libvlc_log_open(LibVlcInstance p_instance, libvlc_exception_t p_e);
+
+    void libvlc_log_close(LibVlcLog p_log, libvlc_exception_t p_e);
+
+    int libvlc_log_count(LibVlcLog p_log, libvlc_exception_t p_e);
+
+    void libvlc_log_clear(LibVlcLog p_log, libvlc_exception_t p_e);
+
+    LibVlcLogIterator libvlc_log_get_iterator(LibVlcLog p_log, libvlc_exception_t p_e);
+
+    void libvlc_log_iterator_free(LibVlcLogIterator p_iter, libvlc_exception_t p_e);
+
+    int libvlc_log_iterator_has_next(LibVlcLogIterator p_iter, libvlc_exception_t p_e);
+
+    libvlc_log_message_t libvlc_log_iterator_next(LibVlcLogIterator p_iter, libvlc_log_message_t p_buffer,
+        libvlc_exception_t p_e);
+
 }
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 8df2b59..5a163f5 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
@@ -68,7 +68,6 @@ public class LibVlcImpl
         LibVlcCallback played = new LibVlcCallback()
         {
 
-            @Override
             public void callback(libvlc_event_t libvlc_event_t, Pointer pointer)
             {
                 System.out.println("Playing started.");
@@ -78,7 +77,6 @@ public class LibVlcImpl
         LibVlcCallback endReached = new LibVlcCallback()
         {
 
-            @Override
             public void callback(libvlc_event_t libvlc_event_t, Pointer pointer)
             {
                 synchronized (lock)




More information about the vlc-devel mailing list