[Android] LibVLC: remove unused readMedia()

Edward Wang git at videolan.org
Mon Oct 28 04:14:41 CET 2013


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Oct 27 18:16:00 2013 -0400| [802b9c90fb488b9a6c24d03ee69e8f1040e9604d] | committer: Edward Wang

LibVLC: remove unused readMedia()

Relic from the pre-playlist days.

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

 vlc-android/jni/libvlcjni.c                     |   31 -----------------------
 vlc-android/src/org/videolan/libvlc/LibVLC.java |   21 ---------------
 2 files changed, 52 deletions(-)

diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 9aab84b..59f143d 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -375,37 +375,6 @@ static void create_player_and_play(JNIEnv* env, jobject thiz,
     libvlc_media_player_play(mp);
 }
 
-jint Java_org_videolan_libvlc_LibVLC_readMedia(JNIEnv *env, jobject thiz,
-                                            jlong instance, jstring mrl, jboolean novideo)
-{
-    /* Create a new item */
-    libvlc_media_t *m = new_media(instance, env, thiz, mrl, false, novideo);
-    if (!m)
-    {
-        LOGE("readMedia: Could not create the media!");
-        return -1;
-    }
-
-    libvlc_media_list_t* p_mlist = getMediaList(env, thiz);
-
-    libvlc_media_list_lock(p_mlist);
-    if(libvlc_media_list_add_media(p_mlist, m) != 0) {
-        LOGE("readMedia: Could not add to the media list!");
-        libvlc_media_list_unlock(p_mlist);
-        libvlc_media_release(m);
-        return -1;
-    }
-    int position = libvlc_media_list_index_of_item(p_mlist, m);
-    libvlc_media_list_unlock(p_mlist);
-
-    /* No need to keep the media now */
-    libvlc_media_release(m);
-
-    create_player_and_play(env, thiz, instance, position);
-
-    return position;
-}
-
 void Java_org_videolan_libvlc_LibVLC_playIndex(JNIEnv *env, jobject thiz,
                                             jlong instance, int position) {
     create_player_and_play(env, thiz, instance, position);
diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index d427b08..c57b8e4 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -387,18 +387,6 @@ public class LibVLC {
         mAout.release();
     }
 
-    public void readMedia(String mrl) {
-        readMedia(mLibVlcInstance, mrl, false);
-    }
-
-    /**
-     * Read a media.
-     */
-    public int readMedia(String mrl, boolean novideo) {
-        Log.v(TAG, "Reading " + mrl);
-        return readMedia(mLibVlcInstance, mrl, novideo);
-    }
-
     /**
      * Play a media from the media list (playlist)
      *
@@ -468,15 +456,6 @@ public class LibVLC {
     }
 
     /**
-     * Read a media
-     * @param instance: the instance of libVLC
-     * @param mrl: the media mrl
-     * @param novideo: don't enable video decoding for this media
-     * @return the position in the playlist
-     */
-    private native int readMedia(long instance, String mrl, boolean novideo);
-
-    /**
      * Play an index in the native media list (playlist)
      */
     private native void playIndex(long instance, int position);



More information about the Android mailing list