Commit 76d172ee authored by Paulo Vitor Magacho da Silva's avatar Paulo Vitor Magacho da Silva Committed by Jean-Baptiste Kempf

Added method to get the player state.

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5c8988fb
...@@ -487,6 +487,14 @@ void Java_org_videolan_libvlc_LibVLC_stop(JNIEnv *env, jobject thiz) ...@@ -487,6 +487,14 @@ void Java_org_videolan_libvlc_LibVLC_stop(JNIEnv *env, jobject thiz)
libvlc_media_player_stop(mp); libvlc_media_player_stop(mp);
} }
jint Java_org_videolan_libvlc_LibVLC_getPlayerState(JNIEnv *env, jobject thiz)
{
libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
if (mp)
return (jint) libvlc_media_player_get_state(mp);
return -1;
}
jint Java_org_videolan_libvlc_LibVLC_getVolume(JNIEnv *env, jobject thiz) jint Java_org_videolan_libvlc_LibVLC_getVolume(JNIEnv *env, jobject thiz)
{ {
libvlc_media_player_t *mp = getMediaPlayer(env, thiz); libvlc_media_player_t *mp = getMediaPlayer(env, thiz);
......
...@@ -558,6 +558,11 @@ public class LibVLC { ...@@ -558,6 +558,11 @@ public class LibVLC {
*/ */
public native void stop(); public native void stop();
/**
* Get player state.
*/
public native int getPlayerState();
/** /**
* Gets volume as integer * Gets volume as integer
*/ */
......
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