[Android] [PATCH 1/4] Add a LibVLC_getMeta method
Alexandre Perraud
4leyx4ndre at gmail.com
Mon Nov 24 18:34:21 CET 2014
From: Jean-Baptiste Kempf <jb at videolan.org>
---
libvlc/jni/libvlcjni.c | 13 +++++++++++++
libvlc/src/org/videolan/libvlc/LibVLC.java | 2 ++
2 files changed, 15 insertions(+)
diff --git a/libvlc/jni/libvlcjni.c b/libvlc/jni/libvlcjni.c
index 6b28667..3fab373 100644
--- a/libvlc/jni/libvlcjni.c
+++ b/libvlc/jni/libvlcjni.c
@@ -593,6 +593,19 @@ jstring Java_org_videolan_libvlc_LibVLC_changeset(JNIEnv* env, jobject thiz)
return (*env)->NewStringUTF(env, libvlc_get_changeset());
}
+jstring Java_org_videolan_libvlc_LibVLC_getMeta(JNIEnv *env, jobject thiz, int meta)
+{
+ libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
+ if (!mp)
+ return NULL;
+
+ libvlc_media_t *p_mp = libvlc_media_player_get_media(mp);
+ if (!p_mp)
+ return NULL;
+
+ return (*env)->NewStringUTF(env, libvlc_media_get_meta(p_mp, meta));
+}
+
jint Java_org_videolan_libvlc_LibVLC_getTitle(JNIEnv *env, jobject thiz)
{
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
diff --git a/libvlc/src/org/videolan/libvlc/LibVLC.java b/libvlc/src/org/videolan/libvlc/LibVLC.java
index 5dffb47..7efd1af 100644
--- a/libvlc/src/org/videolan/libvlc/LibVLC.java
+++ b/libvlc/src/org/videolan/libvlc/LibVLC.java
@@ -881,4 +881,6 @@ public class LibVLC {
public native int getTitleCount();
public native void playerNavigate(int navigate);
+ public native String getMeta(int meta);
+
}
--
2.1.0
More information about the Android
mailing list