[Android] MediaList: add expansion events
Edward Wang
git at videolan.org
Mon Oct 28 23:11:18 CET 2013
vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Mon Oct 28 18:09:54 2013 -0400| [7ffa4ce969b807b499e0cf6a11041ac25920ddda] | committer: Edward Wang
MediaList: add expansion events
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7ffa4ce969b807b499e0cf6a11041ac25920ddda
---
vlc-android/src/org/videolan/libvlc/EventHandler.java | 3 +++
vlc-android/src/org/videolan/libvlc/MediaList.java | 2 ++
2 files changed, 5 insertions(+)
diff --git a/vlc-android/src/org/videolan/libvlc/EventHandler.java b/vlc-android/src/org/videolan/libvlc/EventHandler.java
index a1b8cd3..82d8e7a 100644
--- a/vlc-android/src/org/videolan/libvlc/EventHandler.java
+++ b/vlc-android/src/org/videolan/libvlc/EventHandler.java
@@ -88,6 +88,9 @@ public class EventHandler {
//public static final int VlmMediaInstanceStatusEnd = 0x609;
//public static final int VlmMediaInstanceStatusError = 0x60a;
+ public static final int CustomMediaListExpanding = 0x2000;
+ public static final int CustomMediaListExpandingEnd = 0x2001;
+
private ArrayList<Handler> mEventHandler;
private static EventHandler mInstance;
diff --git a/vlc-android/src/org/videolan/libvlc/MediaList.java b/vlc-android/src/org/videolan/libvlc/MediaList.java
index 07fee5c..8c5b58f 100644
--- a/vlc-android/src/org/videolan/libvlc/MediaList.java
+++ b/vlc-android/src/org/videolan/libvlc/MediaList.java
@@ -95,10 +95,12 @@ public class MediaList {
ArrayList<String> children = new ArrayList<String>();
int ret = expandMedia(mLibVLC, position, children);
if(ret == 0) {
+ mEventHandler.callback(EventHandler.CustomMediaListExpanding, new Bundle());
this.remove(position);
for(String mrl : children) {
this.insert(position, mrl);
}
+ mEventHandler.callback(EventHandler.CustomMediaListExpandingEnd, new Bundle());
}
return ret;
}
More information about the Android
mailing list