[Android] LibVLC: add EsChangedId to ES events
Thomas Guillem
git at videolan.org
Fri Mar 31 15:31:46 CEST 2017
vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 31 11:09:48 2017 +0200| [a1775f6b81fdba5b20d7f57a14b26d9da9f6ccf8] | committer: Thomas Guillem
LibVLC: add EsChangedId to ES events
> https://code.videolan.org/videolan/vlc-android/commit/a1775f6b81fdba5b20d7f57a14b26d9da9f6ccf8
---
libvlc/jni/libvlcjni-mediaplayer.c | 1 +
libvlc/src/org/videolan/libvlc/MediaPlayer.java | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/libvlc/jni/libvlcjni-mediaplayer.c b/libvlc/jni/libvlcjni-mediaplayer.c
index 161f760..628f7de 100644
--- a/libvlc/jni/libvlcjni-mediaplayer.c
+++ b/libvlc/jni/libvlcjni-mediaplayer.c
@@ -92,6 +92,7 @@ MediaPlayer_event_cb(vlcjni_object *p_obj, const libvlc_event_t *p_ev,
case libvlc_MediaPlayerESAdded:
case libvlc_MediaPlayerESDeleted:
p_java_event->arg1 = p_ev->u.media_player_es_changed.i_type;
+ p_java_event->arg2 = p_ev->u.media_player_es_changed.i_id;
break;
case libvlc_MediaPlayerSeekableChanged:
p_java_event->arg1 = p_ev->u.media_player_seekable_changed.new_seekable;
diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index da415a6..6c81e10 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -96,6 +96,9 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
public int getEsChangedType() {
return (int) arg1;
}
+ public int getEsChangedID() {
+ return (int) arg2;
+ }
public boolean getPausable() {
return arg1 != 0;
}
@@ -1106,6 +1109,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
return new Event(eventType, arg1);
case Event.ESAdded:
case Event.ESDeleted:
+ return new Event(eventType, arg1, arg2);
case Event.SeekableChanged:
case Event.PausableChanged:
return new Event(eventType, arg1);
More information about the Android
mailing list