Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
0e3d2ece
Commit
0e3d2ece
authored
Mar 30, 2015
by
Geoffrey Métais
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose chapters navigation methods
parent
94cfc185
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
libvlc/jni/libvlcjni.c
libvlc/jni/libvlcjni.c
+37
-0
libvlc/src/org/videolan/libvlc/LibVLC.java
libvlc/src/org/videolan/libvlc/LibVLC.java
+5
-0
No files found.
libvlc/jni/libvlcjni.c
View file @
0e3d2ece
...
...
@@ -759,6 +759,14 @@ void Java_org_videolan_libvlc_LibVLC_setTitle(JNIEnv *env, jobject thiz, jint ti
libvlc_media_player_set_title
(
mp
,
title
);
}
jint
Java_org_videolan_libvlc_LibVLC_getChapterCount
(
JNIEnv
*
env
,
jobject
thiz
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
if
(
mp
)
return
libvlc_media_player_get_chapter_count
(
mp
);
return
-
1
;
}
jint
Java_org_videolan_libvlc_LibVLC_getChapterCountForTitle
(
JNIEnv
*
env
,
jobject
thiz
,
jint
title
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
...
...
@@ -767,6 +775,35 @@ jint Java_org_videolan_libvlc_LibVLC_getChapterCountForTitle(JNIEnv *env, jobjec
return
-
1
;
}
jint
Java_org_videolan_libvlc_LibVLC_getChapter
(
JNIEnv
*
env
,
jobject
thiz
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
if
(
mp
)
return
libvlc_media_player_get_chapter
(
mp
);
return
-
1
;
}
void
Java_org_videolan_libvlc_LibVLC_setChapter
(
JNIEnv
*
env
,
jobject
thiz
,
jint
chapter
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
if
(
mp
)
libvlc_media_player_set_chapter
(
mp
,
chapter
);
}
void
Java_org_videolan_libvlc_LibVLC_previousChapter
(
JNIEnv
*
env
,
jobject
thiz
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
if
(
mp
)
libvlc_media_player_previous_chapter
(
mp
);
}
void
Java_org_videolan_libvlc_LibVLC_nextChapter
(
JNIEnv
*
env
,
jobject
thiz
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
if
(
mp
)
libvlc_media_player_next_chapter
(
mp
);
}
jint
Java_org_videolan_libvlc_LibVLC_getTitleCount
(
JNIEnv
*
env
,
jobject
thiz
)
{
libvlc_media_player_t
*
mp
=
getMediaPlayer
(
env
,
thiz
);
...
...
libvlc/src/org/videolan/libvlc/LibVLC.java
View file @
0e3d2ece
...
...
@@ -695,6 +695,11 @@ public class LibVLC {
public
native
int
getTitle
();
public
native
void
setTitle
(
int
title
);
public
native
int
getChapterCountForTitle
(
int
title
);
public
native
int
getChapterCount
();
public
native
int
getChapter
();
public
native
int
previousChapter
();
public
native
int
nextChapter
();
public
native
void
setChapter
(
int
chapter
);
public
native
int
getTitleCount
();
public
native
void
playerNavigate
(
int
navigate
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment