Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ewout ter Hoeven
VLC-Android
Commits
fc205152
Commit
fc205152
authored
Sep 25, 2012
by
Ludovic Fauvet
Browse files
libvlcjni: return the index in the playlist from readMedia
parent
f218ef79
Changes
2
Hide whitespace changes
Inline
Side-by-side
vlc-android/jni/libvlcjni.c
View file @
fc205152
...
...
@@ -609,7 +609,7 @@ static void create_player_and_play(JNIEnv* env, jobject thiz,
libvlc_media_list_player_play_item_at_index
(
p_mlp
,
position
);
}
void
Java_org_videolan_vlc_LibVLC_readMedia
(
JNIEnv
*
env
,
jobject
thiz
,
jint
Java_org_videolan_vlc_LibVLC_readMedia
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
instance
,
jstring
mrl
,
jboolean
novideo
)
{
/* Create a new item */
...
...
@@ -636,6 +636,8 @@ void Java_org_videolan_vlc_LibVLC_readMedia(JNIEnv *env, jobject thiz,
libvlc_media_release
(
m
);
create_player_and_play
(
env
,
thiz
,
instance
,
position
);
return
position
;
}
void
Java_org_videolan_vlc_LibVLC_playIndex
(
JNIEnv
*
env
,
jobject
thiz
,
...
...
vlc-android/src/org/videolan/vlc/LibVLC.java
View file @
fc205152
...
...
@@ -247,9 +247,9 @@ public class LibVLC {
/**
* Read a media.
*/
public
void
readMedia
(
String
mrl
,
boolean
novideo
)
{
public
int
readMedia
(
String
mrl
,
boolean
novideo
)
{
Log
.
v
(
TAG
,
"Reading "
+
mrl
);
readMedia
(
mLibVlcInstance
,
mrl
,
novideo
);
return
readMedia
(
mLibVlcInstance
,
mrl
,
novideo
);
}
/**
...
...
@@ -324,8 +324,9 @@ public class LibVLC {
* Read a media
* @param instance: the instance of libVLC
* @param mrl: the media mrl
* @return the position in the playlist
*/
private
native
void
readMedia
(
long
instance
,
String
mrl
,
boolean
novideo
);
private
native
int
readMedia
(
long
instance
,
String
mrl
,
boolean
novideo
);
/**
* Play an index in the native media list (playlist)
...
...
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