[Android] LibVLC: add getTitleCount

Edward Wang git at videolan.org
Mon Jul 7 02:55:41 CEST 2014


vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Jul  6 20:13:21 2014 -0400| [fd76bf4963ef0410d421d2ea57f983e68b0017ef] | committer: Edward Wang

LibVLC: add getTitleCount

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

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

diff --git a/vlc-android/jni/libvlcjni.c b/vlc-android/jni/libvlcjni.c
index 98025b1..821c4f0 100644
--- a/vlc-android/jni/libvlcjni.c
+++ b/vlc-android/jni/libvlcjni.c
@@ -562,3 +562,11 @@ jint Java_org_videolan_libvlc_LibVLC_getChapterCountForTitle(JNIEnv *env, jobjec
         return libvlc_media_player_get_chapter_count_for_title(mp, title);
     return -1;
 }
+
+jint Java_org_videolan_libvlc_LibVLC_getTitleCount(JNIEnv *env, jobject thiz)
+{
+    libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
+    if (mp)
+        return libvlc_media_player_get_title_count(mp);
+    return -1;
+}
diff --git a/vlc-android/src/org/videolan/libvlc/LibVLC.java b/vlc-android/src/org/videolan/libvlc/LibVLC.java
index 9051c4a..ccc6ade 100644
--- a/vlc-android/src/org/videolan/libvlc/LibVLC.java
+++ b/vlc-android/src/org/videolan/libvlc/LibVLC.java
@@ -714,5 +714,6 @@ public class LibVLC {
     public native int getTitle();
     public native void setTitle(int title);
     public native int getChapterCountForTitle(int title);
+    public native int getTitleCount();
 
 }



More information about the Android mailing list