[Android] LibVLC: Media: add getMetaId

Thomas Guillem git at videolan.org
Mon Nov 2 11:38:07 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov  2 11:36:34 2015 +0100| [f12928b04b0b142c21b37fa107d91a51817b2ff4] | committer: Thomas Guillem

LibVLC: Media: add getMetaId

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

 libvlc/src/org/videolan/libvlc/Media.java |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 3a33874..90983af 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -43,6 +43,13 @@ public class Media extends VLCObject<Media.Event> {
         protected Event(int type) {
             super(type);
         }
+        protected Event(int type, long arg1) {
+            super(type, arg1);
+        }
+
+        public int getMetaId() {
+            return (int) arg1;
+        }
     }
 
     public interface EventListener extends VLCEvent.Listener<Media.Event> {}
@@ -355,7 +362,7 @@ public class Media extends VLCObject<Media.Event> {
             int id = (int) arg1;
             if (id >= 0 && id < Meta.MAX)
                 mNativeMetas[id] = null;
-            break;
+            return new Event(eventType, arg1);
         case Event.DurationChanged:
             mDuration = -1;
             break;



More information about the Android mailing list