Commit fbe5350f authored by flx42's avatar flx42
Browse files

LibVLC: provide access to libvlc functions for titles/chapters handling

parent 3c621789
......@@ -539,3 +539,26 @@ jstring Java_org_videolan_libvlc_LibVLC_changeset(JNIEnv* env, jobject thiz)
{
return (*env)->NewStringUTF(env, libvlc_get_changeset());
}
jint Java_org_videolan_libvlc_LibVLC_getTitle(JNIEnv *env, jobject thiz)
{
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
if (mp)
return libvlc_media_player_get_title(mp);
return -1;
}
void Java_org_videolan_libvlc_LibVLC_setTitle(JNIEnv *env, jobject thiz, jint title)
{
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
if (mp)
libvlc_media_player_set_title(mp, title);
}
jint Java_org_videolan_libvlc_LibVLC_getChapterCountForTitle(JNIEnv *env, jobject thiz, jint title)
{
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
if (mp)
return libvlc_media_player_get_chapter_count_for_title(mp, title);
return -1;
}
......@@ -710,4 +710,9 @@ public class LibVLC {
public String getCachePath() {
return mCachePath;
}
public native int getTitle();
public native void setTitle(int title);
public native int getChapterCountForTitle(int title);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment