From 2cb284545a2a0fd35762a104fee8107234808389 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 17 Aug 2013 01:30:25 +0200 Subject: GLMediaPlayer: Use URI instead of URL / Misc refinements - GLMediaPlayer: Use URI instead of URL, allowing passing a non resolved location - Java's URL doesn't allow 'other' protocols, i.e. RTSP - GLMediaPlayer: Add Table of test streams and their location .. - FFMPEGMediaPlayer - Handle av_read_play/pause response on java side, ignore error - simply dump in DEBUG_NATIVE mode --- .../jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/jogl/native') diff --git a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c index ca0bf9bb9..99b385e3c 100644 --- a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c +++ b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c @@ -877,29 +877,17 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_readNex return resPTS; } -JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_play0 +JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_play0 (JNIEnv *env, jobject instance, jlong ptr) { FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr)); - int res = sp_av_read_play(pAV->pFormatCtx); - if ( 0 != res && -ENOSYS != res ) { // Ignore ENOSYS (not impl.) - fprintf(stderr, "PLAY: err %d 0x%X\n", res, res); - return JNI_FALSE; - } else { - return JNI_TRUE; - } + return sp_av_read_play(pAV->pFormatCtx); } -JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_pause0 +JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_pause0 (JNIEnv *env, jobject instance, jlong ptr) { FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr)); - int res = sp_av_read_pause(pAV->pFormatCtx); - if ( 0 != res && -ENOSYS != res ) { // Ignore ENOSYS (not impl.) - fprintf(stderr, "PAUSE: err %d 0x%X\n", res, res); - return JNI_FALSE; - } else { - return JNI_TRUE; - } + return sp_av_read_pause(pAV->pFormatCtx); } JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_seek0 -- cgit v1.2.3