[Android] [PATCH 1/2] events: add type of track changed for libvlc_MediaPlayerES* events
Thomas Guillem
thomas at gllm.fr
Wed Mar 18 18:58:17 CET 2015
---
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 */
--
2.1.3
More information about the Android
mailing list