bool VlcMediaWidget::jumpToNextChapter() { int currentTitle = libvlc_media_player_get_title(vlcMediaPlayer); int currentChapter = libvlc_media_player_get_chapter(vlcMediaPlayer); libvlc_media_player_next_chapter(vlcMediaPlayer); if ((libvlc_media_player_get_title(vlcMediaPlayer) != currentTitle) || (libvlc_media_player_get_chapter(vlcMediaPlayer) != currentChapter)) { return true; } return false; }
jint Java_org_videolan_libvlc_MediaPlayer_getChapter(JNIEnv *env, jobject thiz) { vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz); if (!p_obj) return -1; return libvlc_media_player_get_chapter(p_obj->u.p_mp); }
void VlcMediaWidget::updateChapters() { chapterCount = libvlc_media_player_get_chapter_count(vlcMediaPlayer); currentChapter = libvlc_media_player_get_chapter(vlcMediaPlayer); }