aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native/libav
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-08-17 01:30:25 +0200
committerSven Gothel <[email protected]>2013-08-17 01:30:25 +0200
commit2cb284545a2a0fd35762a104fee8107234808389 (patch)
tree657e1865c4a941aaee2afaf09f2652c11510034f /src/jogl/native/libav
parent3f262a9f4653a09b28a84442378428c18b64775f (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.c20
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