[Android] [PATCH 3/4] Listen to MetaData changes

Alexandre Perraud 4leyx4ndre at gmail.com
Mon Nov 24 18:34:23 CET 2014


---
 libvlc/jni/libvlcjni.c                           | 3 ++-
 libvlc/src/org/videolan/libvlc/EventHandler.java | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libvlc/jni/libvlcjni.c b/libvlc/jni/libvlcjni.c
index 3fab373..ccba63c 100644
--- a/libvlc/jni/libvlcjni.c
+++ b/libvlc/jni/libvlcjni.c
@@ -454,7 +454,8 @@ void Java_org_videolan_libvlc_LibVLC_playMRL(JNIEnv *env, jobject thiz, jlong in
     /* Connect the media event manager. */
     libvlc_event_manager_t *ev_media = libvlc_media_event_manager(p_md);
     static const libvlc_event_type_t mp_media_events[] = {
-        libvlc_MediaParsedChanged
+        libvlc_MediaParsedChanged,
+        libvlc_MediaMetaChanged,
     };
     for(int i = 0; i < (sizeof(mp_media_events) / sizeof(*mp_media_events)); i++)
         libvlc_event_attach(ev_media, mp_media_events[i], vlc_event_callback, myVm);
diff --git a/libvlc/src/org/videolan/libvlc/EventHandler.java b/libvlc/src/org/videolan/libvlc/EventHandler.java
index 16a0791..4ec0861 100644
--- a/libvlc/src/org/videolan/libvlc/EventHandler.java
+++ b/libvlc/src/org/videolan/libvlc/EventHandler.java
@@ -32,7 +32,7 @@ public class EventHandler {
      * Be sure to subscribe to events you need in the JNI too.
      */
 
-    //public static final int MediaMetaChanged                = 0;
+    public static final int MediaMetaChanged                  = 0;
     //public static final int MediaSubItemAdded               = 1;
     //public static final int MediaDurationChanged            = 2;
     public static final int MediaParsedChanged                = 3;
-- 
2.1.0



More information about the Android mailing list