summaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-10-05 13:51:51 +0200
committerSven Gothel <[email protected]>2015-10-05 13:51:51 +0200
commitc82ab4d75a50cd88c675e6c1e757dc9ed2db9655 (patch)
tree19c8c4364496d513311da3565bea88883e812d91 /src/jogl/native
parent9abd252b4d30e0611a360d37d228dbae427c9cd5 (diff)
Bug 1239: Support OSX input via 'avfoundation' ; Use remaining camera ID (index) as filename for OSX
Diffstat (limited to 'src/jogl/native')
-rw-r--r--src/jogl/native/libav/ffmpeg_impl_template.c5
1 files changed, 5 insertions, 0 deletions
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);