[Android] jni: add LibVLC.removeIndex

Edward Wang git at videolan.org
Sun Jul 21 20:15:52 CEST 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Jul  4 21:42:31 2013 -0400| [5c55c81cafd80bfd523aa7fe718ef0d839aeb297] | committer: Edward Wang

jni: add LibVLC.removeIndex

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

 vlc-android/jni/libvlcjni.c                     |    6 +++++-
 vlc-android/src/org/videolan/libvlc/LibVLC.java |    6 ++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 6dbf2db..e13cba5 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * libvlcjni.c
  *****************************************************************************
- * Copyright © 2010-2012 VLC authors and VideoLAN
+ * Copyright © 2010-2013 VLC authors and VideoLAN
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published by
@@ -770,6 +770,10 @@ void Java_org_videolan_libvlc_LibVLC_getMediaListItems(
     libvlc_media_list_unlock( p_mlist );
 }
 
+void Java_org_videolan_libvlc_LibVLC_removeIndex(JNIEnv *env, jobject thiz, jlong instance, jint position) {
+    libvlc_media_list_remove_index((libvlc_media_list_t*)(intptr_t)instance, position);
+}
+
 jfloat Java_org_videolan_libvlc_LibVLC_getRate(JNIEnv *env, jobject thiz) {
     libvlc_media_player_t* mp = getMediaPlayer(env, thiz);
     if(mp)
diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index a8bd9ff..ea9ccf1 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -397,6 +397,12 @@ public class LibVLC {
         return mIsBufferingLog;
     }
 
+    /** Media list functions **/
+    public void removeIndex(int position) {
+        removeIndex(mMediaListInstance, position);
+    }
+    private native void removeIndex(long media_list_instance, int position);
+
     /**
      * Read a media
      * @param instance: the instance of libVLC



More information about the Android mailing list