summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-08-26 13:38:40 +0200
committerSven Gothel <[email protected]>2013-08-26 13:38:40 +0200
commitb5876b598ecf3eb32ceb183ecbd5d29b8885a304 (patch)
tree9b63eb4a58e12e1df27e1406e0c041218b7fe2c5
parentee64b0b3e47cc5d52fb3679c582d3ad0134adb9e (diff)
libav/ffmpeg: Compile/Link 2 versions of native FFMPEGMediaPlayer methods FFMPEGNatives -> FFMPEGv08Natives + FFMPEGv09Natives
Enables FFMPEGMediaPlayer to work w/ either ffmpeg/libav version 8 or 9 w/ same JOGL binary Same C source code is compiled against 1: version 0.8 FFMPEGv08Natives lavc53.lavf53.lavu51 2: version 0.9 FFMPEGv09Natives lavc54.lavf54.lavu52.lavr01 FFMPEGv08Natives and FFMPEGv09Natives implements FFMPEGNatives, native C code uses CPP '##' macro concatenation to produce unique function names. To enable 'cpp' to find the libav* header files matching the desired version, we have placed them in the c-file's folder, issued '#include "path/file.h" and added symbolic links to allow finding same module and 'sister modules': ls -l libavformat/ .. lrwxrwxrwx 1 sven sven 13 Aug 26 12:56 libavcodec -> ../libavcodec lrwxrwxrwx 1 sven sven 14 Aug 26 12:56 libavformat -> ../libavformat lrwxrwxrwx 1 sven sven 12 Aug 26 12:57 libavutil -> ../libavutil .. At static init FFMPEGDynamicLibraryBundleInfo, determines the runtime version and instantiates the matching FFMPEGNatives, or null if non matches. FFMPEGMediaPlayer still compares the compile-time and runtime versions. FFMPEGMediaPlayer passes it's own instance to FFMPEGNatives for callbacks.
-rw-r--r--make/build-jogl.xml14
-rw-r--r--src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java3
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java56
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java269
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java188
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java15
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java51
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java51
-rw-r--r--src/jogl/native/libav/ffmpeg_tool.h12
-rw-r--r--src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGStaticNatives.c84
-rw-r--r--src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGvXXNatives.c (renamed from src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c)105
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/jogamp_opengl_util_av_impl_FFMPEGv08Natives.c31
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/avcodec.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/avcodec.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/avfft.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/avfft.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/dxva2.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/dxva2.h)0
l---------src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavcodec1
l---------src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavutil1
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/opt.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/opt.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vaapi.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vaapi.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vda.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vda.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vdpau.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vdpau.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/version.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/version.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/xvmc.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/xvmc.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/avformat.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/avformat.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/avio.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/avio.h)0
l---------src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavcodec1
l---------src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavformat1
l---------src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavutil1
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/version.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/version.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/adler32.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/adler32.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/aes.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/aes.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/attributes.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/attributes.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/audioconvert.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/audioconvert.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avassert.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avassert.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avconfig.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avconfig.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avstring.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avstring.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avutil.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avutil.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/base64.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/base64.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/bswap.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/bswap.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/common.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/common.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/cpu.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/cpu.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/crc.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/crc.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/dict.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/dict.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/error.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/error.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/eval.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/eval.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/fifo.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/fifo.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/file.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/file.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/imgutils.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/imgutils.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intfloat.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intfloat.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intfloat_readwrite.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intfloat_readwrite.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intreadwrite.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intreadwrite.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/lfg.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/lfg.h)0
l---------src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/libavutil1
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/log.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/log.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/lzo.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/lzo.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/mathematics.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/mathematics.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/md5.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/md5.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/mem.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/mem.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/opt.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/opt.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/parseutils.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/parseutils.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/pixdesc.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/pixdesc.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/pixfmt.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/pixfmt.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/random_seed.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/random_seed.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/rational.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/rational.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/samplefmt.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/samplefmt.h)0
-rw-r--r--src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/sha.h (renamed from make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/sha.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/jogamp_opengl_util_av_impl_FFMPEGv09Natives.c31
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avcodec.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avcodec.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avfft.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avfft.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/dxva2.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/dxva2.h)0
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavcodec1
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavutil1
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/old_codec_ids.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/old_codec_ids.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vaapi.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vaapi.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vda.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vda.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vdpau.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vdpau.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/version.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/version.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/xvmc.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/xvmc.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avformat.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avformat.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avio.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avio.h)0
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavcodec1
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavformat1
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavutil1
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/version.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/version.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/avresample.h379
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavresample1
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavutil1
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/version.h46
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/adler32.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/adler32.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/aes.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/aes.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/attributes.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/attributes.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audio_fifo.h146
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audioconvert.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audioconvert.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avassert.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avassert.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avconfig.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avconfig.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avstring.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avstring.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avutil.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avutil.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/base64.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/base64.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/blowfish.h76
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/bswap.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/bswap.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/channel_layout.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/channel_layout.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/common.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/common.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/cpu.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/cpu.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/crc.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/crc.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/dict.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/dict.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/error.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/error.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/eval.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/eval.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/fifo.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/fifo.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/file.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/file.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/imgutils.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/imgutils.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat_readwrite.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat_readwrite.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intreadwrite.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intreadwrite.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lfg.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lfg.h)0
l---------src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/libavutil1
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/log.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/log.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lzo.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lzo.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/md5.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/md5.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mem.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mem.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/old_pix_fmts.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/old_pix_fmts.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/opt.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/opt.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/parseutils.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/parseutils.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixdesc.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixdesc.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixfmt.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixfmt.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/random_seed.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/random_seed.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/rational.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/rational.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/samplefmt.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/samplefmt.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/sha.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/sha.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/time.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/time.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/version.h (renamed from make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/version.h)0
-rw-r--r--src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/xtea.h61
132 files changed, 1314 insertions, 318 deletions
diff --git a/make/build-jogl.xml b/make/build-jogl.xml
index 190782976..b384aebc2 100644
--- a/make/build-jogl.xml
+++ b/make/build-jogl.xml
@@ -1434,7 +1434,9 @@
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
<!-- FIXME: the Mixer should be moved to another library -->
<!--include name="${rootrel.src.c}/Mixer.cpp" if="isWindows"/-->
- <include name="${rootrel.src.c.libav}/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c"/>
+ <include name="${rootrel.src.c.libav}/jogamp_opengl_util_av_impl_FFMPEGStaticNatives.c"/>
+ <include name="${rootrel.src.c.libav}/lavc53.lavf53.lavu51/jogamp_opengl_util_av_impl_FFMPEGv08Natives.c"/>
+ <include name="${rootrel.src.c.libav}/lavc54.lavf54.lavu52.lavr01/jogamp_opengl_util_av_impl_FFMPEGv09Natives.c"/>
<include name="${rootrel.src.c.openmax}/omx_tool.c" if="setup.addNativeOpenMAX"/>
<include name="${rootrel.src.c.openmax}/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c" if="setup.addNativeOpenMAX"/>
@@ -1451,7 +1453,9 @@
<include name="${rootrel.src.c}/JoglCommon.c"/>
<include name="${rootrel.src.c}/GLDebugMessageHandler.c"/>
<include name="${rootrel.src.c}/GLXGetProcAddressARB.c" if="isX11"/>
- <include name="${rootrel.src.c.libav}/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c"/>
+ <include name="${rootrel.src.c.libav}/jogamp_opengl_util_av_impl_FFMPEGStaticNatives.c"/>
+ <include name="${rootrel.src.c.libav}/lavc53.lavf53.lavu51/jogamp_opengl_util_av_impl_FFMPEGv08Natives.c"/>
+ <include name="${rootrel.src.c.libav}/lavc54.lavf54.lavu52.lavr01/jogamp_opengl_util_av_impl_FFMPEGv09Natives.c"/>
<include name="${rootrel.src.c.openmax}/omx_tool.c" if="setup.addNativeOpenMAX"/>
<include name="${rootrel.src.c.openmax}/jogamp_opengl_util_av_impl_OMXGLMediaPlayer.c" if="setup.addNativeOpenMAX"/>
@@ -1500,8 +1504,6 @@
<includepath path="stub_includes/khr"/>
<includepath path="stub_includes/egl"/>
<includepath path="stub_includes/opengl"/>
- <includepath path="stub_includes/libav/lavc53.lavf53.lavu51" /> <!-- headers required by our libav/ffmpeg MediaPlayer impl. using lavc53.lavf53.lavu51 -->
- <!-- includepath path="stub_includes/libav/lavc54.lavf54.lavu52.lavr01" / --> <!-- headers required by our libav/ffmpeg MediaPlayer impl. using lavc54.lavf54.lavu52.lavr01 -->
<includepath path="stub_includes/openmax" if="setup.addNativeOpenMAX"/>
<includepath path="stub_includes/cg" if="setup.addNativeNVidiaCG"/>
@@ -1554,7 +1556,9 @@
<target name="c.build.jogl.prepare">
<javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${javah.classpath}" class="jogamp.opengl.GLDebugMessageHandler" />
<javah destdir="${build.jogl}/gensrc/native/jogl" classpath="${javah.classpath}" class="jogamp.opengl.GLContextImpl" />
- <javah destdir="${src.generated.c.libav}" classpath="${javah.classpath}" class="jogamp.opengl.util.av.impl.FFMPEGMediaPlayer" />
+ <javah destdir="${src.generated.c.libav}" classpath="${javah.classpath}" class="jogamp.opengl.util.av.impl.FFMPEGStaticNatives" />
+ <javah destdir="${src.generated.c.libav}" classpath="${javah.classpath}" class="jogamp.opengl.util.av.impl.FFMPEGv08Natives" />
+ <javah destdir="${src.generated.c.libav}" classpath="${javah.classpath}" class="jogamp.opengl.util.av.impl.FFMPEGv09Natives" />
<javah destdir="${src.generated.c.openmax}" classpath="${javah.classpath}" class="jogamp.opengl.util.av.impl.OMXGLMediaPlayer" />
<!-- Generate the waveout Mixer header -->
<!-- FIXME: this is temporary until we move this to another workspace -->
diff --git a/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java b/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java
index 69223d0b9..2c1dfa237 100644
--- a/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java
+++ b/src/jogl/classes/jogamp/opengl/openal/av/ALDummyUsage.java
@@ -1,7 +1,5 @@
package jogamp.opengl.openal.av;
-import jogamp.opengl.util.av.impl.FFMPEGMediaPlayer;
-
import com.jogamp.openal.AL;
import com.jogamp.openal.JoalVersion;
@@ -10,7 +8,6 @@ import com.jogamp.openal.JoalVersion;
*/
public class ALDummyUsage {
static AL al;
- static FFMPEGMediaPlayer.PixelFormat pfmt;
public static void main(String args[]) {
System.err.println("JOGL> Hello JOAL");
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
index 2f92f9bf3..ab16c5e5e 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
@@ -43,6 +43,7 @@ import javax.media.opengl.GLProfile;
import com.jogamp.common.os.DynamicLibraryBundle;
import com.jogamp.common.os.DynamicLibraryBundleInfo;
import com.jogamp.common.util.RunnableExecutor;
+import com.jogamp.common.util.VersionNumber;
/**
* FIXME: We need native structure access methods to deal with API changes
@@ -148,10 +149,15 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
"avresample_convert",
};
- private static long[] symbolAddr;
+ private static final long[] symbolAddr = new long[symbolCount];
private static final boolean ready;
private static final boolean libsLoaded;
private static final boolean avresampleLoaded; // optional
+ static final VersionNumber avCodecVersion;
+ static final VersionNumber avFormatVersion;
+ static final VersionNumber avUtilVersion;
+ static final VersionNumber avResampleVersion;
+ private static final FFMPEGNatives natives;
static {
// native ffmpeg media player implementation is included in jogl_desktop and jogl_mobile
@@ -159,26 +165,51 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
boolean _ready = false;
boolean[] _libsLoaded= { false };
boolean[] _avresampleLoaded= { false };
+ VersionNumber[] _versions = new VersionNumber[4];
try {
- _ready = initSymbols(_libsLoaded, _avresampleLoaded);
+ _ready = initSymbols(_libsLoaded, _avresampleLoaded, _versions);
} catch (Throwable t) {
t.printStackTrace();
}
libsLoaded = _libsLoaded[0];
avresampleLoaded = _avresampleLoaded[0];
- ready = _ready;
+ avCodecVersion = _versions[0];
+ avFormatVersion = _versions[1];
+ avUtilVersion = _versions[2];
+ avResampleVersion = _versions[3];
if(!libsLoaded) {
System.err.println("LIB_AV Not Available");
- } else if(!ready) {
+ natives = null;
+ ready = false;
+ } else if(!_ready) {
System.err.println("LIB_AV Not Matching");
+ natives = null;
+ ready = false;
+ } else {
+ if( avCodecVersion.getMajor() <= 53 && avFormatVersion.getMajor() <= 53 && avUtilVersion.getMajor() <= 51 ) {
+ // lavc53.lavf53.lavu51
+ natives = new FFMPEGv08Natives();
+ } else if( avCodecVersion.getMajor() == 54 && avFormatVersion.getMajor() <= 54 && avUtilVersion.getMajor() <= 52 ) {
+ // lavc54.lavf54.lavu52.lavr01
+ natives = new FFMPEGv09Natives();
+ } else {
+ System.err.println("LIB_AV No Version/Native-Impl Match");
+ natives = null;
+ }
+ if( null != natives ) {
+ ready = natives.initSymbols0(symbolAddr, symbolCount);
+ } else {
+ ready = false;
+ }
}
}
static boolean libsLoaded() { return libsLoaded; }
static boolean avResampleLoaded() { return avresampleLoaded; }
+ static FFMPEGNatives getNatives() { return natives; }
static boolean initSingleton() { return ready; }
- private static final boolean initSymbols(boolean[] libsLoaded, boolean[] avresampleLoaded) {
+ private static final boolean initSymbols(boolean[] libsLoaded, boolean[] avresampleLoaded, VersionNumber[] versions) {
libsLoaded[0] = false;
final DynamicLibraryBundle dl = AccessController.doPrivileged(new PrivilegedAction<DynamicLibraryBundle>() {
public DynamicLibraryBundle run() {
@@ -191,15 +222,11 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
throw new RuntimeException("FFMPEG Tool library incomplete: [ avutil "+avutilLoaded+", avformat "+avformatLoaded+", avcodec "+avcodecLoaded+"]");
}
avresampleLoaded[0] = dl.isToolLibLoaded(3);
- /** Ignore .. due to optional libavresample
- if(!dl.isToolLibComplete()) {
- throw new RuntimeException("FFMPEG Tool libraries incomplete");
- } */
libsLoaded[0] = true;
+
if(symbolNames.length != symbolCount) {
throw new InternalError("XXX0 "+symbolNames.length+" != "+symbolCount);
}
- symbolAddr = new long[symbolCount];
// optional symbol name set
final Set<String> optionalSymbolNameSet = new HashSet<String>();
@@ -258,7 +285,12 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
}
}
}
- return initSymbols0(symbolAddr, symbolCount) && res;
+ versions[0] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvCodecVersion0(symbolAddr[0]));
+ versions[1] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvFormatVersion0(symbolAddr[1]));
+ versions[2] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvUtilVersion0(symbolAddr[2]));
+ versions[3] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvResampleVersion0(symbolAddr[3]));
+
+ return res;
}
protected FFMPEGDynamicLibraryBundleInfo() {
@@ -361,6 +393,4 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
public final RunnableExecutor getLibLoaderExecutor() {
return DynamicLibraryBundle.getDefaultRunnableExecutor();
}
-
- private static native boolean initSymbols0(long[] symbols, int count);
}
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 258c6757b..bcf4994b5 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -29,7 +29,6 @@
package jogamp.opengl.util.av.impl;
import java.io.IOException;
-import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -39,7 +38,6 @@ import javax.media.opengl.GL2ES2;
import javax.media.opengl.GLException;
import com.jogamp.common.os.Platform;
-import com.jogamp.common.util.VersionNumber;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.opengl.util.TimeFrameI;
import com.jogamp.opengl.util.GLPixelStorageModes;
@@ -51,6 +49,8 @@ import com.jogamp.opengl.util.texture.Texture;
import jogamp.opengl.GLContextImpl;
import jogamp.opengl.util.av.GLMediaPlayerImpl;
+import jogamp.opengl.util.av.impl.FFMPEGNatives.PixelFormat;
+import jogamp.opengl.util.av.impl.FFMPEGNatives.SampleFormat;
/***
* Implementation utilizes <a href="http://libav.org/">Libav</a>
@@ -109,65 +109,47 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
/** POSIX ENOSYS {@value}: Function not implemented. FIXME: Move to GlueGen ?!*/
private static final int ENOSYS = 38;
- /** Default number of audio frames per video frame */
- private static final int AV_DEFAULT_AFRAMES = 8;
-
// Instance data
+ private static final FFMPEGNatives natives;
private static final int avUtilMajorVersionCC;
private static final int avFormatMajorVersionCC;
private static final int avCodecMajorVersionCC;
private static final int avResampleMajorVersionCC;
- private static final VersionNumber avUtilVersion;
- private static final VersionNumber avFormatVersion;
- private static final VersionNumber avCodecVersion;
- private static final VersionNumber avResampleVersion;
private static final boolean available;
static {
final boolean libAVGood = FFMPEGDynamicLibraryBundleInfo.initSingleton();
final boolean libAVVersionGood;
if( FFMPEGDynamicLibraryBundleInfo.libsLoaded() ) {
- avUtilMajorVersionCC = getAvUtilMajorVersionCC0();
- avFormatMajorVersionCC = getAvFormatMajorVersionCC0();
- avCodecMajorVersionCC = getAvCodecMajorVersionCC0();
- avResampleMajorVersionCC = getAvResampleMajorVersionCC0();
- avUtilVersion = getAVVersion(getAvUtilVersion0());
- avFormatVersion = getAVVersion(getAvFormatVersion0());
- avCodecVersion = getAVVersion(getAvCodecVersion0());
- avResampleVersion = getAVVersion(getAvResampleVersion0());
- System.err.println("LIB_AV Util : "+avUtilVersion+" [cc "+avUtilMajorVersionCC+"]");
- System.err.println("LIB_AV Format : "+avFormatVersion+" [cc "+avFormatMajorVersionCC+"]");
- System.err.println("LIB_AV Codec : "+avCodecVersion+" [cc "+avCodecMajorVersionCC+"]");
- System.err.println("LIB_AV Resample: "+avResampleVersion+" [cc "+avResampleMajorVersionCC+"]");
- libAVVersionGood = avUtilMajorVersionCC == avUtilVersion.getMajor() &&
- avFormatMajorVersionCC == avFormatVersion.getMajor() &&
- avCodecMajorVersionCC == avCodecVersion.getMajor() &&
- avResampleMajorVersionCC == avResampleVersion.getMajor();
+ natives = FFMPEGDynamicLibraryBundleInfo.getNatives();
+ avUtilMajorVersionCC = natives.getAvUtilMajorVersionCC0();
+ avFormatMajorVersionCC = natives.getAvFormatMajorVersionCC0();
+ avCodecMajorVersionCC = natives.getAvCodecMajorVersionCC0();
+ avResampleMajorVersionCC = natives.getAvResampleMajorVersionCC0();
+ System.err.println("LIB_AV Util : "+FFMPEGDynamicLibraryBundleInfo.avUtilVersion+" [cc "+avUtilMajorVersionCC+"]");
+ System.err.println("LIB_AV Format : "+FFMPEGDynamicLibraryBundleInfo.avFormatVersion+" [cc "+avFormatMajorVersionCC+"]");
+ System.err.println("LIB_AV Codec : "+FFMPEGDynamicLibraryBundleInfo.avCodecVersion+" [cc "+avCodecMajorVersionCC+"]");
+ System.err.println("LIB_AV Resample: "+FFMPEGDynamicLibraryBundleInfo.avResampleVersion+" [cc "+avResampleMajorVersionCC+"]");
+ libAVVersionGood = avUtilMajorVersionCC == FFMPEGDynamicLibraryBundleInfo.avUtilVersion.getMajor() &&
+ avFormatMajorVersionCC == FFMPEGDynamicLibraryBundleInfo.avFormatVersion.getMajor() &&
+ avCodecMajorVersionCC == FFMPEGDynamicLibraryBundleInfo.avCodecVersion.getMajor() &&
+ avResampleMajorVersionCC == FFMPEGDynamicLibraryBundleInfo.avResampleVersion.getMajor();
if( !libAVVersionGood ) {
System.err.println("LIB_AV Not Matching Compile-Time / Runtime Major-Version");
}
} else {
+ natives = null;
avUtilMajorVersionCC = 0;
avFormatMajorVersionCC = 0;
avCodecMajorVersionCC = 0;
avResampleMajorVersionCC = 0;
- avUtilVersion = null;
- avFormatVersion = null;
- avCodecVersion = null;
- avResampleVersion = null;
libAVVersionGood = false;
}
- available = libAVGood && libAVVersionGood ? initIDs0() : false;
+ available = libAVGood && libAVVersionGood && null != natives ? natives.initIDs0() : false;
}
public static final boolean isAvailable() { return available; }
- private static VersionNumber getAVVersion(int vers) {
- return new VersionNumber( ( vers >> 16 ) & 0xFF,
- ( vers >> 8 ) & 0xFF,
- ( vers >> 0 ) & 0xFF );
- }
-
//
// General
//
@@ -199,7 +181,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(!available) {
throw new RuntimeException("FFMPEGMediaPlayer not available");
}
- moviePtr = createInstance0( DEBUG_NATIVE );
+ moviePtr = natives.createInstance0(this, DEBUG_NATIVE);
if(0==moviePtr) {
throw new GLException("Couldn't create FFMPEGInstance");
}
@@ -210,7 +192,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
@Override
protected final void destroyImpl(GL gl) {
if (moviePtr != 0) {
- destroyInstance0(moviePtr);
+ natives.destroyInstance0(moviePtr);
moviePtr = 0;
}
destroyAudioSink();
@@ -280,7 +262,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
final int aMaxChannelCount = audioSink.getMaxSupportedChannels();
final int aPrefSampleRate = preferredAudioFormat.sampleRate;
// setStream(..) issues updateAttributes*(..), and defines avChosenAudioFormat, vid, aid, .. etc
- setStream0(moviePtr, resStreamLocS, inFormat, vid, aid, aMaxChannelCount, aPrefSampleRate);
+ natives.setStream0(moviePtr, resStreamLocS, inFormat, vid, aid, aMaxChannelCount, aPrefSampleRate);
}
@Override
@@ -301,7 +283,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
final long procAddrGLGetError = pt.getAddressFor("glGetError");
final long procAddrGLFlush = pt.getAddressFor("glFlush");
final long procAddrGLFinish = pt.getAddressFor("glFinish");
- setGLFuncs0(moviePtr, procAddrGLTexSubImage2D, procAddrGLGetError, procAddrGLFlush, procAddrGLFinish);
+ natives.setGLFuncs0(moviePtr, procAddrGLTexSubImage2D, procAddrGLGetError, procAddrGLFlush, procAddrGLFinish);
return null;
} } );
audioQueueLimit = AudioSink.DefaultQueueLimitWithVideo;
@@ -367,12 +349,13 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
*/
/**
+ * Native callback
* Converts the given libav/ffmpeg values to {@link AudioFormat} and returns {@link AudioSink#isSupported(AudioFormat)}.
* @param audioSampleFmt ffmpeg/libav audio-sample-format, see {@link SampleFormat}.
* @param audioSampleRate sample rate in Hz (1/s)
* @param audioChannels number of channels
*/
- private final boolean isAudioFormatSupported(int audioSampleFmt, int audioSampleRate, int audioChannels) {
+ final boolean isAudioFormatSupported(int audioSampleFmt, int audioSampleRate, int audioChannels) {
final AudioFormat audioFormat = avAudioFormat2Local(SampleFormat.valueOf(audioSampleFmt), audioSampleRate, audioChannels);
final boolean res = audioSink.isSupported(audioFormat);
if( DEBUG ) {
@@ -434,6 +417,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
/**
+ * Native callback
* @param pixFmt
* @param planes
* @param bitsPerPixel
@@ -449,11 +433,11 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
* @param audioChannels
* @param audioSamplesPerFrameAndChannel in audio samples per frame and channel
*/
- private void updateAttributes2(int pixFmt, int planes, int bitsPerPixel, int bytesPerPixelPerPlane,
- int lSz0, int lSz1, int lSz2,
- int tWd0, int tWd1, int tWd2, int tH,
- int audioSampleFmt, int audioSampleRate,
- int audioChannels, int audioSamplesPerFrameAndChannel) {
+ void updateAttributes2(int pixFmt, int planes, int bitsPerPixel, int bytesPerPixelPerPlane,
+ int lSz0, int lSz1, int lSz2,
+ int tWd0, int tWd1, int tWd2, int tH,
+ int audioSampleFmt, int audioSampleRate,
+ int audioChannels, int audioSamplesPerFrameAndChannel) {
vPixelFmt = PixelFormat.valueOf(pixFmt);
vPlanes = planes;
vBitsPerPixel = bitsPerPixel;
@@ -562,7 +546,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(0==moviePtr) {
return false;
}
- final int errno = play0(moviePtr);
+ final int errno = natives.play0(moviePtr);
if( DEBUG_NATIVE && errno != 0 && errno != -ENOSYS) {
System.err.println("libav play err: "+errno);
}
@@ -574,7 +558,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(0==moviePtr) {
return false;
}
- final int errno = pause0(moviePtr);
+ final int errno = natives.pause0(moviePtr);
if( DEBUG_NATIVE && errno != 0 && errno != -ENOSYS) {
System.err.println("libav pause err: "+errno);
}
@@ -586,7 +570,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(0==moviePtr) {
throw new GLException("FFMPEG native instance null");
}
- return seek0(moviePtr, msec);
+ return natives.seek0(moviePtr, msec);
}
@Override
@@ -614,7 +598,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
/** Try decode up to 10 packets to find one containing video. */
for(int i=0; TimeFrameI.INVALID_PTS == vPTS && 10 > i; i++) {
- vPTS = readNextPacket0(moviePtr, textureTarget, textureFormat, textureType);
+ vPTS = natives.readNextPacket0(moviePtr, textureTarget, textureFormat, textureType);
}
if( null != nextFrame ) {
nextFrame.setPTS(vPTS);
@@ -622,195 +606,12 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
return vPTS;
}
- private final void pushSound(ByteBuffer sampleData, int data_size, int audio_pts) {
+ final void pushSound(ByteBuffer sampleData, int data_size, int audio_pts) {
setFirstAudioPTS2SCR( audio_pts );
if( 1.0f == playSpeed || audioSinkPlaySpeedSet ) {
audioSink.enqueueData( audio_pts, sampleData, data_size);
}
}
- private static native int getAvUtilVersion0();
- private static native int getAvUtilMajorVersionCC0();
- private static native int getAvFormatVersion0();
- private static native int getAvFormatMajorVersionCC0();
- private static native int getAvCodecVersion0();
- private static native int getAvCodecMajorVersionCC0();
- private static native int getAvResampleVersion0();
- private static native int getAvResampleMajorVersionCC0();
- private static native boolean initIDs0();
- private native long createInstance0(boolean verbose);
- private native void destroyInstance0(long moviePtr);
-
- /**
- * Issues {@link #updateAttributes(int, int, int, int, int, int, int, float, int, int, String, String)}
- * and {@link #updateAttributes2(int, int, int, int, int, int, int, int, int, int)}.
- * <p>
- * Always uses {@link AudioSink.AudioFormat}:
- * <pre>
- * [type PCM, sampleRate [10000(?)..44100..48000], sampleSize 16, channelCount 1-2, signed, littleEndian]
- * </pre>
- * </p>
- *
- * @param moviePtr
- * @param url
- * @param vid
- * @param aid
- * @param aPrefChannelCount
- * @param aPrefSampleRate
- */
- private native void setStream0(long moviePtr, String url, String inFormat, int vid, int aid, int aMaxChannelCount, int aPrefSampleRate);
- private native void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
-
- private native int getVideoPTS0(long moviePtr);
-
- private native int getAudioPTS0(long moviePtr);
- private native Buffer getAudioBuffer0(long moviePtr, int plane);
-
- /**
- * @return resulting current video PTS, or {@link TextureFrame#INVALID_PTS}
- */
- private native int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
-
- private native int play0(long moviePtr);
- private native int pause0(long moviePtr);
- private native int seek0(long moviePtr, int position);
-
- /** FFMPEG/libAV Audio Sample Format */
- public static enum SampleFormat {
- // NONE = -1,
- U8, ///< unsigned 8 bits
- S16, ///< signed 16 bits
- S32, ///< signed 32 bits
- FLT, ///< float
- DBL, ///< double
-
- U8P, ///< unsigned 8 bits, planar
- S16P, ///< signed 16 bits, planar
- S32P, ///< signed 32 bits, planar
- FLTP, ///< float, planar
- DBLP, ///< double, planar
-
- COUNT; ///< Number of sample formats.
-
- public static SampleFormat valueOf(int i) {
- for (SampleFormat fmt : SampleFormat.values()) {
- if(fmt.ordinal() == i) {
- return fmt;
- }
- }
- return null;
- }
- };
-
- /** FFMPEG/libAV Pixel Format */
- public static enum PixelFormat {
- // NONE= -1,
- YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
- YUYV422, ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
- RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB...
- BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
- YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
- YUV444P, ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
- YUV410P, ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
- YUV411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
- GRAY8, ///< Y , 8bpp
- MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
- MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
- PAL8, ///< 8 bit with RGB32 palette
- YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of YUV420P and setting color_range
- YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of YUV422P and setting color_range
- YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of YUV444P and setting color_range
- XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing
- XVMC_MPEG2_IDCT,
- UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
- UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
- BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
- BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
- BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
- RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
- RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
- RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
- NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
- NV21, ///< as above, but U and V bytes are swapped
-
- ARGB, ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
- RGBA, ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
- ABGR, ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
- BGRA, ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
-
- GRAY16BE, ///< Y , 16bpp, big-endian
- GRAY16LE, ///< Y , 16bpp, little-endian
- YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
- YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of YUV440P and setting color_range
- YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
- VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian
- RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian
-
- RGB565BE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
- RGB565LE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
- RGB555BE, ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0
- RGB555LE, ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0
-
- BGR565BE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
- BGR565LE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
- BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1
- BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1
-
- VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers
- VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers
- VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
-
- YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
- YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
- YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
- YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
- YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
- YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
- VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
- DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
-
- RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0
- RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
- BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
- BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
- Y400A, ///< 8bit gray, 8bit alpha
- BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
- BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
- YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
- YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
- YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
- YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
- YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
- YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
- YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
- YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
- YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
- YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
- YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
- YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
- VDA_VLD, ///< hardware decoding through VDA
- GBRP, ///< planar GBR 4:4:4 24bpp
- GBRP9BE, ///< planar GBR 4:4:4 27bpp, big endian
- GBRP9LE, ///< planar GBR 4:4:4 27bpp, little endian
- GBRP10BE, ///< planar GBR 4:4:4 30bpp, big endian
- GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian
- GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian
- GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian
- COUNT ///< number of pixel formats in this list
- ;
- public static PixelFormat valueOf(int i) {
- for (PixelFormat fmt : PixelFormat.values()) {
- if(fmt.ordinal() == i) {
- return fmt;
- }
- }
- return null;
- }
- }
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
new file mode 100644
index 000000000..5ff15564c
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
@@ -0,0 +1,188 @@
+package jogamp.opengl.util.av.impl;
+
+import com.jogamp.opengl.util.av.AudioSink;
+import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame;
+
+interface FFMPEGNatives {
+
+ boolean initSymbols0(long[] symbols, int count);
+ int getAvUtilMajorVersionCC0();
+ int getAvFormatMajorVersionCC0();
+ int getAvCodecMajorVersionCC0();
+ int getAvResampleMajorVersionCC0();
+ boolean initIDs0();
+
+ long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
+ void destroyInstance0(long moviePtr);
+
+ /**
+ * Issues {@link #updateAttributes(int, int, int, int, int, int, int, float, int, int, String, String)}
+ * and {@link #updateAttributes2(int, int, int, int, int, int, int, int, int, int)}.
+ * <p>
+ * Always uses {@link AudioSink.AudioFormat}:
+ * <pre>
+ * [type PCM, sampleRate [10000(?)..44100..48000], sampleSize 16, channelCount 1-2, signed, littleEndian]
+ * </pre>
+ * </p>
+ *
+ * @param moviePtr
+ * @param url
+ * @param vid
+ * @param aid
+ * @param aPrefChannelCount
+ * @param aPrefSampleRate
+ */
+ void setStream0(long moviePtr, String url, String inFormat, int vid, int aid, int aMaxChannelCount, int aPrefSampleRate);
+ void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
+
+ int getVideoPTS0(long moviePtr);
+
+ int getAudioPTS0(long moviePtr);
+
+ /**
+ * @return resulting current video PTS, or {@link TextureFrame#INVALID_PTS}
+ */
+ int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
+
+ int play0(long moviePtr);
+ int pause0(long moviePtr);
+ int seek0(long moviePtr, int position);
+
+ /** FFMPEG/libAV Audio Sample Format */
+ public static enum SampleFormat {
+ // NONE = -1,
+ U8, ///< unsigned 8 bits
+ S16, ///< signed 16 bits
+ S32, ///< signed 32 bits
+ FLT, ///< float
+ DBL, ///< double
+
+ U8P, ///< unsigned 8 bits, planar
+ S16P, ///< signed 16 bits, planar
+ S32P, ///< signed 32 bits, planar
+ FLTP, ///< float, planar
+ DBLP, ///< double, planar
+
+ COUNT; ///< Number of sample formats.
+
+ public static SampleFormat valueOf(int i) {
+ for (SampleFormat fmt : SampleFormat.values()) {
+ if(fmt.ordinal() == i) {
+ return fmt;
+ }
+ }
+ return null;
+ }
+ };
+
+ /** FFMPEG/libAV Pixel Format */
+ public static enum PixelFormat {
+ // NONE= -1,
+ YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
+ YUYV422, ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
+ RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB...
+ BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
+ YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
+ YUV444P, ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
+ YUV410P, ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
+ YUV411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
+ GRAY8, ///< Y , 8bpp
+ MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
+ MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
+ PAL8, ///< 8 bit with RGB32 palette
+ YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of YUV420P and setting color_range
+ YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of YUV422P and setting color_range
+ YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of YUV444P and setting color_range
+ XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing
+ XVMC_MPEG2_IDCT,
+ UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
+ UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
+ BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
+ BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
+ BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
+ RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
+ RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
+ RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
+ NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
+ NV21, ///< as above, but U and V bytes are swapped
+
+ ARGB, ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
+ RGBA, ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
+ ABGR, ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
+ BGRA, ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
+
+ GRAY16BE, ///< Y , 16bpp, big-endian
+ GRAY16LE, ///< Y , 16bpp, little-endian
+ YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
+ YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of YUV440P and setting color_range
+ YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
+ VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian
+ RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian
+
+ RGB565BE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
+ RGB565LE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
+ RGB555BE, ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), big-endian, most significant bit to 0
+ RGB555LE, ///< packed RGB 5:5:5, 16bpp, (msb)1A 5R 5G 5B(lsb), little-endian, most significant bit to 0
+
+ BGR565BE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
+ BGR565LE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
+ BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1
+ BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1
+
+ VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers
+ VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers
+ VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+
+ YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
+ YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
+ YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
+ YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
+ YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
+ YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
+ VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
+ DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
+
+ RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), little-endian, most significant bits to 0
+ RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
+ BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
+ BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
+ Y400A, ///< 8bit gray, 8bit alpha
+ BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
+ BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
+ YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
+ YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
+ YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
+ YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
+ YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
+ YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
+ YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
+ YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
+ YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
+ YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
+ YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
+ YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
+ VDA_VLD, ///< hardware decoding through VDA
+ GBRP, ///< planar GBR 4:4:4 24bpp
+ GBRP9BE, ///< planar GBR 4:4:4 27bpp, big endian
+ GBRP9LE, ///< planar GBR 4:4:4 27bpp, little endian
+ GBRP10BE, ///< planar GBR 4:4:4 30bpp, big endian
+ GBRP10LE, ///< planar GBR 4:4:4 30bpp, little endian
+ GBRP16BE, ///< planar GBR 4:4:4 48bpp, big endian
+ GBRP16LE, ///< planar GBR 4:4:4 48bpp, little endian
+ COUNT ///< number of pixel formats in this list
+ ;
+ public static PixelFormat valueOf(int i) {
+ for (PixelFormat fmt : PixelFormat.values()) {
+ if(fmt.ordinal() == i) {
+ return fmt;
+ }
+ }
+ return null;
+ }
+ }
+}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java
new file mode 100644
index 000000000..3e9c4bf36
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java
@@ -0,0 +1,15 @@
+package jogamp.opengl.util.av.impl;
+
+import com.jogamp.common.util.VersionNumber;
+
+class FFMPEGStaticNatives {
+ static VersionNumber getAVVersion(int vers) {
+ return new VersionNumber( ( vers >> 16 ) & 0xFF,
+ ( vers >> 8 ) & 0xFF,
+ ( vers >> 0 ) & 0xFF );
+ }
+ static native int getAvUtilVersion0(long func);
+ static native int getAvFormatVersion0(long func);
+ static native int getAvCodecVersion0(long func);
+ static native int getAvResampleVersion0(long func);
+}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
new file mode 100644
index 000000000..2a4d20f37
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
@@ -0,0 +1,51 @@
+package jogamp.opengl.util.av.impl;
+
+class FFMPEGv08Natives implements FFMPEGNatives {
+ @Override
+ public native boolean initSymbols0(long[] symbols, int count);
+
+ @Override
+ public native int getAvUtilMajorVersionCC0();
+
+ @Override
+ public native int getAvFormatMajorVersionCC0();
+
+ @Override
+ public native int getAvCodecMajorVersionCC0();
+
+ @Override
+ public native int getAvResampleMajorVersionCC0();
+
+ @Override
+ public native boolean initIDs0();
+
+ @Override
+ public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
+
+ @Override
+ public native void destroyInstance0(long moviePtr);
+
+ @Override
+ public native void setStream0(long moviePtr, String url, String inFormat, int vid, int aid, int aMaxChannelCount, int aPrefSampleRate);
+
+ @Override
+ public native void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
+
+ @Override
+ public native int getVideoPTS0(long moviePtr);
+
+ @Override
+ public native int getAudioPTS0(long moviePtr);
+
+ @Override
+ public native int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
+
+ @Override
+ public native int play0(long moviePtr);
+
+ @Override
+ public native int pause0(long moviePtr);
+
+ @Override
+ public native int seek0(long moviePtr, int position);
+}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java
new file mode 100644
index 000000000..b250fbac8
--- /dev/null
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java
@@ -0,0 +1,51 @@
+package jogamp.opengl.util.av.impl;
+
+class FFMPEGv09Natives implements FFMPEGNatives {
+ @Override
+ public native boolean initSymbols0(long[] symbols, int count);
+
+ @Override
+ public native int getAvUtilMajorVersionCC0();
+
+ @Override
+ public native int getAvFormatMajorVersionCC0();
+
+ @Override
+ public native int getAvCodecMajorVersionCC0();
+
+ @Override
+ public native int getAvResampleMajorVersionCC0();
+
+ @Override
+ public native boolean initIDs0();
+
+ @Override
+ public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
+
+ @Override
+ public native void destroyInstance0(long moviePtr);
+
+ @Override
+ public native void setStream0(long moviePtr, String url, String inFormat, int vid, int aid, int aMaxChannelCount, int aPrefSampleRate);
+
+ @Override
+ public native void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
+
+ @Override
+ public native int getVideoPTS0(long moviePtr);
+
+ @Override
+ public native int getAudioPTS0(long moviePtr);
+
+ @Override
+ public native int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
+
+ @Override
+ public native int play0(long moviePtr);
+
+ @Override
+ public native int pause0(long moviePtr);
+
+ @Override
+ public native int seek0(long moviePtr, int position);
+}
diff --git a/src/jogl/native/libav/ffmpeg_tool.h b/src/jogl/native/libav/ffmpeg_tool.h
index a44bbb39a..d62cff60f 100644
--- a/src/jogl/native/libav/ffmpeg_tool.h
+++ b/src/jogl/native/libav/ffmpeg_tool.h
@@ -29,6 +29,7 @@
#ifndef _FFMPEG_TOOL_H
#define _FFMPEG_TOOL_H
+/***
#ifdef _WIN32
#include <windows.h>
// __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
@@ -41,13 +42,15 @@
#include <gluegen_stddef.h>
#include <gluegen_stdint.h>
-#include <libavcodec/avcodec.h>
-#include <libavformat/avformat.h>
-#include <libavutil/avutil.h>
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+#include "libavutil/avutil.h"
#if LIBAVCODEC_VERSION_MAJOR >= 54
-#include <libavresample/avresample.h>
+#include "libavresample/avresample.h"
#endif
+*/
+
#ifndef LIBAVRESAMPLE_VERSION_MAJOR
#define LIBAVRESAMPLE_VERSION_MAJOR 0
typedef void* AVAudioResampleContext;
@@ -122,6 +125,7 @@ typedef struct {
typedef struct {
+ jobject ffmpegMediaPlayer;
int32_t verbose;
uint32_t avcodecVersion;
diff --git a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGStaticNatives.c b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGStaticNatives.c
new file mode 100644
index 000000000..ee7f3f47d
--- /dev/null
+++ b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGStaticNatives.c
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2013 JogAmp Community. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the
+ * authors and should not be interpreted as representing official policies, either expressed
+ * or implied, of JogAmp Community.
+ */
+
+#ifdef _WIN32
+ #include <windows.h>
+ // __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
+
+ #define usleep(t) Sleep((t) / 1000)
+#endif
+
+#include <gluegen_stdint.h>
+#include <gluegen_inttypes.h>
+#include <gluegen_stddef.h>
+#include <gluegen_stdint.h>
+
+#include "jogamp_opengl_util_av_impl_FFMPEGStaticNatives.h"
+
+#include "JoglCommon.h"
+
+#include <GL/gl.h>
+
+typedef unsigned (APIENTRYP AV_GET_VERSION)(void);
+
+JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGStaticNatives_getAvUtilVersion0
+ (JNIEnv *env, jclass clazz, jlong func) {
+ if( 0 != func ) {
+ return (jint) ((AV_GET_VERSION)func)();
+ } else {
+ return 0;
+ }
+}
+
+JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGStaticNatives_getAvFormatVersion0
+ (JNIEnv *env, jclass clazz, jlong func) {
+ if( 0 != func ) {
+ return (jint) ((AV_GET_VERSION)func)();
+ } else {
+ return 0;
+ }
+}
+
+JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGStaticNatives_getAvCodecVersion0
+ (JNIEnv *env, jclass clazz, jlong func) {
+ if( 0 != func ) {
+ return (jint) ((AV_GET_VERSION)func)();
+ } else {
+ return 0;
+ }
+}
+
+JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGStaticNatives_getAvResampleVersion0
+ (JNIEnv *env, jclass clazz, jlong func) {
+ if( 0 != func ) {
+ return (jint) ((AV_GET_VERSION)func)();
+ } else {
+ return 0;
+ }
+}
+
diff --git a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGvXXNatives.c
index cfbb604e4..54615c4b9 100644
--- a/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.c
+++ b/src/jogl/native/libav/jogamp_opengl_util_av_impl_FFMPEGvXXNatives.c
@@ -26,16 +26,18 @@
* or implied, of JogAmp Community.
*/
-#include "jogamp_opengl_util_av_impl_FFMPEGMediaPlayer.h"
+// #define FF_FUNC(METHOD) Java_jogamp_opengl_util_av_impl_FFMPEGv08 ## METHOD
#include "JoglCommon.h"
#include "ffmpeg_tool.h"
-#include <libavutil/pixdesc.h>
-#include <libavutil/samplefmt.h>
+/**
+#include "libavutil/pixdesc.h"
+#include "libavutil/samplefmt.h"
#if LIBAVUTIL_VERSION_MAJOR < 53
- #include <libavutil/audioconvert.h>
- // 52: #include <libavutil/channel_layout.h>
+ #include "libavutil/audioconvert.h"
+ // 52: #include "libavutil/channel_layout.h"
#endif
+*/
#include <GL/gl.h>
static const char * const ClazzNameFFMPEGMediaPlayer = "jogamp/opengl/util/av/impl/FFMPEGMediaPlayer";
@@ -170,14 +172,14 @@ static AVRESAMPLE_CONVERT sp_avresample_convert;
#define SYMBOL_COUNT 51
-JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGDynamicLibraryBundleInfo_initSymbols0
- (JNIEnv *env, jclass clazz, jobject jSymbols, jint count)
+JNIEXPORT jboolean JNICALL FF_FUNC(initSymbols0)
+ (JNIEnv *env, jobject instance, jobject jSymbols, jint count)
{
int64_t* symbols; // jlong -> int64_t -> intptr_t -> FUNC_PTR
int i;
if(SYMBOL_COUNT != count) {
- fprintf(stderr, "FFMPEGDynamicLibraryBundleInfo.initSymbols0: Wrong symbol count: Expected %d, Is %d\n",
+ fprintf(stderr, "FFMPEGNatives.initSymbols0: Wrong symbol count: Expected %d, Is %d\n",
SYMBOL_COUNT, count);
return JNI_FALSE;
}
@@ -251,7 +253,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGDynamicLibraryB
if(SYMBOL_COUNT != i) {
// boom
- fprintf(stderr, "FFMPEGDynamicLibraryBundleInfo.initSymbols0: Wrong symbol assignment count: Expected %d, Is %d\n",
+ fprintf(stderr, "FFMPEGNatives.initSymbols0: Wrong symbol assignment count: Expected %d, Is %d\n",
SYMBOL_COUNT, i);
return JNI_FALSE;
}
@@ -259,9 +261,9 @@ JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGDynamicLibraryB
return JNI_TRUE;
}
-static int _isAudioFormatSupported(JNIEnv *env, jobject instance, enum AVSampleFormat aSampleFmt, int32_t aSampleRate, int32_t aChannels)
+static int _isAudioFormatSupported(JNIEnv *env, jobject ffmpegMediaPlayer, enum AVSampleFormat aSampleFmt, int32_t aSampleRate, int32_t aChannels)
{
- return JNI_TRUE == (*env)->CallBooleanMethod(env, instance, jni_mid_isAudioFormatSupported, aSampleFmt, aSampleRate, aChannels);
+ return JNI_TRUE == (*env)->CallBooleanMethod(env, ffmpegMediaPlayer, jni_mid_isAudioFormatSupported, aSampleFmt, aSampleRate, aChannels);
}
static void _updateJavaAttributes(JNIEnv *env, jobject instance, FFMPEGToolBasicAV_t* pAV)
{
@@ -276,13 +278,13 @@ static void _updateJavaAttributes(JNIEnv *env, jobject instance, FFMPEGToolBasic
w = 0; h = 0;
}
- (*env)->CallVoidMethod(env, instance, jni_mid_updateAttributes2,
+ (*env)->CallVoidMethod(env, pAV->ffmpegMediaPlayer, jni_mid_updateAttributes2,
pAV->vPixFmt, pAV->vBufferPlanes,
pAV->vBitsPerPixel, pAV->vBytesPerPixelPerPlane,
pAV->vLinesize[0], pAV->vLinesize[1], pAV->vLinesize[2],
pAV->vTexWidth[0], pAV->vTexWidth[1], pAV->vTexWidth[2], h,
pAV->aSampleFmtOut, pAV->aSampleRateOut, pAV->aChannelsOut, pAV->aFrameSize);
- (*env)->CallVoidMethod(env, instance, jni_mid_updateAttributes1,
+ (*env)->CallVoidMethod(env, pAV->ffmpegMediaPlayer, jni_mid_updateAttributes1,
pAV->vid, pAV->aid,
w, h,
pAV->bps_stream, pAV->bps_video, pAV->bps_audio,
@@ -366,6 +368,10 @@ static void freeInstance(JNIEnv *env, FFMPEGToolBasicAV_t* pAV) {
}
pAV->pFormatCtx = NULL;
}
+ if( NULL != pAV->ffmpegMediaPlayer ) {
+ (*env)->DeleteGlobalRef(env, pAV->ffmpegMediaPlayer);
+ pAV->ffmpegMediaPlayer = NULL;
+ }
free(pAV);
}
}
@@ -407,48 +413,28 @@ static enum PixelFormat my_get_format(struct AVCodecContext *s, const enum Pixel
}
#endif
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvUtilVersion0
- (JNIEnv *env, jclass clazz) {
- return (jint) sp_avutil_version();
-}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvUtilMajorVersionCC0
- (JNIEnv *env, jclass clazz) {
+JNIEXPORT jint JNICALL FF_FUNC(getAvUtilMajorVersionCC0)
+ (JNIEnv *env, jobject instance) {
return (jint) LIBAVUTIL_VERSION_MAJOR;
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvFormatVersion0
- (JNIEnv *env, jclass clazz) {
- return (jint) sp_avformat_version();
-}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvFormatMajorVersionCC0
- (JNIEnv *env, jclass clazz) {
+JNIEXPORT jint JNICALL FF_FUNC(getAvFormatMajorVersionCC0)
+ (JNIEnv *env, jobject instance) {
return (jint) LIBAVFORMAT_VERSION_MAJOR;
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvCodecVersion0
- (JNIEnv *env, jclass clazz) {
- return (jint) sp_avcodec_version();
-}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvCodecMajorVersionCC0
- (JNIEnv *env, jclass clazz) {
+JNIEXPORT jint JNICALL FF_FUNC(getAvCodecMajorVersionCC0)
+ (JNIEnv *env, jobject instance) {
return (jint) LIBAVCODEC_VERSION_MAJOR;
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvResampleVersion0
- (JNIEnv *env, jclass clazz) {
- if(HAS_FUNC(sp_avresample_version)) {
- return (jint) sp_avresample_version();
- } else {
- return 0;
- }
-}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAvResampleMajorVersionCC0
- (JNIEnv *env, jclass clazz) {
+JNIEXPORT jint JNICALL FF_FUNC(getAvResampleMajorVersionCC0)
+ (JNIEnv *env, jobject instance) {
return (jint) LIBAVRESAMPLE_VERSION_MAJOR;
}
-JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_initIDs0
- (JNIEnv *env, jclass clazz)
+JNIEXPORT jboolean JNICALL FF_FUNC(initIDs0)
+ (JNIEnv *env, jobject instance)
{
JoglCommon_init(env);
@@ -481,8 +467,8 @@ JNIEXPORT jboolean JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_ini
return JNI_TRUE;
}
-JNIEXPORT jlong JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_createInstance0
- (JNIEnv *env, jobject instance, jboolean verbose)
+JNIEXPORT jlong JNICALL FF_FUNC(createInstance0)
+ (JNIEnv *env, jobject instance, jobject ffmpegMediaPlayer, jboolean verbose)
{
FFMPEGToolBasicAV_t * pAV = calloc(1, sizeof(FFMPEGToolBasicAV_t));
if(NULL==pAV) {
@@ -515,6 +501,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_create
sp_avformat_network_init();
}
+ pAV->ffmpegMediaPlayer = (*env)->NewGlobalRef(env, ffmpegMediaPlayer);
pAV->verbose = verbose;
pAV->vid=AV_STREAM_ID_AUTO;
pAV->aid=AV_STREAM_ID_AUTO;
@@ -522,7 +509,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_create
return (jlong) (intptr_t) pAV;
}
-JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_destroyInstance0
+JNIEXPORT void JNICALL FF_FUNC(destroyInstance0)
(JNIEnv *env, jobject instance, jlong ptr)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
@@ -549,7 +536,7 @@ static uint64_t getDefaultAudioChannelLayout(int channelCount) {
static void initPTSStats(PTSStats *ptsStats);
static int64_t evalPTS(PTSStats *ptsStats, int64_t inPTS, int64_t inDTS);
-JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_setStream0
+JNIEXPORT void JNICALL FF_FUNC(setStream0)
(JNIEnv *env, jobject instance, jlong ptr, jstring jURL, jstring jInFmtStr, jint vid, jint aid,
jint aMaxChannelCount, jint aPrefSampleRate)
{
@@ -716,7 +703,7 @@ JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_setStre
pAV->aFrameSize = pAV->pACodecCtx->frame_size; // in samples per channel!
pAV->aSampleFmt = pAV->pACodecCtx->sample_fmt;
pAV->frames_audio = pAV->pAStream->nb_frames;
- pAV->aSinkSupport = _isAudioFormatSupported(env, instance, pAV->aSampleFmt, pAV->aSampleRate, pAV->aChannels);
+ pAV->aSinkSupport = _isAudioFormatSupported(env, pAV->ffmpegMediaPlayer, pAV->aSampleFmt, pAV->aSampleRate, pAV->aChannels);
if( pAV->verbose ) {
fprintf(stderr, "A channels %d [l %d], sample_rate %d, frame_size %d, frame_number %d, r_frame_rate %f, avg_frame_rate %f, nb_frames %d, [maxChan %d, prefRate %d, req_chan_layout %d, req_chan %d], sink-support %d \n",
pAV->aChannels, pAV->pACodecCtx->channel_layout, pAV->aSampleRate, pAV->aFrameSize, pAV->pACodecCtx->frame_number,
@@ -746,11 +733,11 @@ JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_setStre
int32_t aSampleRateOut;
int32_t minChannelCount = MIN_INT(aMaxChannelCount,pAV->pACodecCtx->channels);
- if( _isAudioFormatSupported(env, instance, aSampleFmtOut, aPrefSampleRate, pAV->pACodecCtx->channels) ) {
+ if( _isAudioFormatSupported(env, pAV->ffmpegMediaPlayer, aSampleFmtOut, aPrefSampleRate, pAV->pACodecCtx->channels) ) {
aChannelsOut = pAV->pACodecCtx->channels;
aSampleRateOut = aPrefSampleRate;
aSinkSupport = 1;
- } else if( _isAudioFormatSupported(env, instance, aSampleFmtOut, aPrefSampleRate, minChannelCount) ) {
+ } else if( _isAudioFormatSupported(env, pAV->ffmpegMediaPlayer, aSampleFmtOut, aPrefSampleRate, minChannelCount) ) {
aChannelsOut = minChannelCount;
aSampleRateOut = aPrefSampleRate;
aSinkSupport = 1;
@@ -898,7 +885,7 @@ JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_setStre
_updateJavaAttributes(env, instance, pAV);
}
-JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_setGLFuncs0
+JNIEXPORT void JNICALL FF_FUNC(setGLFuncs0)
(JNIEnv *env, jobject instance, jlong ptr, jlong jProcAddrGLTexSubImage2D, jlong jProcAddrGLGetError, jlong jProcAddrGLFlush, jlong jProcAddrGLFinish)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
@@ -916,7 +903,7 @@ JNIEXPORT void JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_setGLFu
#define DBG_TEXSUBIMG2D_b(p)
#endif
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_readNextPacket0
+JNIEXPORT jint JNICALL FF_FUNC(readNextPacket0)
(JNIEnv *env, jobject instance, jlong ptr, jint texTarget, jint texFmt, jint texType)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
@@ -961,7 +948,7 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_readNex
#if 0
len1 = sp_avcodec_decode_audio3(pAV->pACodecCtx, int16_t *samples, int *frame_size_ptr, &frameDecoded, &packet);
#endif
- JoglCommon_throwNewRuntimeException(env, "Unimplemented: FFMPEGMediaPlayer sp_avcodec_decode_audio3 fallback");
+ JoglCommon_throwNewRuntimeException(env, "Unimplemented: FFMPEGNatives sp_avcodec_decode_audio3 fallback");
return 0;
}
if (len1 < 0) {
@@ -1066,7 +1053,7 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_readNex
pNIOBufferCurrent->origPtr, pNIOBufferCurrent->nioRef, pNIOBufferCurrent->size);
}
}
- (*env)->CallVoidMethod(env, instance, jni_mid_pushSound, pNIOBufferCurrent->nioRef, data_size, pAV->aPTS);
+ (*env)->CallVoidMethod(env, pAV->ffmpegMediaPlayer, jni_mid_pushSound, pNIOBufferCurrent->nioRef, data_size, pAV->aPTS);
}
}
} else if(packet.stream_index==pAV->vid) {
@@ -1197,20 +1184,20 @@ static int64_t evalPTS(PTSStats *ptsStats, int64_t inPTS, int64_t inDTS) {
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_play0
+JNIEXPORT jint JNICALL FF_FUNC(play0)
(JNIEnv *env, jobject instance, jlong ptr)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
return sp_av_read_play(pAV->pFormatCtx);
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_pause0
+JNIEXPORT jint JNICALL FF_FUNC(pause0)
(JNIEnv *env, jobject instance, jlong ptr)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
return sp_av_read_pause(pAV->pFormatCtx);
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_seek0
+JNIEXPORT jint JNICALL FF_FUNC(seek0)
(JNIEnv *env, jobject instance, jlong ptr, jint pos1)
{
const FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
@@ -1267,14 +1254,14 @@ JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_seek0
return rPTS;
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getVideoPTS0
+JNIEXPORT jint JNICALL FF_FUNC(getVideoPTS0)
(JNIEnv *env, jobject instance, jlong ptr)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
return pAV->vPTS;
}
-JNIEXPORT jint JNICALL Java_jogamp_opengl_util_av_impl_FFMPEGMediaPlayer_getAudioPTS0
+JNIEXPORT jint JNICALL FF_FUNC(getAudioPTS0)
(JNIEnv *env, jobject instance, jlong ptr)
{
FFMPEGToolBasicAV_t *pAV = (FFMPEGToolBasicAV_t *)((void *)((intptr_t)ptr));
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/jogamp_opengl_util_av_impl_FFMPEGv08Natives.c b/src/jogl/native/libav/lavc53.lavf53.lavu51/jogamp_opengl_util_av_impl_FFMPEGv08Natives.c
new file mode 100644
index 000000000..217ca8cc4
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/jogamp_opengl_util_av_impl_FFMPEGv08Natives.c
@@ -0,0 +1,31 @@
+#ifdef _WIN32
+ #include <windows.h>
+ // __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
+
+ #define usleep(t) Sleep((t) / 1000)
+#endif
+
+#include <gluegen_stdint.h>
+#include <gluegen_inttypes.h>
+#include <gluegen_stddef.h>
+#include <gluegen_stdint.h>
+
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+#include "libavutil/avutil.h"
+#if LIBAVCODEC_VERSION_MAJOR >= 54
+#include "libavresample/avresample.h"
+#endif
+
+#include "libavutil/pixdesc.h"
+#include "libavutil/samplefmt.h"
+#if LIBAVUTIL_VERSION_MAJOR < 53
+ #include "libavutil/audioconvert.h"
+ // 52: #include "libavutil/channel_layout.h"
+#endif
+
+#include "jogamp_opengl_util_av_impl_FFMPEGv08Natives.h"
+
+#define FF_FUNC(METHOD) Java_jogamp_opengl_util_av_impl_FFMPEGv08Natives_ ## METHOD
+
+#include "../jogamp_opengl_util_av_impl_FFMPEGvXXNatives.c"
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/avcodec.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/avcodec.h
index 2451294c1..2451294c1 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/avcodec.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/avcodec.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/avfft.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/avfft.h
index 91fe2f429..91fe2f429 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/avfft.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/avfft.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/dxva2.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/dxva2.h
index 374ae039a..374ae039a 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/dxva2.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/dxva2.h
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavcodec b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavcodec
new file mode 120000
index 000000000..1bd140d57
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavcodec
@@ -0,0 +1 @@
+../libavcodec \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavutil b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/opt.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/opt.h
index 2380e7433..2380e7433 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/opt.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/opt.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vaapi.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vaapi.h
index 36fb386ac..36fb386ac 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vaapi.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vaapi.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vda.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vda.h
index 2cb51c5f5..2cb51c5f5 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vda.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vda.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vdpau.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vdpau.h
index 6f1386067..6f1386067 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/vdpau.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/vdpau.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/version.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/version.h
index 77e16823f..77e16823f 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/version.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/version.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/xvmc.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/xvmc.h
index 1239015fc..1239015fc 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavcodec/xvmc.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavcodec/xvmc.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/avformat.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/avformat.h
index 22a89d3cd..22a89d3cd 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/avformat.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/avformat.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/avio.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/avio.h
index 78935d941..78935d941 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/avio.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/avio.h
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavcodec b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavcodec
new file mode 120000
index 000000000..1bd140d57
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavcodec
@@ -0,0 +1 @@
+../libavcodec \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavformat b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavformat
new file mode 120000
index 000000000..2b9647693
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavformat
@@ -0,0 +1 @@
+../libavformat \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavutil b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/version.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/version.h
index 009a60b1a..009a60b1a 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavformat/version.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavformat/version.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/adler32.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/adler32.h
index a8ff6f9d4..a8ff6f9d4 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/adler32.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/adler32.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/aes.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/aes.h
index cf7b46209..cf7b46209 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/aes.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/aes.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/attributes.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/attributes.h
index ef990a1d4..ef990a1d4 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/attributes.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/attributes.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/audioconvert.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/audioconvert.h
index 00ed0ff7b..00ed0ff7b 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/audioconvert.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/audioconvert.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avassert.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avassert.h
index b223d26e8..b223d26e8 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avassert.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avassert.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avconfig.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avconfig.h
index f10aa6186..f10aa6186 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avconfig.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avconfig.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avstring.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avstring.h
index ed4e465cb..ed4e465cb 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avstring.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avstring.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avutil.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avutil.h
index 05e924837..05e924837 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/avutil.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/avutil.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/base64.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/base64.h
index 4750cf5c7..4750cf5c7 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/base64.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/base64.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/bswap.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/bswap.h
index 8a350e1cd..8a350e1cd 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/bswap.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/bswap.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/common.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/common.h
index c99d85847..c99d85847 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/common.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/common.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/cpu.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/cpu.h
index df7bf4421..df7bf4421 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/cpu.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/cpu.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/crc.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/crc.h
index a93411941..a93411941 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/crc.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/crc.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/dict.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/dict.h
index 6e28b6140..6e28b6140 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/dict.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/dict.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/error.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/error.h
index 11bcc5c4c..11bcc5c4c 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/error.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/error.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/eval.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/eval.h
index ccb29e7a3..ccb29e7a3 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/eval.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/eval.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/fifo.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/fifo.h
index f10623930..f10623930 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/fifo.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/fifo.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/file.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/file.h
index c481c37f9..c481c37f9 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/file.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/file.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/imgutils.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/imgutils.h
index 3815a49ae..3815a49ae 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/imgutils.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/imgutils.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intfloat.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intfloat.h
index 9db624a6c..9db624a6c 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intfloat.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intfloat.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intfloat_readwrite.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intfloat_readwrite.h
index f093b92cd..f093b92cd 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intfloat_readwrite.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intfloat_readwrite.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intreadwrite.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intreadwrite.h
index 01eb27804..01eb27804 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/intreadwrite.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/intreadwrite.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/lfg.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/lfg.h
index 904d00a66..904d00a66 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/lfg.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/lfg.h
diff --git a/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/libavutil b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/log.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/log.h
index 0678e1a3b..0678e1a3b 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/log.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/log.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/lzo.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/lzo.h
index 1b774a53b..1b774a53b 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/lzo.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/lzo.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/mathematics.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/mathematics.h
index 0b072ebe6..0b072ebe6 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/mathematics.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/mathematics.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/md5.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/md5.h
index 1412ee240..1412ee240 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/md5.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/md5.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/mem.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/mem.h
index cd8490b2d..cd8490b2d 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/mem.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/mem.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/opt.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/opt.h
index 19549408e..19549408e 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/opt.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/opt.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/parseutils.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/parseutils.h
index 0844abb2f..0844abb2f 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/parseutils.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/parseutils.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/pixdesc.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/pixdesc.h
index b5972c78f..b5972c78f 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/pixdesc.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/pixdesc.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/pixfmt.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/pixfmt.h
index bd898bdc8..bd898bdc8 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/pixfmt.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/pixfmt.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/random_seed.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/random_seed.h
index b1fad13d0..b1fad13d0 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/random_seed.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/random_seed.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/rational.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/rational.h
index 0ec18ec96..0ec18ec96 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/rational.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/rational.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/samplefmt.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/samplefmt.h
index b6715561d..b6715561d 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/samplefmt.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/samplefmt.h
diff --git a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/sha.h b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/sha.h
index 8350954c4..8350954c4 100644
--- a/make/stub_includes/libav/lavc53.lavf53.lavu51/libavutil/sha.h
+++ b/src/jogl/native/libav/lavc53.lavf53.lavu51/libavutil/sha.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/jogamp_opengl_util_av_impl_FFMPEGv09Natives.c b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/jogamp_opengl_util_av_impl_FFMPEGv09Natives.c
new file mode 100644
index 000000000..53f72754f
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/jogamp_opengl_util_av_impl_FFMPEGv09Natives.c
@@ -0,0 +1,31 @@
+#ifdef _WIN32
+ #include <windows.h>
+ // __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
+
+ #define usleep(t) Sleep((t) / 1000)
+#endif
+
+#include <gluegen_stdint.h>
+#include <gluegen_inttypes.h>
+#include <gluegen_stddef.h>
+#include <gluegen_stdint.h>
+
+#include "libavcodec/avcodec.h"
+#include "libavformat/avformat.h"
+#include "libavutil/avutil.h"
+#if LIBAVCODEC_VERSION_MAJOR >= 54
+#include "libavresample/avresample.h"
+#endif
+
+#include "libavutil/pixdesc.h"
+#include "libavutil/samplefmt.h"
+#if LIBAVUTIL_VERSION_MAJOR < 53
+ #include "libavutil/audioconvert.h"
+ // 52: #include "libavutil/channel_layout.h"
+#endif
+
+#include "jogamp_opengl_util_av_impl_FFMPEGv09Natives.h"
+
+#define FF_FUNC(METHOD) Java_jogamp_opengl_util_av_impl_FFMPEGv09Natives_ ## METHOD
+
+#include "../jogamp_opengl_util_av_impl_FFMPEGvXXNatives.c"
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avcodec.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avcodec.h
index e6b8ec626..e6b8ec626 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avcodec.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avcodec.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avfft.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avfft.h
index b89618258..b89618258 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avfft.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/avfft.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/dxva2.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/dxva2.h
index c06f1f333..c06f1f333 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/dxva2.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/dxva2.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavcodec b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavcodec
new file mode 120000
index 000000000..1bd140d57
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavcodec
@@ -0,0 +1 @@
+../libavcodec \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavutil b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/old_codec_ids.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/old_codec_ids.h
index 2b72e38d2..2b72e38d2 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/old_codec_ids.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/old_codec_ids.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vaapi.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vaapi.h
index 39e88259d..39e88259d 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vaapi.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vaapi.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vda.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vda.h
index f0ec2bfec..f0ec2bfec 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vda.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vda.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vdpau.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vdpau.h
index 241ff1905..241ff1905 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vdpau.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/vdpau.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/version.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/version.h
index 348ce99f2..348ce99f2 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/version.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/version.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/xvmc.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/xvmc.h
index 1f77e4efc..1f77e4efc 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/xvmc.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavcodec/xvmc.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avformat.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avformat.h
index 149b66f1c..149b66f1c 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avformat.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avformat.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avio.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avio.h
index b6d3cb33b..b6d3cb33b 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avio.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/avio.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavcodec b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavcodec
new file mode 120000
index 000000000..1bd140d57
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavcodec
@@ -0,0 +1 @@
+../libavcodec \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavformat b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavformat
new file mode 120000
index 000000000..2b9647693
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavformat
@@ -0,0 +1 @@
+../libavformat \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavutil b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/version.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/version.h
index c2c1e3a8d..c2c1e3a8d 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavformat/version.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavformat/version.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/avresample.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/avresample.h
new file mode 100644
index 000000000..001278740
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/avresample.h
@@ -0,0 +1,379 @@
+/*
+ * Copyright (c) 2012 Justin Ruggles <[email protected]>
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVRESAMPLE_AVRESAMPLE_H
+#define AVRESAMPLE_AVRESAMPLE_H
+
+/**
+ * @file
+ * @ingroup lavr
+ * external API header
+ */
+
+/**
+ * @defgroup lavr Libavresample
+ * @{
+ *
+ * Libavresample (lavr) is a library that handles audio resampling, sample
+ * format conversion and mixing.
+ *
+ * Interaction with lavr is done through AVAudioResampleContext, which is
+ * allocated with avresample_alloc_context(). It is opaque, so all parameters
+ * must be set with the @ref avoptions API.
+ *
+ * For example the following code will setup conversion from planar float sample
+ * format to interleaved signed 16-bit integer, downsampling from 48kHz to
+ * 44.1kHz and downmixing from 5.1 channels to stereo (using the default mixing
+ * matrix):
+ * @code
+ * AVAudioResampleContext *avr = avresample_alloc_context();
+ * av_opt_set_int(avr, "in_channel_layout", AV_CH_LAYOUT_5POINT1, 0);
+ * av_opt_set_int(avr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0);
+ * av_opt_set_int(avr, "in_sample_rate", 48000, 0);
+ * av_opt_set_int(avr, "out_sample_rate", 44100, 0);
+ * av_opt_set_int(avr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0);
+ * av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
+ * @endcode
+ *
+ * Once the context is initialized, it must be opened with avresample_open(). If
+ * you need to change the conversion parameters, you must close the context with
+ * avresample_close(), change the parameters as described above, then reopen it
+ * again.
+ *
+ * The conversion itself is done by repeatedly calling avresample_convert().
+ * Note that the samples may get buffered in two places in lavr. The first one
+ * is the output FIFO, where the samples end up if the output buffer is not
+ * large enough. The data stored in there may be retrieved at any time with
+ * avresample_read(). The second place is the resampling delay buffer,
+ * applicable only when resampling is done. The samples in it require more input
+ * before they can be processed. Their current amount is returned by
+ * avresample_get_delay(). At the end of conversion the resampling buffer can be
+ * flushed by calling avresample_convert() with NULL input.
+ *
+ * The following code demonstrates the conversion loop assuming the parameters
+ * from above and caller-defined functions get_input() and handle_output():
+ * @code
+ * uint8_t **input;
+ * int in_linesize, in_samples;
+ *
+ * while (get_input(&input, &in_linesize, &in_samples)) {
+ * uint8_t *output
+ * int out_linesize;
+ * int out_samples = avresample_available(avr) +
+ * av_rescale_rnd(avresample_get_delay(avr) +
+ * in_samples, 44100, 48000, AV_ROUND_UP);
+ * av_samples_alloc(&output, &out_linesize, 2, out_samples,
+ * AV_SAMPLE_FMT_S16, 0);
+ * out_samples = avresample_convert(avr, &output, out_linesize, out_samples,
+ * input, in_linesize, in_samples);
+ * handle_output(output, out_linesize, out_samples);
+ * av_freep(&output);
+ * }
+ * @endcode
+ *
+ * When the conversion is finished and the FIFOs are flushed if required, the
+ * conversion context and everything associated with it must be freed with
+ * avresample_free().
+ */
+
+#include "libavutil/avutil.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/dict.h"
+#include "libavutil/log.h"
+
+#include "libavresample/version.h"
+
+#define AVRESAMPLE_MAX_CHANNELS 32
+
+typedef struct AVAudioResampleContext AVAudioResampleContext;
+
+/** Mixing Coefficient Types */
+enum AVMixCoeffType {
+ AV_MIX_COEFF_TYPE_Q8, /** 16-bit 8.8 fixed-point */
+ AV_MIX_COEFF_TYPE_Q15, /** 32-bit 17.15 fixed-point */
+ AV_MIX_COEFF_TYPE_FLT, /** floating-point */
+ AV_MIX_COEFF_TYPE_NB, /** Number of coeff types. Not part of ABI */
+};
+
+/** Resampling Filter Types */
+enum AVResampleFilterType {
+ AV_RESAMPLE_FILTER_TYPE_CUBIC, /**< Cubic */
+ AV_RESAMPLE_FILTER_TYPE_BLACKMAN_NUTTALL, /**< Blackman Nuttall Windowed Sinc */
+ AV_RESAMPLE_FILTER_TYPE_KAISER, /**< Kaiser Windowed Sinc */
+};
+
+enum AVResampleDitherMethod {
+ AV_RESAMPLE_DITHER_NONE, /**< Do not use dithering */
+ AV_RESAMPLE_DITHER_RECTANGULAR, /**< Rectangular Dither */
+ AV_RESAMPLE_DITHER_TRIANGULAR, /**< Triangular Dither*/
+ AV_RESAMPLE_DITHER_TRIANGULAR_HP, /**< Triangular Dither with High Pass */
+ AV_RESAMPLE_DITHER_TRIANGULAR_NS, /**< Triangular Dither with Noise Shaping */
+ AV_RESAMPLE_DITHER_NB, /**< Number of dither types. Not part of ABI. */
+};
+
+/**
+ * Return the LIBAVRESAMPLE_VERSION_INT constant.
+ */
+unsigned avresample_version(void);
+
+/**
+ * Return the libavresample build-time configuration.
+ * @return configure string
+ */
+const char *avresample_configuration(void);
+
+/**
+ * Return the libavresample license.
+ */
+const char *avresample_license(void);
+
+/**
+ * Get the AVClass for AVAudioResampleContext.
+ *
+ * Can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options
+ * without allocating a context.
+ *
+ * @see av_opt_find().
+ *
+ * @return AVClass for AVAudioResampleContext
+ */
+const AVClass *avresample_get_class(void);
+
+/**
+ * Allocate AVAudioResampleContext and set options.
+ *
+ * @return allocated audio resample context, or NULL on failure
+ */
+AVAudioResampleContext *avresample_alloc_context(void);
+
+/**
+ * Initialize AVAudioResampleContext.
+ *
+ * @param avr audio resample context
+ * @return 0 on success, negative AVERROR code on failure
+ */
+int avresample_open(AVAudioResampleContext *avr);
+
+/**
+ * Close AVAudioResampleContext.
+ *
+ * This closes the context, but it does not change the parameters. The context
+ * can be reopened with avresample_open(). It does, however, clear the output
+ * FIFO and any remaining leftover samples in the resampling delay buffer. If
+ * there was a custom matrix being used, that is also cleared.
+ *
+ * @see avresample_convert()
+ * @see avresample_set_matrix()
+ *
+ * @param avr audio resample context
+ */
+void avresample_close(AVAudioResampleContext *avr);
+
+/**
+ * Free AVAudioResampleContext and associated AVOption values.
+ *
+ * This also calls avresample_close() before freeing.
+ *
+ * @param avr audio resample context
+ */
+void avresample_free(AVAudioResampleContext **avr);
+
+/**
+ * Generate a channel mixing matrix.
+ *
+ * This function is the one used internally by libavresample for building the
+ * default mixing matrix. It is made public just as a utility function for
+ * building custom matrices.
+ *
+ * @param in_layout input channel layout
+ * @param out_layout output channel layout
+ * @param center_mix_level mix level for the center channel
+ * @param surround_mix_level mix level for the surround channel(s)
+ * @param lfe_mix_level mix level for the low-frequency effects channel
+ * @param normalize if 1, coefficients will be normalized to prevent
+ * overflow. if 0, coefficients will not be
+ * normalized.
+ * @param[out] matrix mixing coefficients; matrix[i + stride * o] is
+ * the weight of input channel i in output channel o.
+ * @param stride distance between adjacent input channels in the
+ * matrix array
+ * @param matrix_encoding matrixed stereo downmix mode (e.g. dplii)
+ * @return 0 on success, negative AVERROR code on failure
+ */
+int avresample_build_matrix(uint64_t in_layout, uint64_t out_layout,
+ double center_mix_level, double surround_mix_level,
+ double lfe_mix_level, int normalize, double *matrix,
+ int stride, enum AVMatrixEncoding matrix_encoding);
+
+/**
+ * Get the current channel mixing matrix.
+ *
+ * If no custom matrix has been previously set or the AVAudioResampleContext is
+ * not open, an error is returned.
+ *
+ * @param avr audio resample context
+ * @param matrix mixing coefficients; matrix[i + stride * o] is the weight of
+ * input channel i in output channel o.
+ * @param stride distance between adjacent input channels in the matrix array
+ * @return 0 on success, negative AVERROR code on failure
+ */
+int avresample_get_matrix(AVAudioResampleContext *avr, double *matrix,
+ int stride);
+
+/**
+ * Set channel mixing matrix.
+ *
+ * Allows for setting a custom mixing matrix, overriding the default matrix
+ * generated internally during avresample_open(). This function can be called
+ * anytime on an allocated context, either before or after calling
+ * avresample_open(), as long as the channel layouts have been set.
+ * avresample_convert() always uses the current matrix.
+ * Calling avresample_close() on the context will clear the current matrix.
+ *
+ * @see avresample_close()
+ *
+ * @param avr audio resample context
+ * @param matrix mixing coefficients; matrix[i + stride * o] is the weight of
+ * input channel i in output channel o.
+ * @param stride distance between adjacent input channels in the matrix array
+ * @return 0 on success, negative AVERROR code on failure
+ */
+int avresample_set_matrix(AVAudioResampleContext *avr, const double *matrix,
+ int stride);
+
+/**
+ * Set compensation for resampling.
+ *
+ * This can be called anytime after avresample_open(). If resampling is not
+ * automatically enabled because of a sample rate conversion, the
+ * "force_resampling" option must have been set to 1 when opening the context
+ * in order to use resampling compensation.
+ *
+ * @param avr audio resample context
+ * @param sample_delta compensation delta, in samples
+ * @param compensation_distance compensation distance, in samples
+ * @return 0 on success, negative AVERROR code on failure
+ */
+int avresample_set_compensation(AVAudioResampleContext *avr, int sample_delta,
+ int compensation_distance);
+
+/**
+ * Convert input samples and write them to the output FIFO.
+ *
+ * The upper bound on the number of output samples is given by
+ * avresample_available() + (avresample_get_delay() + number of input samples) *
+ * output sample rate / input sample rate.
+ *
+ * The output data can be NULL or have fewer allocated samples than required.
+ * In this case, any remaining samples not written to the output will be added
+ * to an internal FIFO buffer, to be returned at the next call to this function
+ * or to avresample_read().
+ *
+ * If converting sample rate, there may be data remaining in the internal
+ * resampling delay buffer. avresample_get_delay() tells the number of remaining
+ * samples. To get this data as output, call avresample_convert() with NULL
+ * input.
+ *
+ * At the end of the conversion process, there may be data remaining in the
+ * internal FIFO buffer. avresample_available() tells the number of remaining
+ * samples. To get this data as output, either call avresample_convert() with
+ * NULL input or call avresample_read().
+ *
+ * @see avresample_available()
+ * @see avresample_read()
+ * @see avresample_get_delay()
+ *
+ * @param avr audio resample context
+ * @param output output data pointers
+ * @param out_plane_size output plane size, in bytes.
+ * This can be 0 if unknown, but that will lead to
+ * optimized functions not being used directly on the
+ * output, which could slow down some conversions.
+ * @param out_samples maximum number of samples that the output buffer can hold
+ * @param input input data pointers
+ * @param in_plane_size input plane size, in bytes
+ * This can be 0 if unknown, but that will lead to
+ * optimized functions not being used directly on the
+ * input, which could slow down some conversions.
+ * @param in_samples number of input samples to convert
+ * @return number of samples written to the output buffer,
+ * not including converted samples added to the internal
+ * output FIFO
+ */
+int avresample_convert(AVAudioResampleContext *avr, uint8_t **output,
+ int out_plane_size, int out_samples, uint8_t **input,
+ int in_plane_size, int in_samples);
+
+/**
+ * Return the number of samples currently in the resampling delay buffer.
+ *
+ * When resampling, there may be a delay between the input and output. Any
+ * unconverted samples in each call are stored internally in a delay buffer.
+ * This function allows the user to determine the current number of samples in
+ * the delay buffer, which can be useful for synchronization.
+ *
+ * @see avresample_convert()
+ *
+ * @param avr audio resample context
+ * @return number of samples currently in the resampling delay buffer
+ */
+int avresample_get_delay(AVAudioResampleContext *avr);
+
+/**
+ * Return the number of available samples in the output FIFO.
+ *
+ * During conversion, if the user does not specify an output buffer or
+ * specifies an output buffer that is smaller than what is needed, remaining
+ * samples that are not written to the output are stored to an internal FIFO
+ * buffer. The samples in the FIFO can be read with avresample_read() or
+ * avresample_convert().
+ *
+ * @see avresample_read()
+ * @see avresample_convert()
+ *
+ * @param avr audio resample context
+ * @return number of samples available for reading
+ */
+int avresample_available(AVAudioResampleContext *avr);
+
+/**
+ * Read samples from the output FIFO.
+ *
+ * During conversion, if the user does not specify an output buffer or
+ * specifies an output buffer that is smaller than what is needed, remaining
+ * samples that are not written to the output are stored to an internal FIFO
+ * buffer. This function can be used to read samples from that internal FIFO.
+ *
+ * @see avresample_available()
+ * @see avresample_convert()
+ *
+ * @param avr audio resample context
+ * @param output output data pointers. May be NULL, in which case
+ * nb_samples of data is discarded from output FIFO.
+ * @param nb_samples number of samples to read from the FIFO
+ * @return the number of samples written to output
+ */
+int avresample_read(AVAudioResampleContext *avr, uint8_t **output, int nb_samples);
+
+/**
+ * @}
+ */
+
+#endif /* AVRESAMPLE_AVRESAMPLE_H */
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavresample b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavresample
new file mode 120000
index 000000000..60a35c626
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavresample
@@ -0,0 +1 @@
+../libavresample \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavutil b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/version.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/version.h
new file mode 100644
index 000000000..ebcd07f57
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavresample/version.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVRESAMPLE_VERSION_H
+#define AVRESAMPLE_VERSION_H
+
+#define LIBAVRESAMPLE_VERSION_MAJOR 1
+#define LIBAVRESAMPLE_VERSION_MINOR 0
+#define LIBAVRESAMPLE_VERSION_MICRO 1
+
+#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \
+ LIBAVRESAMPLE_VERSION_MINOR, \
+ LIBAVRESAMPLE_VERSION_MICRO)
+#define LIBAVRESAMPLE_VERSION AV_VERSION(LIBAVRESAMPLE_VERSION_MAJOR, \
+ LIBAVRESAMPLE_VERSION_MINOR, \
+ LIBAVRESAMPLE_VERSION_MICRO)
+#define LIBAVRESAMPLE_BUILD LIBAVRESAMPLE_VERSION_INT
+
+#define LIBAVRESAMPLE_IDENT "Lavr" AV_STRINGIFY(LIBAVRESAMPLE_VERSION)
+
+/**
+ * FF_API_* defines may be placed below to indicate public API that will be
+ * dropped at a future version bump. The defines themselves are not part of
+ * the public API and may change, break or disappear at any time.
+ */
+
+#ifndef FF_API_RESAMPLE_CLOSE_OPEN
+#define FF_API_RESAMPLE_CLOSE_OPEN (LIBAVRESAMPLE_VERSION_MAJOR < 2)
+#endif
+
+#endif /* AVRESAMPLE_VERSION_H */
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/adler32.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/adler32.h
index a8ff6f9d4..a8ff6f9d4 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/adler32.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/adler32.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/aes.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/aes.h
index edff275b7..edff275b7 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/aes.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/aes.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/attributes.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/attributes.h
index 292a0a1a8..292a0a1a8 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/attributes.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/attributes.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audio_fifo.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audio_fifo.h
new file mode 100644
index 000000000..8c7638825
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audio_fifo.h
@@ -0,0 +1,146 @@
+/*
+ * Audio FIFO
+ * Copyright (c) 2012 Justin Ruggles <[email protected]>
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * Audio FIFO Buffer
+ */
+
+#ifndef AVUTIL_AUDIO_FIFO_H
+#define AVUTIL_AUDIO_FIFO_H
+
+#include "avutil.h"
+#include "fifo.h"
+#include "samplefmt.h"
+
+/**
+ * @addtogroup lavu_audio
+ * @{
+ */
+
+/**
+ * Context for an Audio FIFO Buffer.
+ *
+ * - Operates at the sample level rather than the byte level.
+ * - Supports multiple channels with either planar or packed sample format.
+ * - Automatic reallocation when writing to a full buffer.
+ */
+typedef struct AVAudioFifo AVAudioFifo;
+
+/**
+ * Free an AVAudioFifo.
+ *
+ * @param af AVAudioFifo to free
+ */
+void av_audio_fifo_free(AVAudioFifo *af);
+
+/**
+ * Allocate an AVAudioFifo.
+ *
+ * @param sample_fmt sample format
+ * @param channels number of channels
+ * @param nb_samples initial allocation size, in samples
+ * @return newly allocated AVAudioFifo, or NULL on error
+ */
+AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
+ int nb_samples);
+
+/**
+ * Reallocate an AVAudioFifo.
+ *
+ * @param af AVAudioFifo to reallocate
+ * @param nb_samples new allocation size, in samples
+ * @return 0 if OK, or negative AVERROR code on failure
+ */
+int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
+
+/**
+ * Write data to an AVAudioFifo.
+ *
+ * The AVAudioFifo will be reallocated automatically if the available space
+ * is less than nb_samples.
+ *
+ * @see enum AVSampleFormat
+ * The documentation for AVSampleFormat describes the data layout.
+ *
+ * @param af AVAudioFifo to write to
+ * @param data audio data plane pointers
+ * @param nb_samples number of samples to write
+ * @return number of samples actually written, or negative AVERROR
+ * code on failure.
+ */
+int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples);
+
+/**
+ * Read data from an AVAudioFifo.
+ *
+ * @see enum AVSampleFormat
+ * The documentation for AVSampleFormat describes the data layout.
+ *
+ * @param af AVAudioFifo to read from
+ * @param data audio data plane pointers
+ * @param nb_samples number of samples to read
+ * @return number of samples actually read, or negative AVERROR code
+ * on failure.
+ */
+int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples);
+
+/**
+ * Drain data from an AVAudioFifo.
+ *
+ * Removes the data without reading it.
+ *
+ * @param af AVAudioFifo to drain
+ * @param nb_samples number of samples to drain
+ * @return 0 if OK, or negative AVERROR code on failure
+ */
+int av_audio_fifo_drain(AVAudioFifo *af, int nb_samples);
+
+/**
+ * Reset the AVAudioFifo buffer.
+ *
+ * This empties all data in the buffer.
+ *
+ * @param af AVAudioFifo to reset
+ */
+void av_audio_fifo_reset(AVAudioFifo *af);
+
+/**
+ * Get the current number of samples in the AVAudioFifo available for reading.
+ *
+ * @param af the AVAudioFifo to query
+ * @return number of samples available for reading
+ */
+int av_audio_fifo_size(AVAudioFifo *af);
+
+/**
+ * Get the current number of samples in the AVAudioFifo available for writing.
+ *
+ * @param af the AVAudioFifo to query
+ * @return number of samples available for writing
+ */
+int av_audio_fifo_space(AVAudioFifo *af);
+
+/**
+ * @}
+ */
+
+#endif /* AVUTIL_AUDIO_FIFO_H */
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audioconvert.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audioconvert.h
index 300a67cd3..300a67cd3 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audioconvert.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/audioconvert.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avassert.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avassert.h
index b223d26e8..b223d26e8 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avassert.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avassert.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avconfig.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avconfig.h
index f10aa6186..f10aa6186 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avconfig.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avconfig.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avstring.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avstring.h
index acd6610d3..acd6610d3 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avstring.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avstring.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avutil.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avutil.h
index 33f9bea72..33f9bea72 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avutil.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/avutil.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/base64.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/base64.h
index 4750cf5c7..4750cf5c7 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/base64.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/base64.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/blowfish.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/blowfish.h
new file mode 100644
index 000000000..8c29536cf
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/blowfish.h
@@ -0,0 +1,76 @@
+/*
+ * Blowfish algorithm
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_BLOWFISH_H
+#define AVUTIL_BLOWFISH_H
+
+#include <stdint.h>
+
+/**
+ * @defgroup lavu_blowfish Blowfish
+ * @ingroup lavu_crypto
+ * @{
+ */
+
+#define AV_BF_ROUNDS 16
+
+typedef struct AVBlowfish {
+ uint32_t p[AV_BF_ROUNDS + 2];
+ uint32_t s[4][256];
+} AVBlowfish;
+
+/**
+ * Initialize an AVBlowfish context.
+ *
+ * @param ctx an AVBlowfish context
+ * @param key a key
+ * @param key_len length of the key
+ */
+void av_blowfish_init(struct AVBlowfish *ctx, const uint8_t *key, int key_len);
+
+/**
+ * Encrypt or decrypt a buffer using a previously initialized context.
+ *
+ * @param ctx an AVBlowfish context
+ * @param xl left four bytes halves of input to be encrypted
+ * @param xr right four bytes halves of input to be encrypted
+ * @param decrypt 0 for encryption, 1 for decryption
+ */
+void av_blowfish_crypt_ecb(struct AVBlowfish *ctx, uint32_t *xl, uint32_t *xr,
+ int decrypt);
+
+/**
+ * Encrypt or decrypt a buffer using a previously initialized context.
+ *
+ * @param ctx an AVBlowfish context
+ * @param dst destination array, can be equal to src
+ * @param src source array, can be equal to dst
+ * @param count number of 8 byte blocks
+ * @param iv initialization vector for CBC mode, if NULL ECB will be used
+ * @param decrypt 0 for encryption, 1 for decryption
+ */
+void av_blowfish_crypt(struct AVBlowfish *ctx, uint8_t *dst, const uint8_t *src,
+ int count, uint8_t *iv, int decrypt);
+
+/**
+ * @}
+ */
+
+#endif /* AVUTIL_BLOWFISH_H */
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/bswap.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/bswap.h
index 8a350e1cd..8a350e1cd 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/bswap.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/bswap.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/channel_layout.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/channel_layout.h
index 15b6887a6..15b6887a6 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/channel_layout.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/channel_layout.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/common.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/common.h
index cc4df16e4..cc4df16e4 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/common.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/common.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/cpu.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/cpu.h
index 4929512c6..4929512c6 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/cpu.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/cpu.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/crc.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/crc.h
index 0540619d2..0540619d2 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/crc.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/crc.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/dict.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/dict.h
index 492da9a41..492da9a41 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/dict.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/dict.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/error.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/error.h
index 3dfd8807f..3dfd8807f 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/error.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/error.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/eval.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/eval.h
index ccb29e7a3..ccb29e7a3 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/eval.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/eval.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/fifo.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/fifo.h
index ea30f5d2b..ea30f5d2b 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/fifo.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/fifo.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/file.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/file.h
index e3f02a830..e3f02a830 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/file.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/file.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/imgutils.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/imgutils.h
index 71510132a..71510132a 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/imgutils.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/imgutils.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat.h
index 38d26ad87..38d26ad87 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat_readwrite.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat_readwrite.h
index f093b92cd..f093b92cd 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat_readwrite.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intfloat_readwrite.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intreadwrite.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intreadwrite.h
index f77fd60f3..f77fd60f3 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intreadwrite.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/intreadwrite.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lfg.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lfg.h
index 5e526c1da..5e526c1da 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lfg.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lfg.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/libavutil b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/libavutil
new file mode 120000
index 000000000..29ab1c9b4
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/libavutil
@@ -0,0 +1 @@
+../libavutil \ No newline at end of file
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/log.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/log.h
index 7b173302f..7b173302f 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/log.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/log.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lzo.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lzo.h
index 9d7e8f1dc..9d7e8f1dc 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lzo.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/lzo.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h
index 043dd0faf..043dd0faf 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/md5.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/md5.h
index 29e4e7c2b..29e4e7c2b 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/md5.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/md5.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mem.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mem.h
index 8f4722447..8f4722447 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mem.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mem.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/old_pix_fmts.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/old_pix_fmts.h
index 31765aed5..31765aed5 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/old_pix_fmts.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/old_pix_fmts.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/opt.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/opt.h
index 2d3cc731e..2d3cc731e 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/opt.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/opt.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/parseutils.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/parseutils.h
index 0844abb2f..0844abb2f 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/parseutils.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/parseutils.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixdesc.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixdesc.h
index 47e6bb838..47e6bb838 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixdesc.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixdesc.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixfmt.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixfmt.h
index 1072f0089..1072f0089 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixfmt.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/pixfmt.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/random_seed.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/random_seed.h
index b1fad13d0..b1fad13d0 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/random_seed.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/random_seed.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/rational.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/rational.h
index 5d7dab7fd..5d7dab7fd 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/rational.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/rational.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/samplefmt.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/samplefmt.h
index 33cbdedf5..33cbdedf5 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/samplefmt.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/samplefmt.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/sha.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/sha.h
index 4c9a0c909..4c9a0c909 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/sha.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/sha.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/time.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/time.h
index b01a97d77..b01a97d77 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/time.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/time.h
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/version.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/version.h
index 1dbb11ca2..1dbb11ca2 100644
--- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/version.h
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/version.h
diff --git a/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/xtea.h b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/xtea.h
new file mode 100644
index 000000000..7d2b07bbc
--- /dev/null
+++ b/src/jogl/native/libav/lavc54.lavf54.lavu52.lavr01/libavutil/xtea.h
@@ -0,0 +1,61 @@
+/*
+ * A 32-bit implementation of the XTEA algorithm
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_XTEA_H
+#define AVUTIL_XTEA_H
+
+#include <stdint.h>
+
+/**
+ * @defgroup lavu_xtea XTEA
+ * @ingroup lavu_crypto
+ * @{
+ */
+
+typedef struct AVXTEA {
+ uint32_t key[16];
+} AVXTEA;
+
+/**
+ * Initialize an AVXTEA context.
+ *
+ * @param ctx an AVXTEA context
+ * @param key a key of 16 bytes used for encryption/decryption
+ */
+void av_xtea_init(struct AVXTEA *ctx, const uint8_t key[16]);
+
+/**
+ * Encrypt or decrypt a buffer using a previously initialized context.
+ *
+ * @param ctx an AVXTEA context
+ * @param dst destination array, can be equal to src
+ * @param src source array, can be equal to dst
+ * @param count number of 8 byte blocks
+ * @param iv initialization vector for CBC mode, if NULL then ECB will be used
+ * @param decrypt 0 for encryption, 1 for decryption
+ */
+void av_xtea_crypt(struct AVXTEA *ctx, uint8_t *dst, const uint8_t *src,
+ int count, uint8_t *iv, int decrypt);
+
+/**
+ * @}
+ */
+
+#endif /* AVUTIL_XTEA_H */