aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/native')
-rw-r--r--src/jogl/native/GLDebugMessageHandler.c7
-rw-r--r--src/jogl/native/libav/ffmpeg_impl_template.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/src/jogl/native/GLDebugMessageHandler.c b/src/jogl/native/GLDebugMessageHandler.c
index 5c18b94b1..e524df9bf 100644
--- a/src/jogl/native/GLDebugMessageHandler.c
+++ b/src/jogl/native/GLDebugMessageHandler.c
@@ -17,6 +17,7 @@
#define DBG_PRINT(...)
#endif
+// Note: 'ARB' is also used for 'KHR'!
static jmethodID glDebugMessageARB = NULL; // int source, int type, int id, int severity, String msg
static jmethodID glDebugMessageAMD = NULL; // int id, int category, int severity, String msg
@@ -120,7 +121,8 @@ JNIEXPORT jlong JNICALL Java_jogamp_opengl_GLDebugMessageHandler_register0
handle->extType = extType;
DBG_PRINT("GLDebugMessageHandler.register0: jobject %p, extType %d\n", (void*)handle->obj, handle->extType);
- if(jogamp_opengl_GLDebugMessageHandler_EXT_ARB == extType) {
+ if(jogamp_opengl_GLDebugMessageHandler_EXT_KHR == extType ||
+ jogamp_opengl_GLDebugMessageHandler_EXT_ARB == extType) {
_local_PFNGLDEBUGMESSAGECALLBACKARBPROC ptr_glDebugMessageCallbackARB;
ptr_glDebugMessageCallbackARB = (_local_PFNGLDEBUGMESSAGECALLBACKARBPROC) (intptr_t) procAddress;
ptr_glDebugMessageCallbackARB((_local_GLDEBUGPROCARB)GLDebugMessageARBCallback, handle);
@@ -151,7 +153,8 @@ JNIEXPORT void JNICALL Java_jogamp_opengl_GLDebugMessageHandler_unregister0
JoglCommon_throwNewRuntimeException(env, "wrong handle (obj doesn't match)");
}
- if(jogamp_opengl_GLDebugMessageHandler_EXT_ARB == handle->extType) {
+ if(jogamp_opengl_GLDebugMessageHandler_EXT_KHR == handle->extType ||
+ jogamp_opengl_GLDebugMessageHandler_EXT_ARB == handle->extType) {
_local_PFNGLDEBUGMESSAGECALLBACKARBPROC ptr_glDebugMessageCallbackARB;
ptr_glDebugMessageCallbackARB = (_local_PFNGLDEBUGMESSAGECALLBACKARBPROC) (intptr_t) procAddress;
ptr_glDebugMessageCallbackARB((_local_GLDEBUGPROCARB)NULL, NULL);
diff --git a/src/jogl/native/libav/ffmpeg_impl_template.c b/src/jogl/native/libav/ffmpeg_impl_template.c
index ca283ef52..d02770eb7 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, "pixel_format", "yuyv422", 0);
}
MY_MUTEX_LOCK(env, mutex_avcodec_openclose);
@@ -1148,8 +1153,10 @@ JNIEXPORT void JNICALL FF_FUNC(setStream0)
#endif
} else {
vLinesize[0] = pAV->pVFrame->linesize[0];
- if( pAV->vPixFmt == PIX_FMT_YUYV422 ) {
- // Stuff 2x 16bpp (YUYV) into one RGBA pixel!
+ if( pAV->vPixFmt == PIX_FMT_YUYV422 ||
+ pAV->vPixFmt == PIX_FMT_UYVY422 )
+ {
+ // Stuff 2x 16bpp (YUYV, UYVY) into one RGBA pixel!
pAV->vTexWidth[0] = pAV->pVCodecCtx->width / 2;
} else {
pAV->vTexWidth[0] = pAV->pVCodecCtx->width;