aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-16 06:12:45 +0100
committerSven Gothel <[email protected]>2014-02-16 06:12:45 +0100
commite685f79ec7071e266a1bd3d3ce3e742397b5372e (patch)
tree7328960c34c3083e91ec47793993c686359e0015 /src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
parenta6acce1be19060a6a4801582f0534e0d6887467a (diff)
Bug 927: Fix minor MT issues w/ libav/ffmpeg
Issue: [NULL @ 0x35bde60] insufficient thread locking around avcodec_open/close() Decorating said libav functions w/ mutex lock/release. Abstract impl. to either use pthread or JNI Monitor, but using the latter to reduce dependencies (ming64 windows). FFMPEGNatives is now an abstract class containing the 'static final Object mutex_avcodec_openclose'
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
index 4b013c1b3..6ca0ea311 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
@@ -27,52 +27,52 @@
*/
package jogamp.opengl.util.av.impl;
-class FFMPEGv08Natives implements FFMPEGNatives {
+class FFMPEGv08Natives extends FFMPEGNatives {
@Override
- public native boolean initSymbols0(long[] symbols, int count);
+ native boolean initSymbols0(long[] symbols, int count);
@Override
- public native int getAvUtilMajorVersionCC0();
+ native int getAvUtilMajorVersionCC0();
@Override
- public native int getAvFormatMajorVersionCC0();
+ native int getAvFormatMajorVersionCC0();
@Override
- public native int getAvCodecMajorVersionCC0();
+ native int getAvCodecMajorVersionCC0();
@Override
- public native int getAvResampleMajorVersionCC0();
+ native int getAvResampleMajorVersionCC0();
@Override
- public native int getSwResampleMajorVersionCC0();
+ native int getSwResampleMajorVersionCC0();
@Override
- public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
+ native long createInstance0(Object mutex_avcodec_openclose, FFMPEGMediaPlayer upstream, boolean verbose);
@Override
- public native void destroyInstance0(long moviePtr);
+ native void destroyInstance0(long moviePtr);
@Override
- public native void setStream0(long moviePtr, String url, boolean isCameraInput, int vid, String sizes, int vWidth, int vHeight, int vRate, int aid, int aMaxChannelCount, int aPrefSampleRate);
+ native void setStream0(long moviePtr, String url, boolean isCameraInput, int vid, String sizes, int vWidth, int vHeight, int vRate, int aid, int aMaxChannelCount, int aPrefSampleRate);
@Override
- public native void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
+ native void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
@Override
- public native int getVideoPTS0(long moviePtr);
+ native int getVideoPTS0(long moviePtr);
@Override
- public native int getAudioPTS0(long moviePtr);
+ native int getAudioPTS0(long moviePtr);
@Override
- public native int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
+ native int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
@Override
- public native int play0(long moviePtr);
+ native int play0(long moviePtr);
@Override
- public native int pause0(long moviePtr);
+ native int pause0(long moviePtr);
@Override
- public native int seek0(long moviePtr, int position);
+ native int seek0(long moviePtr, int position);
}