aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java1
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java319
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java110
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java6
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0400Natives.java (renamed from src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java)8
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0500Natives.java (renamed from src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java)8
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0600Natives.java (renamed from src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java)8
-rw-r--r--src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv11Natives.java78
8 files changed, 197 insertions, 341 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
index f09d289fa..5d686fc21 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/GLMediaPlayerImpl.java
@@ -576,6 +576,7 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
this.vid = vid;
this.aid = aid;
new InterruptSource.Thread() {
+ @Override
public void run() {
try {
// StreamWorker may be used, see API-doc of StreamWorker
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 f1049ce6e..71fa70080 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java
@@ -51,41 +51,39 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
private static final List<String> glueLibNames = new ArrayList<String>(); // none
- private static final int symbolCount = 65;
+ private static final int symbolCount = 59;
private static final String[] symbolNames = {
"avutil_version",
"avformat_version",
"avcodec_version",
- "avresample_version",
-/* 5 */ "swresample_version",
+ "avdevice_version", // (opt)
+ "swresample_version",
+ /* 5 */
// libavcodec
- "avcodec_register_all",
"avcodec_close",
"avcodec_string",
"avcodec_find_decoder",
- "avcodec_open2", // 53.6.0 (opt)
- "avcodec_alloc_frame",
- "avcodec_get_frame_defaults",
- "avcodec_free_frame", // 54.28.0 (opt)
- "avcodec_default_get_buffer", // <= 54 (opt), else sp_avcodec_default_get_buffer2
- "avcodec_default_release_buffer", // <= 54 (opt), else sp_av_frame_unref
- "avcodec_default_get_buffer2", // 55 (opt)
- "avcodec_get_edge_width",
+ "avcodec_alloc_context3",
+ "avcodec_free_context",
+ "avcodec_parameters_to_context",
+ "avcodec_open2", // 53.6.0
+ "av_frame_alloc", // >= 55.28.1
+ "av_frame_free", // >= 55.28.1
+ "avcodec_default_get_buffer2", // 55
"av_image_fill_linesizes",
- "avcodec_align_dimensions",
- "avcodec_align_dimensions2",
"avcodec_flush_buffers",
- "av_init_packet",
+ "av_packet_alloc",
+ "av_packet_free",
"av_new_packet",
- "av_destruct_packet",
- "av_free_packet",
- "avcodec_decode_audio4", // 53.25.0 (opt)
-/* 27 */ "avcodec_decode_video2", // 52.23.0
+ "av_packet_unref",
+ "avcodec_send_packet", // 57
+ "avcodec_receive_frame", // 57
+ /* +18 = 23 */
// libavutil
- "av_pix_fmt_descriptors",
- "av_frame_unref", // 55.0.0 (opt)
+ "av_pix_fmt_desc_get", // >= lavu 51.45
+ "av_frame_unref", // 55.0.0
"av_realloc",
"av_free",
"av_get_bits_per_pixel",
@@ -93,15 +91,19 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
"av_get_bytes_per_sample", // 51.4.0
"av_opt_set_int", // 51.12.0
"av_dict_get",
- "av_dict_count", // 54.* (opt)
+ "av_dict_count", // 54.* (opt)
"av_dict_set",
-/* 28 */ "av_dict_free",
+ "av_dict_free",
+ "av_channel_layout_default", // >= 59 (opt)
+ "av_channel_layout_uninit", // >= 59 (opt)
+ "av_channel_layout_describe", // >= 59 (opt)
+ "av_opt_set_chlayout", // >= 59
+ /* +16 = 39 */
// libavformat
"avformat_alloc_context",
- "avformat_free_context", // 52.96.0 (opt)
- "avformat_close_input", // 53.17.0 (opt)
- "av_register_all",
+ "avformat_free_context", // 52.96.0
+ "avformat_close_input", // 53.17.0
"av_find_input_format",
"avformat_open_input",
"av_dump_format",
@@ -112,85 +114,74 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
"av_read_pause",
"avformat_network_init", // 53.13.0 (opt)
"avformat_network_deinit", // 53.13.0 (opt)
-/* 54 */ "avformat_find_stream_info", // 53.3.0 (opt)
+ "avformat_find_stream_info", // 53.3.0 (opt)
+ /* +14 = 53 */
// libavdevice
-/* 55 */ "avdevice_register_all", // supported in all version <= 56
+ "avdevice_register_all", // supported in all versions (opt)
+ /* +1 = 54 */
- // libavresample
- "avresample_alloc_context", // 1.0.1
- "avresample_open",
- "avresample_close",
- "avresample_free",
-/* 60 */ "avresample_convert",
-
- // libavresample
+ // libswresample
"av_opt_set_sample_fmt", // actually lavu .. but exist only w/ swresample!
"swr_alloc",
"swr_init",
"swr_free",
-/* 65 */ "swr_convert",
-
+ "swr_convert",
+ /* +5 = 59 */
};
// optional symbol names
private static final String[] optionalSymbolNames = {
"avformat_seek_file", // ??? (opt)
- "avcodec_free_frame", // 54.28.0 (opt)
- "av_frame_unref", // 55.0.0 (opt)
"av_dict_count", // 54.* (opt)
- "avcodec_default_get_buffer", // <= 54 (opt), else sp_avcodec_default_get_buffer2
- "avcodec_default_release_buffer", // <= 54 (opt), else sp_av_frame_unref
- "avcodec_default_get_buffer2", // 55 (opt)
+
+ // libavutil
+ "av_channel_layout_default", // >= 59 (opt)
+ "av_channel_layout_uninit", // >= 59 (opt)
+ "av_channel_layout_describe", // >= 59 (opt)
+ "av_opt_set_chlayout", // >= 59
// libavdevice
+ "avdevice_version", // (opt)
"avdevice_register_all", // 53.0.0 (opt)
- // libavresample
- "avresample_version", // 1.0.1
- "avresample_alloc_context", // 1.0.1
- "avresample_open",
- "avresample_close",
- "avresample_free",
- "avresample_convert",
-
// libswresample
"av_opt_set_sample_fmt", // actually lavu .. but exist only w/ swresample!
- "swresample_version", // 0
"swr_alloc",
"swr_init",
"swr_free",
"swr_convert",
};
- /** util, format, codec, device, avresample, swresample */
- private static final boolean[] libLoaded = new boolean[6];
+ private static final int LIB_COUNT = 5;
+ private static final int LIB_IDX_UTI = 0;
+ private static final int LIB_IDX_FMT = 1;
+ private static final int LIB_IDX_COD = 2;
+ private static final int LIB_IDX_DEV = 3;
+ private static final int LIB_IDX_SWR = 4;
+
+ /** util, format, codec, device, swresample */
+ private static final boolean[] libLoaded = new boolean[LIB_COUNT];
private static final long[] symbolAddr = new long[symbolCount];
private static final boolean ready;
- private static final boolean libsUFCLoaded;
+ private static final boolean libsCFUSLoaded;
static final VersionNumber avCodecVersion;
static final VersionNumber avFormatVersion;
static final VersionNumber avUtilVersion;
- static final VersionNumber avResampleVersion;
+ static final VersionNumber avDeviceVersion;
static final VersionNumber swResampleVersion;
private static final FFMPEGNatives natives;
- private static final int LIB_IDX_UTI = 0;
- private static final int LIB_IDX_FMT = 1;
- private static final int LIB_IDX_COD = 2;
- private static final int LIB_IDX_DEV = 3;
- private static final int LIB_IDX_AVR = 4;
- private static final int LIB_IDX_SWR = 5;
-
private static final PrivilegedAction<DynamicLibraryBundle> privInitSymbolsAction = new PrivilegedAction<DynamicLibraryBundle>() {
@Override
public DynamicLibraryBundle run() {
final DynamicLibraryBundle dl = new DynamicLibraryBundle(new FFMPEGDynamicLibraryBundleInfo());
- for(int i=0; i<6; i++) {
+ for(int i=0; i<libLoaded.length; i++) {
libLoaded[i] = dl.isToolLibLoaded(i);
}
- if( !libLoaded[LIB_IDX_UTI] || !libLoaded[LIB_IDX_FMT] || !libLoaded[LIB_IDX_COD] ) {
- System.err.println("FFMPEG Tool library incomplete: [ avutil "+libLoaded[LIB_IDX_UTI]+", avformat "+libLoaded[LIB_IDX_FMT]+", avcodec "+libLoaded[LIB_IDX_COD]+"]");
+ if( !libLoaded[LIB_IDX_COD] || !libLoaded[LIB_IDX_FMT] || !libLoaded[LIB_IDX_UTI] || !libLoaded[LIB_IDX_SWR]) {
+ System.err.println("FFMPEG Tool library incomplete: [ avcodec "+libLoaded[LIB_IDX_COD]+", avformat "+libLoaded[LIB_IDX_FMT]+
+ ", avutil "+libLoaded[LIB_IDX_UTI]+", swres "+libLoaded[LIB_IDX_SWR]+" ]");
return null;
}
dl.claimAllLinkPermission();
@@ -205,12 +196,11 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
} };
/**
- * @param loaded 6: util, format, codec, device, avresample, swresample
- * @param versions 5: util, format, codec, avresample, swresample
+ * @param versions 5: util, format, codec, swresample
* @return
*/
private static final boolean initSymbols(final VersionNumber[] versions) {
- for(int i=0; i<6; i++) {
+ for(int i=0; i<libLoaded.length; i++) {
libLoaded[i] = false;
}
if(symbolNames.length != symbolCount) {
@@ -233,18 +223,22 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
// no symbol, check optional and alternative symbols
final String symbol = symbolNames[i];
if ( !optionalSymbolNameSet.contains(symbol) ) {
- System.err.println("Fail: Could not resolve symbol <"+symbolNames[i]+">: not optional, no alternatives.");
+ System.err.println("FFmpeg: Fail: Could not resolve symbol <"+symbolNames[i]+">: not optional, no alternatives.");
res = false;
} else if(DEBUG) {
- System.err.println("OK: Unresolved optional symbol <"+symbolNames[i]+">");
+ System.err.println("FFmpeg: OK: Unresolved optional symbol <"+symbolNames[i]+">");
}
}
}
- versions[0] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[0]));
- versions[1] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[1]));
- versions[2] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[2]));
- versions[3] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[3]));
- versions[4] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[4]));
+ versions[LIB_IDX_UTI] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[LIB_IDX_UTI]));
+ versions[LIB_IDX_FMT] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[LIB_IDX_FMT]));
+ versions[LIB_IDX_COD] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[LIB_IDX_COD]));
+ if( 0 != symbolAddr[LIB_IDX_DEV] ) {
+ versions[LIB_IDX_DEV] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[LIB_IDX_DEV]));
+ } else {
+ versions[LIB_IDX_DEV] = new VersionNumber(0, 0, 0);
+ }
+ versions[LIB_IDX_SWR] = FFMPEGStaticNatives.getAVVersion(FFMPEGStaticNatives.getAvVersion0(symbolAddr[LIB_IDX_SWR]));
return res;
}
@@ -254,58 +248,75 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
GLProfile.initSingleton();
boolean _ready = false;
- /** util, format, codec, avresample, swresample */
- final VersionNumber[] _versions = new VersionNumber[5];
+ /** util, format, codec, swresample */
+ final VersionNumber[] _versions = new VersionNumber[LIB_COUNT];
try {
_ready = initSymbols(_versions);
} catch (final Throwable t) {
ExceptionUtils.dumpThrowable("", t);
}
- libsUFCLoaded = libLoaded[LIB_IDX_UTI] && libLoaded[LIB_IDX_FMT] && libLoaded[LIB_IDX_COD];
- avUtilVersion = _versions[0];
- avFormatVersion = _versions[1];
- avCodecVersion = _versions[2];
- avResampleVersion = _versions[3];
- swResampleVersion = _versions[4];
- if(!libsUFCLoaded) {
- System.err.println("LIB_AV Not Available: lavu, lavc, lavu");
+ libsCFUSLoaded = libLoaded[LIB_IDX_COD] && libLoaded[LIB_IDX_FMT] && libLoaded[LIB_IDX_UTI] && libLoaded[LIB_IDX_SWR];
+ avUtilVersion = _versions[LIB_IDX_UTI];
+ avFormatVersion = _versions[LIB_IDX_FMT];
+ avCodecVersion = _versions[LIB_IDX_COD];
+ avDeviceVersion = _versions[LIB_IDX_DEV];
+ swResampleVersion = _versions[LIB_IDX_SWR];
+ if(!libsCFUSLoaded) {
+ String missing = "";
+ if( !libLoaded[LIB_IDX_COD] ) {
+ missing = missing + "avcodec, ";
+ }
+ if( !libLoaded[LIB_IDX_FMT] ) {
+ missing = missing + "avformat, ";
+ }
+ if( !libLoaded[LIB_IDX_UTI] ) {
+ missing = missing + "avutil, ";
+ }
+ if( !libLoaded[LIB_IDX_SWR] ) {
+ missing = missing + "swresample";
+ }
+ System.err.println("FFmpeg Not Available, missing libs: "+missing);
natives = null;
ready = false;
} else if(!_ready) {
- System.err.println("LIB_AV Not Matching");
+ System.err.println("FFmpeg Symbol Lookup Failed");
natives = null;
ready = false;
} else {
final int avCodecMajor = avCodecVersion.getMajor();
final int avFormatMajor = avFormatVersion.getMajor();
final int avUtilMajor = avUtilVersion.getMajor();
- if( avCodecMajor == 53 && avFormatMajor == 53 && avUtilMajor == 51 ) {
- // lavc53.lavf53.lavu51
- natives = new FFMPEGv08Natives();
- } else if( avCodecMajor == 54 && avFormatMajor == 54 && avUtilMajor == 52 ) {
- // lavc54.lavf54.lavu52.lavr01
- natives = new FFMPEGv09Natives();
- } else if( avCodecMajor == 55 && avFormatMajor == 55 && ( avUtilMajor == 52 || avUtilMajor == 53 ) ) {
- // lavc55.lavf55.lavu52.lavr01 (ffmpeg) or lavc55.lavf55.lavu53.lavr01 (libav)
- natives = new FFMPEGv10Natives();
- } else if( avCodecMajor == 56 && avFormatMajor == 56 && avUtilMajor == 54 ) {
- // lavc56.lavf56.lavu54.lavr02
- natives = new FFMPEGv11Natives();
+ final int avDeviceMajor = avDeviceVersion.getMajor();
+ final int swResampleMajor = swResampleVersion.getMajor();
+ if( avCodecMajor == 58 && avFormatMajor == 58 && ( avDeviceMajor == 58 || avDeviceMajor == 0 ) && avUtilMajor == 56 && swResampleMajor == 3) {
+ // Exact match: ffmpeg 4.x.y
+ natives = new FFMPEGv0400Natives();
+ } else if( avCodecMajor == 59 && avFormatMajor == 59 && ( avDeviceMajor == 59 || avDeviceMajor == 0 ) && avUtilMajor == 57 && swResampleMajor == 4) {
+ // Exact match: ffmpeg 5.x.y
+ natives = new FFMPEGv0500Natives();
+ } else if( avCodecMajor == 60 && avFormatMajor == 60 && ( avDeviceMajor == 60 || avDeviceMajor == 0 ) && avUtilMajor == 58 && swResampleMajor == 4) {
+ // Exact match: ffmpeg 6.x.y
+ natives = new FFMPEGv0600Natives();
} else {
- System.err.println("LIB_AV No Version/Native-Impl Match");
natives = null;
}
- if( null != natives && FFMPEGStaticNatives.initIDs0() ) {
+ if( null == natives ) {
+ System.err.println("FFmpeg Native Class matching runtime-versions not found.");
+ ready = false;
+ } else if( FFMPEGStaticNatives.initIDs0() ) {
ready = natives.initSymbols0(symbolAddr, symbolCount);
+ if( !ready ) {
+ System.err.println("FFmpeg Native Symbols Initialization Failed");
+ }
} else {
+ System.err.println("FFmpeg Native ID Initialization Failed");
ready = false;
}
}
}
- static boolean libsLoaded() { return libsUFCLoaded; }
+ static boolean libsLoaded() { return libsCFUSLoaded; }
static boolean avDeviceLoaded() { return libLoaded[LIB_IDX_DEV]; }
- static boolean avResampleLoaded() { return libLoaded[LIB_IDX_AVR]; }
static boolean swResampleLoaded() { return libLoaded[LIB_IDX_SWR]; }
static FFMPEGNatives getNatives() { return natives; }
static boolean initSingleton() { return ready; }
@@ -354,21 +365,13 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
} else {
avutil.add("internal_avutil"); // internal
}
- avutil.add("libavutil.so.56"); // ffmpeg 4.[0-x] (Debian-10)
- avutil.add("libavutil.so.55"); //
- avutil.add("libavutil.so.54"); // ffmpeg 2.[4-x] / libav 11
- avutil.add("libavutil.so.53"); // ffmpeg 2.[0-3] / libav 10
- avutil.add("libavutil.so.52"); // ffmpeg 1.2 + 2.[0-3] / libav 9
- avutil.add("libavutil.so.51"); // 0.8
- avutil.add("libavutil.so.50"); // 0.7
+ avutil.add("libavutil.so.58"); // ffmpeg 6.[0-x]
+ avutil.add("libavutil.so.57"); // ffmpeg 5.[0-x]
+ avutil.add("libavutil.so.56"); // ffmpeg 4.[0-x] (Debian-11)
+ avutil.add("avutil-58"); // ffmpeg 6.[0-x]
+ avutil.add("avutil-57"); // ffmpeg 5.[0-x]
avutil.add("avutil-56"); // ffmpeg 4.[0-x]
- avutil.add("avutil-55"); //
- avutil.add("avutil-54"); // ffmpeg 2.[4-x] / libav 11
- avutil.add("avutil-53"); // ffmpeg 2.[0-3] / libav 10
- avutil.add("avutil-52"); // ffmpeg 1.2 + 2.[0-3] / libav 9
- avutil.add("avutil-51"); // 0.8
- avutil.add("avutil-50"); // 0.7
if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
avutil.add("internal_avutil"); // internal
} else {
@@ -382,21 +385,13 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
} else {
avformat.add("internal_avformat"); // internal
}
- avformat.add("libavformat.so.58"); // ffmpeg 4.[0-x] (Debian-10)
- avformat.add("libavformat.so.57"); //
- avformat.add("libavformat.so.56"); // ffmpeg 2.[4-x] / libav 11
- avformat.add("libavformat.so.55"); // ffmpeg 2.[0-3] / libav 10
- avformat.add("libavformat.so.54"); // ffmpeg 1.2 / libav 9
- avformat.add("libavformat.so.53"); // 0.8
- avformat.add("libavformat.so.52"); // 0.7
+ avformat.add("libavformat.so.60"); // ffmpeg 6.[0-x]
+ avformat.add("libavformat.so.59"); // ffmpeg 5.[0-x]
+ avformat.add("libavformat.so.58"); // ffmpeg 4.[0-x] (Debian-11)
+ avformat.add("avformat-60"); // ffmpeg 6.[0-x]
+ avformat.add("avformat-59"); // ffmpeg 5.[0-x]
avformat.add("avformat-58"); // ffmpeg 4.[0-x]
- avformat.add("avformat-57"); //
- avformat.add("avformat-56"); // ffmpeg 2.[4-x] / libav 11
- avformat.add("avformat-55"); // ffmpeg 2.[0-3] / libav 10
- avformat.add("avformat-54"); // ffmpeg 1.2 / libav 9
- avformat.add("avformat-53"); // 0.8
- avformat.add("avformat-52"); // 0.7
if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
avformat.add("internal_avformat"); // internal
} else {
@@ -410,21 +405,13 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
} else {
avcodec.add("internal_avcodec"); // internal
}
- avcodec.add("libavcodec.so.58"); // ffmpeg 4.[0-x] (Debian-10)
- avcodec.add("libavcodec.so.57"); //
- avcodec.add("libavcodec.so.56"); // ffmpeg 2.[4-x] / libav 11
- avcodec.add("libavcodec.so.55"); // ffmpeg 2.[0-3] / libav 10
- avcodec.add("libavcodec.so.54"); // ffmpeg 1.2 / libav 9
- avcodec.add("libavcodec.so.53"); // 0.8
- avcodec.add("libavcodec.so.52"); // 0.7
+ avcodec.add("libavcodec.so.60"); // ffmpeg 6.[0-x]
+ avcodec.add("libavcodec.so.59"); // ffmpeg 5.[0-x]
+ avcodec.add("libavcodec.so.58"); // ffmpeg 4.[0-x] (Debian-11)
+ avcodec.add("avcodec-60"); // ffmpeg 6.[0-x]
+ avcodec.add("avcodec-59"); // ffmpeg 5.[0-x]
avcodec.add("avcodec-58"); // ffmpeg 4.[0-x]
- avcodec.add("avcodec-57"); //
- avcodec.add("avcodec-56"); // ffmpeg 2.[4-x] / libav 11
- avcodec.add("avcodec-55"); // ffmpeg 2.[0-3] / libav 10
- avcodec.add("avcodec-54"); // ffmpeg 1.2 / libav 9
- avcodec.add("avcodec-53"); // 0.8
- avcodec.add("avcodec-52"); // 0.7
if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
avcodec.add("internal_avcodec"); // internal
} else {
@@ -438,19 +425,13 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
} else {
avdevice.add("internal_avdevice"); // internal
}
- avdevice.add("libavdevice.so.58"); // ffmpeg 4.[0-x] (Debian-10)
- avdevice.add("libavdevice.so.57"); //
- avdevice.add("libavdevice.so.56"); // ffmpeg 2.[4-x]
- avdevice.add("libavdevice.so.55"); // ffmpeg 2.[0-3] / libav 11
- avdevice.add("libavdevice.so.54"); // ffmpeg 1.2 / libav 10
- avdevice.add("libavdevice.so.53"); // 0.8 && libav 9
+ avdevice.add("libavdevice.so.60"); // ffmpeg 6.[0-x]
+ avdevice.add("libavdevice.so.59"); // ffmpeg 5.[0-x]
+ avdevice.add("libavdevice.so.58"); // ffmpeg 4.[0-x] (Debian-11)
+ avdevice.add("avdevice-60"); // ffmpeg 6.[0-x]
+ avdevice.add("avdevice-59"); // ffmpeg 5.[0-x]
avdevice.add("avdevice-58"); // ffmpeg 4.[0-x]
- avdevice.add("avdevice-57"); //
- avdevice.add("avdevice-56"); // ffmpeg 2.[4-x]
- avdevice.add("avdevice-55"); // ffmpeg 2.[0-3] / libav 11
- avdevice.add("avdevice-54"); // ffmpeg 1.2 / libav 10
- avdevice.add("avdevice-53"); // 0.8 && libav 9
if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
avdevice.add("internal_avdevice"); // internal
} else {
@@ -458,43 +439,17 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo {
}
libsList.add(avdevice);
- final List<String> avresample = new ArrayList<String>();
- if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
- avresample.add("avresample"); // system default
- } else {
- avresample.add("internal_avresample");// internal
- }
- avresample.add("libavresample.so.4"); // ffmpeg 4.[0-x] (Debian-10)
- avresample.add("libavresample.so.3"); //
- avresample.add("libavresample.so.2"); // libav 11
- avresample.add("libavresample.so.1"); // libav 9 + 10
-
- avresample.add("avresample-4"); // ffmpeg 4.[0-x]
- avresample.add("avresample-3"); //
- avresample.add("avresample-2"); // libav 11
- avresample.add("avresample-1"); // libav 9 + 10
- if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
- avresample.add("internal_avresample");// internal
- } else {
- avresample.add("avresample"); // system default
- }
- libsList.add(avresample);
-
final List<String> swresample = new ArrayList<String>();
if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
swresample.add("swresample"); // system default
} else {
swresample.add("internal_swresample");// internal
}
- swresample.add("libswresample.so.3"); // ffmpeg 4.[0-x] (Debian-10)
- swresample.add("libswresample.so.2"); //
- swresample.add("libswresample.so.1"); // ffmpeg 2.[4-x]
- swresample.add("libswresample.so.0"); // ffmpeg 1.2 + 2.[0-3]
+ swresample.add("libswresample.so.4"); // ffmpeg 5.[0-x] - 6.[0-x]
+ swresample.add("libswresample.so.3"); // ffmpeg 4.[0-x] (Debian-11)
+ swresample.add("swresample-4"); // ffmpeg 5.[0-x] - 6.[0-x]
swresample.add("swresample-3"); // ffmpeg 4.[0-x]
- swresample.add("swresample-2"); //
- swresample.add("swresample-1"); // ffmpeg 2.[4-x]
- swresample.add("swresample-0"); // ffmpeg 1.2 + 2.[0-3]
if( FFMPEGMediaPlayer.PREFER_SYSTEM_LIBS ) {
swresample.add("internal_swresample");// internal
} else {
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 6e44dcc37..c1a7eceda 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java
@@ -56,16 +56,12 @@ import jogamp.opengl.util.av.GLMediaPlayerImpl;
import jogamp.opengl.util.av.VideoPixelFormat;
/***
- * Implementation utilizes <a href="http://libav.org/">Libav</a>
- * or <a href="http://ffmpeg.org/">FFmpeg</a> which are ubiquitous
+ * Implementation utilizes <a href="http://ffmpeg.org/">FFmpeg</a> which is ubiquitous
* available and usually pre-installed on Unix platforms.
* <p>
- * Due to legal reasons we cannot deploy binaries of it, which contains patented codecs.
- * </p>
- * <p>
* Besides the default BSD/Linux/.. repositories and installations,
* precompiled binaries can be found at the
- * <a href="#libavavail">listed location below</a>.
+ * <a href="#ffmpegavail">listed location below</a>.
* </p>
*
* <a name="implspecifics"><h5>Implementation specifics</h5></a>
@@ -90,29 +86,26 @@ import jogamp.opengl.util.av.VideoPixelFormat;
* </p>
* <p>
*
- * <a name="libavspecifics"><h5>Libav Specifics</h5></a>
+ * <a name="ffmpegspecifics"><h5>FFmpeg Specifics</h5></a>
* <p>
- * Utilizes a slim dynamic and native binding to the Lib_av
- * libraries:
+ * Utilizes a slim dynamic and native binding to the FFmpeg libraries:
* <ul>
- * <li>libavcodec</li>
- * <li>libavformat</li>
- * <li>libavutil</li>
- * <li>libavresample (opt)</li>
- * <li>libavdevice (opt)</li>
+ * <li>avcodec</li>
+ * <li>avformat</li>
+ * <li>avutil</li>
+ * <li>avdevice (optional for video input devices)</li>
+ * <li>swresample</li>
* </ul>
* </p>
*
- * <a name="compatibility"><h5>LibAV Compatibility</h5></a>
+ * <a name="compatibility"><h5>FFmpeg Compatibility</h5></a>
* <p>
- * Currently we are binary compatible w/:
+ * Currently we are binary compatible with the following major versions:
* <table border="1">
- * <tr><th>libav / ffmpeg</th><th>lavc</th><th>lavf</th><th>lavu</th><th>lavr/lswr</th> <th>FFMPEG* class</th></tr>
- * <tr><td>0.8</td> <td>53</td> <td>53</td> <td>51</td> <td></td> <td>FFMPEGv08</td></tr>
- * <tr><td>9.0 / 1.2</td> <td>54</td> <td>54</td> <td>52</td> <td>01/00</td> <td>FFMPEGv09</td></tr>
- * <tr><td>10 / 2.[0-3]</td> <td>55</td> <td>55</td> <td>53/52</td> <td>01/00</td> <td>FFMPEGv10</td></tr>
- * <tr><td>11 / 2.[4-8]</td> <td>56</td> <td>56</td> <td>54</td> <td>02/01</td> <td>FFMPEGv11</td></tr>
- * <tr><td>12 / 2.[9-x]</td> <td>57</td> <td>57</td> <td>55</td> <td>02/01</td> <td>TODO</td></tr>
+ * <tr><th>ffmpeg</th><th>lavcodec</th><th>lavformat</th><th>lavdevice</th><th>lavutil</th><th>swresample</th> <th>FFMPEG* class</th></tr>
+ * <tr><td>4</td> <td>58</td> <td>58</td> <td>58</td> <td>56</td> <td>03</td> <td>FFMPEGv0400</td></tr>
+ * <tr><td>5</td> <td>59</td> <td>59</td> <td>59</td> <td>57</td> <td>04</td> <td>FFMPEGv0500</td></tr>
+ * <tr><td>6</td> <td>60</td> <td>60</td> <td>60</td> <td>58</td> <td>04</td> <td>FFMPEGv0600</td></tr>
* </table>
* </p>
* <p>
@@ -121,11 +114,6 @@ import jogamp.opengl.util.av.VideoPixelFormat;
* <li>http://ffmpeg.org/documentation.html</li>
* <li>http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/APIchanges;hb=HEAD</li>
* </ul>
- * See libav:
- * <ul>
- * <li>https://libav.org/documentation.html</li>
- * <li>http://upstream-tracker.org/versions/libav.html</li>
- * </ul>
* </p>
* <p>
* Check tag 'FIXME: Add more planar formats !'
@@ -141,15 +129,14 @@ import jogamp.opengl.util.av.VideoPixelFormat;
* </ul>
* </p>
*
- * <a name="libavavail"><h5>FFMPEG / LibAV Availability</h5></a>
+ * <a name="ffmpegavail"><h5>FFmpeg Availability</h5></a>
* <p>
* <ul>
- * <li>GNU/Linux: ffmpeg or libav are deployed in most distributions.</li>
+ * <li>GNU/Linux: ffmpeg is deployed in most distributions.</li>
* <li>Windows:
* <ul>
* <li>https://ffmpeg.org/download.html#build-windows</li>
* <li>http://ffmpeg.zeranoe.com/builds/ (ffmpeg) <i>recommended, works w/ dshow</i></li>
- * <li>http://win32.libav.org/releases/ (libav)</li>
* </ul></li>
* <li>MacOSX
* <ul>
@@ -211,11 +198,9 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
private static final int avUtilMajorVersionCC;
private static final int avFormatMajorVersionCC;
private static final int avCodecMajorVersionCC;
- private static final int avResampleMajorVersionCC;
+ private static final int avDeviceMajorVersionCC;
private static final int swResampleMajorVersionCC;
private static final boolean available;
- private static final boolean enableAvResample;
- private static final boolean enableSwResample;
static {
// PREFER_SYSTEM_LIBS default on all systems is true for now!
@@ -230,58 +215,51 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
avCodecMajorVersionCC = natives.getAvCodecMajorVersionCC0();
avFormatMajorVersionCC = natives.getAvFormatMajorVersionCC0();
avUtilMajorVersionCC = natives.getAvUtilMajorVersionCC0();
- avResampleMajorVersionCC = natives.getAvResampleMajorVersionCC0();
+ avDeviceMajorVersionCC = natives.getAvDeviceMajorVersionCC0();
swResampleMajorVersionCC = natives.getSwResampleMajorVersionCC0();
} else {
avUtilMajorVersionCC = 0;
avFormatMajorVersionCC = 0;
avCodecMajorVersionCC = 0;
- avResampleMajorVersionCC = 0;
+ avDeviceMajorVersionCC = 0;
swResampleMajorVersionCC = 0;
}
final VersionNumber avCodecVersion = FFMPEGDynamicLibraryBundleInfo.avCodecVersion;
final VersionNumber avFormatVersion = FFMPEGDynamicLibraryBundleInfo.avFormatVersion;
final VersionNumber avUtilVersion = FFMPEGDynamicLibraryBundleInfo.avUtilVersion;
- final VersionNumber avResampleVersion = FFMPEGDynamicLibraryBundleInfo.avResampleVersion;
- final boolean avResampleLoaded = FFMPEGDynamicLibraryBundleInfo.avResampleLoaded();
+ final VersionNumber avDeviceVersion = FFMPEGDynamicLibraryBundleInfo.avDeviceVersion;
final VersionNumber swResampleVersion = FFMPEGDynamicLibraryBundleInfo.swResampleVersion;
+ final boolean avDeviceLoaded = FFMPEGDynamicLibraryBundleInfo.avDeviceLoaded();
final boolean swResampleLoaded = FFMPEGDynamicLibraryBundleInfo.swResampleLoaded();
- if( DEBUG ) {
- System.err.println("LIB_AV Codec : "+avCodecVersion+" [cc "+avCodecMajorVersionCC+"]");
- System.err.println("LIB_AV Format : "+avFormatVersion+" [cc "+avFormatMajorVersionCC+"]");
- System.err.println("LIB_AV Util : "+avUtilVersion+" [cc "+avUtilMajorVersionCC+"]");
- System.err.println("LIB_AV Resample: "+avResampleVersion+" [cc "+avResampleMajorVersionCC+", loaded "+avResampleLoaded+"]");
- System.err.println("LIB_SW Resample: "+swResampleVersion+" [cc "+swResampleMajorVersionCC+", loaded "+swResampleLoaded+"]");
- System.err.println("LIB_AV Device : [loaded "+FFMPEGDynamicLibraryBundleInfo.avDeviceLoaded()+"]");
- System.err.println("LIB_AV Class : "+(null!= natives ? natives.getClass().getSimpleName() : "n/a"));
- }
final int avCodecMajor = avCodecVersion.getMajor();
final int avFormatMajor = avFormatVersion.getMajor();
final int avUtilMajor = avUtilVersion.getMajor();
+ final int avDeviceMajor = avDeviceVersion.getMajor();
+ final int swResampleMajor = swResampleVersion.getMajor();
libAVVersionGood = avCodecMajorVersionCC == avCodecMajor &&
avFormatMajorVersionCC == avFormatMajor &&
- ( avUtilMajorVersionCC == avUtilMajor ||
- 55 == avCodecMajorVersionCC && 53 == avUtilMajorVersionCC && 52 == avUtilMajor /* ffmpeg 2.x */
- );
- enableAvResample = avResampleLoaded && avResampleMajorVersionCC == avResampleVersion.getMajor();
- enableSwResample = swResampleLoaded && swResampleMajorVersionCC == swResampleVersion.getMajor();
- if( DEBUG ) {
- System.err.println("LIB_AV Resample: enabled "+enableAvResample);
- System.err.println("LIB_SW Resample: enabled "+enableSwResample);
- }
+ avUtilMajorVersionCC == avUtilMajor &&
+ ( avDeviceMajorVersionCC == avDeviceMajor || 0 == avDeviceMajor ) &&
+ swResampleMajorVersionCC == swResampleMajor;
if( !libAVVersionGood ) {
- System.err.println("LIB_AV Not Matching Compile-Time / Runtime Major-Version");
+ System.err.println("FFmpeg Not Matching Compile-Time / Runtime Major-Version");
+ }
+ if( !libAVVersionGood || DEBUG ) {
+ System.err.println("FFmpeg Codec : "+avCodecVersion+" [cc "+avCodecMajorVersionCC+"]");
+ System.err.println("FFmpeg Format : "+avFormatVersion+" [cc "+avFormatMajorVersionCC+"]");
+ System.err.println("FFmpeg Util : "+avUtilVersion+" [cc "+avUtilMajorVersionCC+"]");
+ System.err.println("FFmpeg Device : "+avDeviceVersion+" [cc "+avDeviceMajorVersionCC+", loaded "+avDeviceLoaded+"]");
+ System.err.println("FFmpeg Resample: "+swResampleVersion+" [cc "+swResampleMajorVersionCC+", loaded "+swResampleLoaded+"]");
+ System.err.println("FFmpeg Class : "+(null!= natives ? natives.getClass().getSimpleName() : "n/a"));
}
} else {
natives = null;
avUtilMajorVersionCC = 0;
avFormatMajorVersionCC = 0;
avCodecMajorVersionCC = 0;
- avResampleMajorVersionCC = 0;
+ avDeviceMajorVersionCC = 0;
swResampleMajorVersionCC = 0;
libAVVersionGood = false;
- enableAvResample = false;
- enableSwResample = false;
}
available = libAVGood && libAVVersionGood && null != natives;
}
@@ -319,7 +297,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
if(!available) {
throw new RuntimeException("FFMPEGMediaPlayer not available");
}
- moviePtr = natives.createInstance0(this, enableAvResample, enableSwResample, DEBUG_NATIVE);
+ moviePtr = natives.createInstance0(this, DEBUG_NATIVE);
if(0==moviePtr) {
throw new GLException("Couldn't create FFMPEGInstance");
}
@@ -521,8 +499,8 @@ 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 AudioSampleFormat}.
+ * Converts the given ffmpeg values to {@link AudioFormat} and returns {@link AudioSink#isSupported(AudioFormat)}.
+ * @param audioSampleFmt ffmpeg audio-sample-format, see {@link AudioSampleFormat}.
* @param audioSampleRate sample rate in Hz (1/s)
* @param audioChannels number of channels
*/
@@ -537,8 +515,8 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
/**
- * Returns {@link AudioFormat} as converted from the given libav/ffmpeg values.
- * @param audioSampleFmt ffmpeg/libav audio-sample-format, see {@link AudioSampleFormat}.
+ * Returns {@link AudioFormat} as converted from the given ffmpeg values.
+ * @param audioSampleFmt ffmpeg audio-sample-format, see {@link AudioSampleFormat}.
* @param audioSampleRate sample rate in Hz (1/s)
* @param audioChannels number of channels
*/
@@ -853,7 +831,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
final int errno = natives.play0(moviePtr);
if( DEBUG_NATIVE && errno != 0 && errno != -ENOSYS) {
- System.err.println("libav play err: "+errno);
+ System.err.println("ffmpeg play err: "+errno);
}
return true;
}
@@ -865,7 +843,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl {
}
final int errno = natives.pause0(moviePtr);
if( DEBUG_NATIVE && errno != 0 && errno != -ENOSYS) {
- System.err.println("libav pause err: "+errno);
+ System.err.println("ffmpeg pause err: "+errno);
}
return true;
}
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
index 3b8fc83d9..9099bfb08 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2013 JogAmp Community. All rights reserved.
+ * Copyright 2013-2023 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:
@@ -40,10 +40,10 @@ import com.jogamp.opengl.util.texture.TextureSequence.TextureFrame;
abstract int getAvUtilMajorVersionCC0();
abstract int getAvFormatMajorVersionCC0();
abstract int getAvCodecMajorVersionCC0();
- abstract int getAvResampleMajorVersionCC0();
+ abstract int getAvDeviceMajorVersionCC0();
abstract int getSwResampleMajorVersionCC0();
- abstract long createInstance0(FFMPEGMediaPlayer upstream, boolean enableAvResample, boolean enableSwResample, boolean verbose);
+ abstract long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
abstract void destroyInstance0(long moviePtr);
/**
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0400Natives.java
index eff9ee5f5..0f7d02904 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0400Natives.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2013 JogAmp Community. All rights reserved.
+ * Copyright 2015-2023 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:
@@ -27,7 +27,7 @@
*/
package jogamp.opengl.util.av.impl;
-class FFMPEGv08Natives extends FFMPEGNatives {
+class FFMPEGv0400Natives extends FFMPEGNatives {
@Override
native boolean initSymbols0(Object mutex_avcodec_openclose, long[] symbols, int count);
@@ -41,13 +41,13 @@ class FFMPEGv08Natives extends FFMPEGNatives {
native int getAvCodecMajorVersionCC0();
@Override
- native int getAvResampleMajorVersionCC0();
+ native int getAvDeviceMajorVersionCC0();
@Override
native int getSwResampleMajorVersionCC0();
@Override
- native long createInstance0(FFMPEGMediaPlayer upstream, boolean enableAvResample, boolean enableSwResample, boolean verbose);
+ native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
@Override
native void destroyInstance0(long moviePtr);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0500Natives.java
index d61b39c77..8d62ac1c5 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0500Natives.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2013 JogAmp Community. All rights reserved.
+ * Copyright 2015-2023 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:
@@ -27,7 +27,7 @@
*/
package jogamp.opengl.util.av.impl;
-class FFMPEGv09Natives extends FFMPEGNatives {
+class FFMPEGv0500Natives extends FFMPEGNatives {
@Override
native boolean initSymbols0(Object mutex_avcodec_openclose, long[] symbols, int count);
@@ -41,13 +41,13 @@ class FFMPEGv09Natives extends FFMPEGNatives {
native int getAvCodecMajorVersionCC0();
@Override
- native int getAvResampleMajorVersionCC0();
+ native int getAvDeviceMajorVersionCC0();
@Override
native int getSwResampleMajorVersionCC0();
@Override
- native long createInstance0(FFMPEGMediaPlayer upstream, boolean enableAvResample, boolean enableSwResample, boolean verbose);
+ native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
@Override
native void destroyInstance0(long moviePtr);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0600Natives.java
index 109fd8953..0de167285 100644
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java
+++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv0600Natives.java
@@ -1,5 +1,5 @@
/**
- * Copyright 2013 JogAmp Community. All rights reserved.
+ * Copyright 2015-2023 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:
@@ -27,7 +27,7 @@
*/
package jogamp.opengl.util.av.impl;
-class FFMPEGv10Natives extends FFMPEGNatives {
+class FFMPEGv0600Natives extends FFMPEGNatives {
@Override
native boolean initSymbols0(Object mutex_avcodec_openclose, long[] symbols, int count);
@@ -41,13 +41,13 @@ class FFMPEGv10Natives extends FFMPEGNatives {
native int getAvCodecMajorVersionCC0();
@Override
- native int getAvResampleMajorVersionCC0();
+ native int getAvDeviceMajorVersionCC0();
@Override
native int getSwResampleMajorVersionCC0();
@Override
- native long createInstance0(FFMPEGMediaPlayer upstream, boolean enableAvResample, boolean enableSwResample, boolean verbose);
+ native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose);
@Override
native void destroyInstance0(long moviePtr);
diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv11Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv11Natives.java
deleted file mode 100644
index 9654eca82..000000000
--- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv11Natives.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright 2015 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.
- */
-package jogamp.opengl.util.av.impl;
-
-class FFMPEGv11Natives extends FFMPEGNatives {
- @Override
- native boolean initSymbols0(Object mutex_avcodec_openclose, long[] symbols, int count);
-
- @Override
- native int getAvUtilMajorVersionCC0();
-
- @Override
- native int getAvFormatMajorVersionCC0();
-
- @Override
- native int getAvCodecMajorVersionCC0();
-
- @Override
- native int getAvResampleMajorVersionCC0();
-
- @Override
- native int getSwResampleMajorVersionCC0();
-
- @Override
- native long createInstance0(FFMPEGMediaPlayer upstream, boolean enableAvResample, boolean enableSwResample, boolean verbose);
-
- @Override
- native void destroyInstance0(long moviePtr);
-
- @Override
- native void setStream0(long moviePtr, String url, boolean isCameraInput, int vid, String sizes, int vWidth, int vHeight, int vRate, int aid, int aMaxChannelCount, int aPrefSampleRate);
-
- @Override
- native void setGLFuncs0(long moviePtr, long procAddrGLTexSubImage2D, long procAddrGLGetError, long procAddrGLFlush, long procAddrGLFinish);
-
- @Override
- native int getVideoPTS0(long moviePtr);
-
- @Override
- native int getAudioPTS0(long moviePtr);
-
- @Override
- native int readNextPacket0(long moviePtr, int texTarget, int texFmt, int texType);
-
- @Override
- native int play0(long moviePtr);
-
- @Override
- native int pause0(long moviePtr);
-
- @Override
- native int seek0(long moviePtr, int position);
-}