[Android] MediaPlayer add Opening event

Thomas Guillem git at videolan.org
Fri Jul 10 19:20:35 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jul 10 19:18:35 2015 +0200| [8e6b3639c5876a795ceefcbd51518665c44de6e9] | committer: Thomas Guillem

MediaPlayer add Opening event

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

 libvlc/jni/libvlcjni-mediaplayer.c              |    1 +
 libvlc/src/org/videolan/libvlc/MediaPlayer.java |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libvlc/jni/libvlcjni-mediaplayer.c b/libvlc/jni/libvlcjni-mediaplayer.c
index e27cbc0..817ffcd 100644
--- a/libvlc/jni/libvlcjni-mediaplayer.c
+++ b/libvlc/jni/libvlcjni-mediaplayer.c
@@ -29,6 +29,7 @@ JNIEnv *jni_get_env(const char *name);
 extern JavaVM *libvlc_get_jvm();
 
 static const libvlc_event_type_t mp_events[] = {
+    libvlc_MediaPlayerOpening,
     libvlc_MediaPlayerPlaying,
     libvlc_MediaPlayerPaused,
     libvlc_MediaPlayerStopped,
diff --git a/libvlc/src/org/videolan/libvlc/MediaPlayer.java b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
index 3b10819..778063a 100644
--- a/libvlc/src/org/videolan/libvlc/MediaPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/MediaPlayer.java
@@ -28,7 +28,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
     public static class Event extends VLCEvent {
         //public static final int MediaChanged        = 0x100;
         //public static final int NothingSpecial      = 0x101;
-        //public static final int Opening             = 0x102;
+        public static final int Opening             = 0x102;
         //public static final int Buffering           = 0x103;
         public static final int Playing             = 0x104;
         public static final int Paused              = 0x105;
@@ -778,6 +778,7 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
             case Event.EncounteredError:
                 mVoutCount = 0;
                 notify();
+            case Event.Opening:
             case Event.Playing:
             case Event.Paused:
                 return new Event(eventType);



More information about the Android mailing list