[Android] LibVLC: Media: Update API

Thomas Guillem git at videolan.org
Tue May 24 11:41:46 CEST 2016


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue May 24 11:33:17 2016 +0200| [edeb35dd33c607129ef8bbdc214be9185fe57e11] | committer: Thomas Guillem

LibVLC: Media: Update API

ParsedStatus and ParsedChanged are now merged

> https://code.videolan.org/videolan/vlc-android/commit/edeb35dd33c607129ef8bbdc214be9185fe57e11
---

 libvlc/jni/libvlcjni-media.c              | 9 ++++-----
 libvlc/src/org/videolan/libvlc/Media.java | 4 ----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/libvlc/jni/libvlcjni-media.c b/libvlc/jni/libvlcjni-media.c
index 3f7ab06..aa107b1 100644
--- a/libvlc/jni/libvlcjni-media.c
+++ b/libvlc/jni/libvlcjni-media.c
@@ -39,7 +39,6 @@ static const libvlc_event_type_t m_events[] = {
     libvlc_MediaDurationChanged,
     libvlc_MediaStateChanged,
     libvlc_MediaParsedChanged,
-    libvlc_MediaParsedStatus,
     libvlc_MediaSubItemTreeAdded,
     -1,
 };
@@ -53,9 +52,9 @@ Media_event_cb(vlcjni_object *p_obj, const libvlc_event_t *p_ev,
 
     pthread_mutex_lock(&p_sys->lock);
 
-    if (p_ev->type == libvlc_MediaParsedStatus)
+    if (p_ev->type == libvlc_MediaParsedChanged)
     {
-        /* no need to send libvlc_MediaParsedStatus when parsing is synchronous */
+        /* no need to send libvlc_MediaParsedChanged when parsing is synchronous */
         if (p_sys->b_parsing_sync)
             b_dispatch = false;
 
@@ -89,8 +88,8 @@ Media_event_cb(vlcjni_object *p_obj, const libvlc_event_t *p_ev,
             break;
         case libvlc_MediaStateChanged:
             p_java_event->arg1 = p_ev->u.media_state_changed.new_state;
-        case libvlc_MediaParsedStatus:
-            p_java_event->arg1 = p_ev->u.media_parsed_status.new_status;
+        case libvlc_MediaParsedChanged:
+            p_java_event->arg1 = p_ev->u.media_parsed_changed.new_status;
     }
     p_java_event->type = p_ev->type;
     return true;
diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index f277441..90f49b6 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -40,7 +40,6 @@ public class Media extends VLCObject<Media.Event> {
         //public static final int Freed                      = 4;
         public static final int StateChanged = 5;
         public static final int SubItemTreeAdded = 6;
-        public static final int ParsedStatus = 7;
 
         protected Event(int type) {
             super(type);
@@ -415,9 +414,6 @@ public class Media extends VLCObject<Media.Event> {
             break;
         case Event.ParsedChanged:
             postParse();
-            break;
-        case Event.ParsedStatus:
-            postParse();
             return new Event(eventType, arg1);
         case Event.StateChanged:
             mState = -1;



More information about the Android mailing list