diff options
author | Sven Gothel <[email protected]> | 2013-08-17 01:30:25 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-08-17 01:30:25 +0200 |
commit | 2cb284545a2a0fd35762a104fee8107234808389 (patch) | |
tree | 657e1865c4a941aaee2afaf09f2652c11510034f /src/jogl/native/libav | |
parent | 3f262a9f4653a09b28a84442378428c18b64775f (diff) |
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
Diffstat (limited to 'src/jogl/native/libav')
-rw-r--r-- | src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c | 20 |
1 files changed, 4 insertions, 16 deletions
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 |