Commit 43472557 authored by Geoffrey Métais's avatar Geoffrey Métais

Expose getChapterDescription method

parent 1d9eb49c
......@@ -783,6 +783,21 @@ jint Java_org_videolan_libvlc_LibVLC_getChapter(JNIEnv *env, jobject thiz)
return -1;
jstring Java_org_videolan_libvlc_LibVLC_getChapterDescription(JNIEnv *env, jobject thiz, jint title)
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
libvlc_track_description_t *description;
jstring string = NULL;
if (!mp)
return NULL;
description = libvlc_video_get_chapter_description(mp, title);
if (description) {
string = (*env)->NewStringUTF(env, description->psz_name);
return string;
void Java_org_videolan_libvlc_LibVLC_setChapter(JNIEnv *env, jobject thiz, jint chapter)
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
......@@ -697,6 +697,7 @@ public class LibVLC {
public native int getChapterCountForTitle(int title);
public native int getChapterCount();
public native int getChapter();
public native String getChapterDescription(int title);
public native int previousChapter();
public native int nextChapter();
public native void setChapter(int chapter);
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