diff options
Diffstat (limited to 'src/jogl/native/libav/ffmpeg_tool.h')
-rw-r--r-- | src/jogl/native/libav/ffmpeg_tool.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/jogl/native/libav/ffmpeg_tool.h b/src/jogl/native/libav/ffmpeg_tool.h index 97e60afce..66c3519e6 100644 --- a/src/jogl/native/libav/ffmpeg_tool.h +++ b/src/jogl/native/libav/ffmpeg_tool.h @@ -64,6 +64,15 @@ typedef struct SwrContext SwrContext; #include <stdio.h> #include <stdlib.h> +// We use JNI Monitor Locking, since this removes the need +// to statically link-in pthreads on window .. +// #define USE_PTHREAD_LOCKING 1 +// +#ifdef USE_PTHREAD_LOCKING + #include <pthread.h> + #error PTHREAD path not tested yet +#endif + #include <GL/gl.h> typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); @@ -148,6 +157,12 @@ typedef struct { PFNGLFLUSH procAddrGLFlush; PFNGLFINISH procAddrGLFinish; + #ifdef USE_PTHREAD_LOCKING + pthread_mutex_t mutex_avcodec_openclose; + #else + jobject mutex_avcodec_openclose; + #endif + AVFormatContext* pFormatCtx; int32_t vid; AVStream* pVStream; |