[Android] events: add type of track changed for libvlc_MediaPlayerES* events

Thomas Guillem git at videolan.org
Thu Mar 19 09:19:04 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Mar 18 18:48:16 2015 +0100| [2a3573e22163d6b2007a73d4a88c01c82defa696] | committer: Thomas Guillem

events: add type of track changed for libvlc_MediaPlayerES* events

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

 libvlc/jni/libvlcjni.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libvlc/jni/libvlcjni.c b/libvlc/jni/libvlcjni.c
index b6e39e5..e28fae4 100644
--- a/libvlc/jni/libvlcjni.c
+++ b/libvlc/jni/libvlcjni.c
@@ -190,6 +190,11 @@ static void vlc_event_callback(const libvlc_event_t *ev, void *data)
         (*env)->DeleteLocalRef(env, item_uri_value);
         (*env)->DeleteLocalRef(env, item_index);
         free(mrl);
+    } else if(ev->type == libvlc_MediaPlayerESAdded ||
+              ev->type == libvlc_MediaPlayerESDeleted ) {
+        jstring sData = (*env)->NewStringUTF(env, "data");
+        (*env)->CallVoidMethod(env, bundle, putInt, sData, ev->u.media_player_es_changed.i_type);
+        (*env)->DeleteLocalRef(env, sData);
     }
 
     /* Get the object class */



More information about the Android mailing list