diff options
author | Sven Gothel <[email protected]> | 2015-10-05 13:51:51 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-10-05 13:51:51 +0200 |
commit | c82ab4d75a50cd88c675e6c1e757dc9ed2db9655 (patch) | |
tree | 19c8c4364496d513311da3565bea88883e812d91 /src | |
parent | 9abd252b4d30e0611a360d37d228dbae427c9cd5 (diff) |
Bug 1239: Support OSX input via 'avfoundation' ; Use remaining camera ID (index) as filename for OSX
Diffstat (limited to 'src')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 4 | ||||
-rw-r--r-- | src/jogl/native/libav/ffmpeg_impl_template.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java index cd1400a29..e51984e37 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -346,12 +346,10 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { resStreamLocS = dev_video_linux + cameraPath.decode(); break; case WINDOWS: - resStreamLocS = cameraPath.decode(); - break; case MACOS: case OPENKODE: default: - resStreamLocS = streamLocS; // FIXME: ?? + resStreamLocS = cameraPath.decode(); break; } if( null != cameraProps ) { diff --git a/src/jogl/native/libav/ffmpeg_impl_template.c b/src/jogl/native/libav/ffmpeg_impl_template.c index 589cc3f39..9d430b09e 100644 --- a/src/jogl/native/libav/ffmpeg_impl_template.c +++ b/src/jogl/native/libav/ffmpeg_impl_template.c @@ -622,6 +622,7 @@ static const char * inFmtNames[] = { "video4linux", // linux (old) "dshow", // windows "vfwcap", // windows (old) + "avfoundation", // osx "mpg", "yuv2", "mjpeg", @@ -732,6 +733,9 @@ JNIEXPORT void JNICALL FF_FUNC(setStream0) fprintf(stderr, "Camera %d not found\n", devIdx); } } + if(pAV->verbose) { + fprintf(stderr, "Camera: Filename: %s\n", filename); + } const char *sizeS = NULL != jSizeS ? (*env)->GetStringUTFChars(env, jSizeS, &iscopy) : NULL; int hasSize = 0; @@ -756,6 +760,7 @@ JNIEXPORT void JNICALL FF_FUNC(setStream0) } sp_av_dict_set(&inOpts, "framerate", buffer, 0); } + // FIXME pre-select: sp_av_dict_set(&inOpts, "pix_fmt", "yuyv422", 0); } MY_MUTEX_LOCK(env, mutex_avcodec_openclose); |