diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c2ebba5106..9f0cacd36af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ * Map C++ JIT classes and functions of TorchScript in presets for PyTorch ([issue #1068](https://github.com/bytedeco/javacpp-presets/issues/1068)) * Synchronize `cachePackage()` and prevent repeated package caching in all presets ([pull #1071](https://github.com/bytedeco/javacpp-presets/pull/1071)) * Build FFmpeg with VA-API enabled and bundle its libraries to avoid loading issues ([issue bytedeco/javacv#1188](https://github.com/bytedeco/javacv/issues/1188)) - * Upgrade presets for OpenCV 4.5.5, FFmpeg 4.4.1, librealsense2 2.50.0, Arrow 6.0.1, MKL 2022.0, DNNL 2.5.2, OpenBLAS 0.3.19, FFTW 3.3.10, CPython 3.10.2, NumPy 1.22.1, SciPy 1.8.0, Gym 0.21.0, LLVM 13.0.0, libpostal 1.1, Leptonica 1.82.0, Tesseract 5.0.1, CUDA 11.6.0, cuDNN 8.3.2, NCCL 2.11.4, MXNet 1.9.0, PyTorch 1.10.1, TensorFlow Lite 2.7.0, TensorRT 8.2.2.1, ALE 0.7.3, DepthAI 2.14.1, ONNX 1.10.2, ONNX Runtime 1.10.0, TVM 0.8.0, ModSecurity 3.0.6, and their dependencies + * Upgrade presets for OpenCV 4.5.5, FFmpeg 5.0 ([pull #1125](https://github.com/bytedeco/javacpp-presets/pull/1125)), librealsense2 2.50.0, Arrow 6.0.1, MKL 2022.0, DNNL 2.5.2, OpenBLAS 0.3.19, FFTW 3.3.10, CPython 3.10.2, NumPy 1.22.1, SciPy 1.8.0, Gym 0.21.0, LLVM 13.0.0, libpostal 1.1, Leptonica 1.82.0, Tesseract 5.0.1, CUDA 11.6.0, cuDNN 8.3.2, NCCL 2.11.4, MXNet 1.9.0, PyTorch 1.10.1, TensorFlow Lite 2.7.0, TensorRT 8.2.2.1, ALE 0.7.3, DepthAI 2.14.1, ONNX 1.10.2, ONNX Runtime 1.10.0, TVM 0.8.0, ModSecurity 3.0.6, and their dependencies ### August 2, 2021 version 1.5.6 * Change `opencv_core.Mat` constructors to create column vectors out of arrays for consistency ([issue #1064](https://github.com/bytedeco/javacpp-presets/issues/1064)) diff --git a/README.md b/README.md index 11e7617da0b..e78590b6a49 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ The JavaCPP Presets depend on Maven, a powerful build system for Java, so before Each child module in turn relies by default on the included [`cppbuild.sh` scripts](#the-cppbuildsh-scripts), explained below, to install its corresponding native libraries in the `cppbuild` subdirectory. To use native libraries already installed somewhere else on the system, other installation directories than `cppbuild` can also be specified either in the `pom.xml` files or in the `.java` configuration files. The following versions are supported: * OpenCV 4.5.5 https://opencv.org/releases.html - * FFmpeg 4.4.x http://ffmpeg.org/download.html + * FFmpeg 5.0.x http://ffmpeg.org/download.html * FlyCapture 2.13.x https://www.flir.com/products/flycapture-sdk * Spinnaker 2.4.x https://www.flir.com/products/spinnaker-sdk * libdc1394 2.2.6 http://sourceforge.net/projects/libdc1394/files/ diff --git a/ffmpeg/README.md b/ffmpeg/README.md index 32923da124f..29b7217da98 100644 --- a/ffmpeg/README.md +++ b/ffmpeg/README.md @@ -9,7 +9,7 @@ Introduction ------------ This directory contains the JavaCPP Presets module for: - * FFmpeg 4.4.1 http://ffmpeg.org/ + * FFmpeg 5.0 http://ffmpeg.org/ Please refer to the parent README.md file for more detailed information about the JavaCPP Presets. @@ -46,14 +46,14 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic org.bytedeco ffmpeg-platform - 4.4.1-1.5.7-SNAPSHOT + 5.0-1.5.7-SNAPSHOT org.bytedeco ffmpeg-platform-gpl - 4.4.1-1.5.7-SNAPSHOT + 5.0-1.5.7-SNAPSHOT diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index 2f560743598..4d816260661 100755 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -40,7 +40,7 @@ MFX_VERSION=1.35.1 NVCODEC_VERSION=11.1.5.0 XML2=libxml2-2.9.12 LIBSRT_VERSION=1.4.4 -FFMPEG_VERSION=4.4.1 +FFMPEG_VERSION=5.0 download https://download.videolan.org/contrib/nasm/nasm-$NASM_VERSION.tar.gz nasm-$NASM_VERSION.tar.gz download http://zlib.net/$ZLIB.tar.gz $ZLIB.tar.gz download http://downloads.sourceforge.net/project/lame/lame/3.100/$LAME.tar.gz $LAME.tar.gz @@ -1526,8 +1526,8 @@ EOF make -j $MAKEJ make install cd ../mfx_dispatch-$MFX_VERSION - autoreconf -fiv - PKG_CONFIG_PATH="../lib/pkgconfig" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --enable-fast-install --with-pic --host=i686-w64-mingw32 # CFLAGS="-m32" CXXFLAGS="-m32" + sedinplace 's:${SOURCES}:${SOURCES} src/mfx_driver_store_loader.cpp:g' CMakeLists.txt + CC="gcc -m32" CXX="g++ -m32" $CMAKE -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release . make -j $MAKEJ make install cd ../nv-codec-headers-n$NVCODEC_VERSION @@ -1639,8 +1639,8 @@ EOF make -j $MAKEJ make install cd ../mfx_dispatch-$MFX_VERSION - autoreconf -fiv - PKG_CONFIG_PATH="../lib/pkgconfig" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --enable-fast-install --with-pic --host=x86_64-w64-mingw32 # CFLAGS="-m64" CXXFLAGS="-m64" + sedinplace 's:${SOURCES}:${SOURCES} src/mfx_driver_store_loader.cpp:g' CMakeLists.txt + CC="gcc -m64" CXX="g++ -m64" $CMAKE -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release . make -j $MAKEJ make install cd ../nv-codec-headers-n$NVCODEC_VERSION diff --git a/ffmpeg/ffmpeg.patch b/ffmpeg/ffmpeg.patch index 39c54aa39e3..56ddde199e0 100644 --- a/ffmpeg/ffmpeg.patch +++ b/ffmpeg/ffmpeg.patch @@ -1,15 +1,15 @@ ---- ffmpeg-4.4/configure 2021-04-09 07:28:39.000000000 +1000 -+++ linux-x86_64/ffmpeg-4.4/configure 2021-04-15 09:28:01.901102055 +1000 -@@ -6364,7 +6364,7 @@ +--- ffmpeg-5.0.orig/configure 2022-01-15 14:49:15.022054379 +1100 ++++ ffmpeg-5.0/configure 2022-01-15 14:52:15.648669638 +1100 +@@ -6532,7 +6532,7 @@ enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs enabled fontconfig && enable libfontconfig enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit -enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType +enabled libfreetype && add_cppflags -I ../include/freetype2/ && require libfreetype "ft2build.h FT_FREETYPE_H" FT_Init_FreeType -lfreetype enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info - enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ - enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu || -@@ -6382,8 +6382,7 @@ + enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \ + -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \ +@@ -6555,8 +6555,7 @@ # Media SDK or Intel Media Server Studio, these don't come with # pkg-config support. Instead, users should make sure that the build # can find the libraries and headers through other means. @@ -19,7 +19,7 @@ if enabled libmfx; then check_cc MFX_CODEC_VP9 "mfx/mfxvp9.h mfx/mfxstructures.h" "MFX_CODEC_VP9" fi -@@ -6401,19 +6400,12 @@ +@@ -6574,19 +6573,12 @@ { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader || require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } @@ -38,10 +38,10 @@ - } -} +enabled libopus && add_cppflags -I ../include/opus/ && require libopus opus_multistream.h opus_multistream_decoder_create -lopus + enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection - enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new -@@ -6427,8 +6419,8 @@ +@@ -6602,8 +6594,8 @@ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init @@ -52,7 +52,7 @@ enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.8.4" EbSvtAv1Enc.h svt_av1_enc_init_handle enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate -@@ -6447,19 +6439,15 @@ +@@ -6622,19 +6614,15 @@ enabled libvpx && { enabled libvpx_vp8_decoder && { @@ -72,7 +72,7 @@ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" } if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then -@@ -6470,12 +6458,12 @@ +@@ -6645,12 +6633,12 @@ enabled libwebp && { enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } @@ -87,7 +87,7 @@ require_cpp_condition libx265 x265.h "X265_BUILD >= 70" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get -@@ -6485,7 +6473,7 @@ +@@ -6660,7 +6648,7 @@ enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new && { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR > 0 || VBI_VERSION_MINOR > 2 || VBI_VERSION_MINOR == 2 && VBI_VERSION_MICRO >= 28" || enabled gpl || die "ERROR: libzvbi requires version 0.2.28 or --enable-gpl."; } @@ -96,8 +96,8 @@ enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init || check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init || check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto || -@@ -6526,9 +6514,9 @@ - enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || +@@ -6704,9 +6692,9 @@ + check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || check_pkg_config openssl openssl openssl/ssl.h SSL_library_init || check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || diff --git a/ffmpeg/platform/gpl/pom.xml b/ffmpeg/platform/gpl/pom.xml index 4453afa2814..3aabc7cc6e0 100644 --- a/ffmpeg/platform/gpl/pom.xml +++ b/ffmpeg/platform/gpl/pom.xml @@ -12,7 +12,7 @@ org.bytedeco ffmpeg-platform-gpl - 4.4.1-${project.parent.version} + 5.0-${project.parent.version} JavaCPP Presets Platform for FFmpeg (GPL enabled) diff --git a/ffmpeg/platform/pom.xml b/ffmpeg/platform/pom.xml index f5333528aa8..a763b9dec63 100644 --- a/ffmpeg/platform/pom.xml +++ b/ffmpeg/platform/pom.xml @@ -12,7 +12,7 @@ org.bytedeco ffmpeg-platform - 4.4.1-${project.parent.version} + 5.0-${project.parent.version} JavaCPP Presets Platform for FFmpeg diff --git a/ffmpeg/pom.xml b/ffmpeg/pom.xml index 0e7563085e6..4fb98aef294 100644 --- a/ffmpeg/pom.xml +++ b/ffmpeg/pom.xml @@ -11,7 +11,7 @@ org.bytedeco ffmpeg - 4.4.1-${project.parent.version} + 5.0-${project.parent.version} JavaCPP Presets for FFmpeg diff --git a/ffmpeg/samples/pom.xml b/ffmpeg/samples/pom.xml index a51ccc1b8c4..4da1e34e5b1 100644 --- a/ffmpeg/samples/pom.xml +++ b/ffmpeg/samples/pom.xml @@ -12,14 +12,14 @@ org.bytedeco ffmpeg-platform - 4.4.1-1.5.7-SNAPSHOT + 5.0-1.5.7-SNAPSHOT org.bytedeco ffmpeg-platform-gpl - 4.4.1-1.5.7-SNAPSHOT + 5.0-1.5.7-SNAPSHOT diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFContext.java index effa0a1f2da..f89e4c3b9af 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFContext.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFContext.java @@ -15,6 +15,11 @@ import static org.bytedeco.ffmpeg.global.avcodec.*; +/** + * \addtogroup lavc_core + * \{ + */ + /** * The bitstream filter state. * @@ -53,12 +58,6 @@ public class AVBSFContext extends Pointer { */ public native @Const AVBitStreamFilter filter(); public native AVBSFContext filter(AVBitStreamFilter setter); - /** - * Opaque libavcodec internal data. Must not be touched by the caller in any - * way. - */ - public native AVBSFInternal internal(); public native AVBSFContext internal(AVBSFInternal setter); - /** * Opaque filter-specific private data. If filter->priv_class is non-NULL, * this is an AVOptions-enabled struct. diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFInternal.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFInternal.java deleted file mode 100644 index d062d7df981..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBSFInternal.java +++ /dev/null @@ -1,29 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avcodec; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; - -import static org.bytedeco.ffmpeg.global.avcodec.*; - - -/** - * \addtogroup lavc_core - * \{ - */ - -@Opaque @Properties(inherit = org.bytedeco.ffmpeg.presets.avcodec.class) -public class AVBSFInternal extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public AVBSFInternal() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVBSFInternal(Pointer p) { super(p); } -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBitStreamFilterContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBitStreamFilterContext.java deleted file mode 100644 index 5804e1e4a37..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVBitStreamFilterContext.java +++ /dev/null @@ -1,46 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avcodec; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; - -import static org.bytedeco.ffmpeg.global.avcodec.*; - - -// #if FF_API_OLD_BSF -@Properties(inherit = org.bytedeco.ffmpeg.presets.avcodec.class) -public class AVBitStreamFilterContext extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public AVBitStreamFilterContext() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public AVBitStreamFilterContext(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVBitStreamFilterContext(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public AVBitStreamFilterContext position(long position) { - return (AVBitStreamFilterContext)super.position(position); - } - @Override public AVBitStreamFilterContext getPointer(long i) { - return new AVBitStreamFilterContext((Pointer)this).offsetAddress(i); - } - - public native Pointer priv_data(); public native AVBitStreamFilterContext priv_data(Pointer setter); - public native @Const AVBitStreamFilter filter(); public native AVBitStreamFilterContext filter(AVBitStreamFilter setter); - public native AVCodecParserContext parser(); public native AVBitStreamFilterContext parser(AVCodecParserContext setter); - public native AVBitStreamFilterContext next(); public native AVBitStreamFilterContext next(AVBitStreamFilterContext setter); - /** - * Internal default arguments, used if NULL is passed to av_bitstream_filter_filter(). - * Not for access by library users. - */ - public native @Cast("char*") BytePointer args(); public native AVBitStreamFilterContext args(BytePointer setter); -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCPBProperties.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCPBProperties.java index 9ea8a31ab68..f95078a6903 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCPBProperties.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCPBProperties.java @@ -42,32 +42,23 @@ public class AVCPBProperties extends Pointer { * Maximum bitrate of the stream, in bits per second. * Zero if unknown or unspecified. */ -// #if FF_API_UNSANITIZED_BITRATES - public native int max_bitrate(); public native AVCPBProperties max_bitrate(int setter); -// #else -// #endif + public native @Cast("int64_t") long max_bitrate(); public native AVCPBProperties max_bitrate(long setter); /** * Minimum bitrate of the stream, in bits per second. * Zero if unknown or unspecified. */ -// #if FF_API_UNSANITIZED_BITRATES - public native int min_bitrate(); public native AVCPBProperties min_bitrate(int setter); -// #else -// #endif + public native @Cast("int64_t") long min_bitrate(); public native AVCPBProperties min_bitrate(long setter); /** * Average bitrate of the stream, in bits per second. * Zero if unknown or unspecified. */ -// #if FF_API_UNSANITIZED_BITRATES - public native int avg_bitrate(); public native AVCPBProperties avg_bitrate(int setter); -// #else -// #endif + public native @Cast("int64_t") long avg_bitrate(); public native AVCPBProperties avg_bitrate(long setter); /** * The size of the buffer to which the ratecontrol is applied, in bits. * Zero if unknown or unspecified. */ - public native int buffer_size(); public native AVCPBProperties buffer_size(int setter); + public native @Cast("int64_t") long buffer_size(); public native AVCPBProperties buffer_size(long setter); /** * The delay between the time the packet this structure is associated with diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodec.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodec.java index c3066235cc0..b090cec6f9e 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodec.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodec.java @@ -55,6 +55,8 @@ public class AVCodec extends Pointer { * see AV_CODEC_CAP_* */ public native int capabilities(); public native AVCodec capabilities(int setter); + /** maximum value for lowres supported by the decoder */ + public native @Cast("uint8_t") byte max_lowres(); public native AVCodec max_lowres(byte setter); /** array of supported framerates, or NULL if any, array is terminated by {0,0} */ public native @Const AVRational supported_framerates(); public native AVCodec supported_framerates(AVRational setter); /** array of supported pixel formats, or NULL if unknown, array is terminated by -1 */ @@ -65,8 +67,6 @@ public class AVCodec extends Pointer { public native @Cast("const AVSampleFormat*") IntPointer sample_fmts(); public native AVCodec sample_fmts(IntPointer setter); /** array of support channel layouts, or NULL if unknown. array is terminated by 0 */ public native @Cast("const uint64_t*") LongPointer channel_layouts(); public native AVCodec channel_layouts(LongPointer setter); - /** maximum value for lowres supported by the decoder */ - public native @Cast("uint8_t") byte max_lowres(); public native AVCodec max_lowres(byte setter); /** AVClass for the private context */ public native @Const AVClass priv_class(); public native AVCodec priv_class(AVClass setter); /** array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN} */ @@ -91,10 +91,13 @@ public class AVCodec extends Pointer { * New public fields should be added right above. ***************************************************************** */ + /** + * Internal codec capabilities. + * See FF_CODEC_CAP_* in internal.h + */ + public native int caps_internal(); public native AVCodec caps_internal(int setter); + public native int priv_data_size(); public native AVCodec priv_data_size(int setter); -// #if FF_API_NEXT - public native AVCodec next(); public native AVCodec next(AVCodec setter); -// #endif /** * \name Frame-level threading support functions * \{ @@ -115,6 +118,19 @@ public static class Update_thread_context_AVCodecContext_AVCodecContext extends public native int call(AVCodecContext dst, @Const AVCodecContext src); } public native Update_thread_context_AVCodecContext_AVCodecContext update_thread_context(); public native AVCodec update_thread_context(Update_thread_context_AVCodecContext_AVCodecContext setter); + + /** + * Copy variables back to the user-facing context + */ + public static class Update_thread_context_for_user_AVCodecContext_AVCodecContext extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Update_thread_context_for_user_AVCodecContext_AVCodecContext(Pointer p) { super(p); } + protected Update_thread_context_for_user_AVCodecContext_AVCodecContext() { allocate(); } + private native void allocate(); + public native int call(AVCodecContext dst, @Const AVCodecContext src); + } + public native Update_thread_context_for_user_AVCodecContext_AVCodecContext update_thread_context_for_user(); public native AVCodec update_thread_context_for_user(Update_thread_context_for_user_AVCodecContext_AVCodecContext setter); /** \} */ /** @@ -250,11 +266,6 @@ public static class Flush_AVCodecContext extends FunctionPointer { public native void call(AVCodecContext arg0); } public native Flush_AVCodecContext flush(); public native AVCodec flush(Flush_AVCodecContext setter); - /** - * Internal codec capabilities. - * See FF_CODEC_CAP_* in internal.h - */ - public native int caps_internal(); public native AVCodec caps_internal(int setter); /** * Decoding only, a comma-separated list of bitstream filters to apply to diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecContext.java index c3c63d58029..636e81fc61f 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecContext.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecContext.java @@ -209,7 +209,7 @@ public class AVCodecContext extends Pointer { * picture width / height. * * \note Those fields may not match the values of the last - * AVFrame output by avcodec_decode_video2 due frame + * AVFrame output by avcodec_receive_frame() due frame * reordering. * * - encoding: MUST be set by user. @@ -295,17 +295,29 @@ public native void call(AVCodecContext s, public native Draw_horiz_band_AVCodecContext_AVFrame_IntPointer_int_int_int draw_horiz_band(); public native AVCodecContext draw_horiz_band(Draw_horiz_band_AVCodecContext_AVFrame_IntPointer_int_int_int setter); /** - * callback to negotiate the pixelFormat - * @param fmt is the list of formats which are supported by the codec, - * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality. - * The first is always the native one. - * \note The callback may be called again immediately if initialization for - * the selected (hardware-accelerated) pixel format failed. - * \warning Behavior is undefined if the callback returns a value not - * in the fmt list of formats. - * @return the chosen format - * - encoding: unused - * - decoding: Set by user, if not set the native format will be chosen. + * Callback to negotiate the pixel format. Decoding only, may be set by the + * caller before avcodec_open2(). + * + * Called by some decoders to select the pixel format that will be used for + * the output frames. This is mainly used to set up hardware acceleration, + * then the provided format list contains the corresponding hwaccel pixel + * formats alongside the "software" one. The software pixel format may also + * be retrieved from \ref sw_pix_fmt. + * + * This callback will be called when the coded frame properties (such as + * resolution, pixel format, etc.) change and more than one output format is + * supported for those new properties. If a hardware pixel format is chosen + * and initialization for it fails, the callback may be called again + * immediately. + * + * This callback may be called from different threads if the decoder is + * multi-threaded, but not from more than one thread simultaneously. + * + * @param fmt list of formats which may be used in the current + * configuration, terminated by AV_PIX_FMT_NONE. + * \warning Behavior is undefined if the callback returns a value other + * than one of the formats in fmt or AV_PIX_FMT_NONE. + * @return the chosen format or AV_PIX_FMT_NONE */ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer { static { Loader.load(); } @@ -334,11 +346,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native float b_quant_factor(); public native AVCodecContext b_quant_factor(float setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int b_frame_strategy(); public native AVCodecContext b_frame_strategy(int setter); -// #endif - /** * qscale offset between IP and B-frames * - encoding: Set by user. @@ -354,11 +361,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native int has_b_frames(); public native AVCodecContext has_b_frames(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int mpeg_quant(); public native AVCodecContext mpeg_quant(int setter); -// #endif - /** * qscale factor between P- and I-frames * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset). @@ -417,14 +419,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native int slice_count(); public native AVCodecContext slice_count(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int prediction_method(); public native AVCodecContext prediction_method(int setter); -public static final int FF_PRED_LEFT = 0; -public static final int FF_PRED_PLANE = 1; -public static final int FF_PRED_MEDIAN = 2; -// #endif - /** * slice offsets in the frame in bytes * - encoding: Set/allocated by libavcodec. @@ -497,11 +491,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native int last_predictor_count(); public native AVCodecContext last_predictor_count(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int pre_me(); public native AVCodecContext pre_me(int setter); -// #endif - /** * motion estimation prepass comparison function * - encoding: Set by user. @@ -576,14 +565,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native @Cast("uint16_t*") ShortPointer inter_matrix(); public native AVCodecContext inter_matrix(ShortPointer setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int scenechange_threshold(); public native AVCodecContext scenechange_threshold(int setter); - - /** @deprecated use encoder private options instead */ - public native @Deprecated int noise_reduction(); public native AVCodecContext noise_reduction(int setter); -// #endif - /** * precision of the intra DC coefficient - 8 * - encoding: Set by user. @@ -619,24 +600,12 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native int mb_lmax(); public native AVCodecContext mb_lmax(int setter); -// #if FF_API_PRIVATE_OPT - /** - * @deprecated use encoder private options instead - */ - public native @Deprecated int me_penalty_compensation(); public native AVCodecContext me_penalty_compensation(int setter); -// #endif - /** * - encoding: Set by user. * - decoding: unused */ public native int bidir_refine(); public native AVCodecContext bidir_refine(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int brd_scale(); public native AVCodecContext brd_scale(int setter); -// #endif - /** * minimum GOP size * - encoding: Set by user. @@ -651,11 +620,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native int refs(); public native AVCodecContext refs(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int chromaoffset(); public native AVCodecContext chromaoffset(int setter); -// #endif - /** * Note: Value depends upon the compare function used for fullpel ME. * - encoding: Set by user. @@ -663,11 +627,6 @@ public static class Get_format_AVCodecContext_IntPointer extends FunctionPointer */ public native int mv0_threshold(); public native AVCodecContext mv0_threshold(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int b_sensitivity(); public native AVCodecContext b_sensitivity(int setter); -// #endif - /** * Chromaticity coordinates of the source primaries. * - encoding: Set by user @@ -887,23 +846,6 @@ public static class Get_buffer2_AVCodecContext_AVFrame_int extends FunctionPoint } public native Get_buffer2_AVCodecContext_AVFrame_int get_buffer2(); public native AVCodecContext get_buffer2(Get_buffer2_AVCodecContext_AVFrame_int setter); -// #if FF_API_OLD_ENCDEC - /** - * If non-zero, the decoded audio and video frames returned from - * avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted - * and are valid indefinitely. The caller must free them with - * av_frame_unref() when they are not needed anymore. - * Otherwise, the decoded frames must not be freed by the caller and are - * only valid until the next decode call. - * - * This is always automatically enabled if avcodec_receive_frame() is used. - * - * - encoding: unused - * - decoding: set by the caller before avcodec_open2(). - */ - public native @Deprecated int refcounted_frames(); public native AVCodecContext refcounted_frames(int setter); -// #endif - /* - encoding parameters */ /** amount of qscale change between easy & hard scenes (0.0-1.0) */ public native float qcompress(); public native AVCodecContext qcompress(float setter); @@ -981,36 +923,6 @@ public static class Get_buffer2_AVCodecContext_AVFrame_int extends FunctionPoint */ public native int rc_initial_buffer_occupancy(); public native AVCodecContext rc_initial_buffer_occupancy(int setter); -// #if FF_API_CODER_TYPE -public static final int FF_CODER_TYPE_VLC = 0; -public static final int FF_CODER_TYPE_AC = 1; -public static final int FF_CODER_TYPE_RAW = 2; -public static final int FF_CODER_TYPE_RLE = 3; - /** - * @deprecated use encoder private options instead - */ - public native @Deprecated int coder_type(); public native AVCodecContext coder_type(int setter); -// #endif /* FF_API_CODER_TYPE */ - -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int context_model(); public native AVCodecContext context_model(int setter); -// #endif - -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int frame_skip_threshold(); public native AVCodecContext frame_skip_threshold(int setter); - - /** @deprecated use encoder private options instead */ - public native @Deprecated int frame_skip_factor(); public native AVCodecContext frame_skip_factor(int setter); - - /** @deprecated use encoder private options instead */ - public native @Deprecated int frame_skip_exp(); public native AVCodecContext frame_skip_exp(int setter); - - /** @deprecated use encoder private options instead */ - public native @Deprecated int frame_skip_cmp(); public native AVCodecContext frame_skip_cmp(int setter); -// #endif /* FF_API_PRIVATE_OPT */ - /** * trellis RD quantization * - encoding: Set by user. @@ -1018,63 +930,6 @@ public static class Get_buffer2_AVCodecContext_AVFrame_int extends FunctionPoint */ public native int trellis(); public native AVCodecContext trellis(int setter); -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int min_prediction_order(); public native AVCodecContext min_prediction_order(int setter); - - /** @deprecated use encoder private options instead */ - public native @Deprecated int max_prediction_order(); public native AVCodecContext max_prediction_order(int setter); - - /** @deprecated use encoder private options instead */ - public native @Cast("int64_t") @Deprecated long timecode_frame_start(); public native AVCodecContext timecode_frame_start(long setter); -// #endif - -// #if FF_API_RTP_CALLBACK - /** - * @deprecated unused - */ - /* The RTP callback: This function is called */ - /* every time the encoder has a packet to send. */ - /* It depends on the encoder if the data starts */ - /* with a Start Code (it should). H.263 does. */ - /* mb_nb contains the number of macroblocks */ - /* encoded in the RTP payload. */ - public static class Rtp_callback_AVCodecContext_Pointer_int_int extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Rtp_callback_AVCodecContext_Pointer_int_int(Pointer p) { super(p); } - protected Rtp_callback_AVCodecContext_Pointer_int_int() { allocate(); } - private native void allocate(); - public native @Deprecated void call(AVCodecContext avctx, Pointer data, int size, int mb_nb); - } - public native Rtp_callback_AVCodecContext_Pointer_int_int rtp_callback(); public native AVCodecContext rtp_callback(Rtp_callback_AVCodecContext_Pointer_int_int setter); -// #endif - -// #if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - public native @Deprecated int rtp_payload_size(); public native AVCodecContext rtp_payload_size(int setter); /* The size of the RTP payload: the coder will */ - /* do its best to deliver a chunk with size */ - /* below rtp_payload_size, the chunk will start */ - /* with a start code on some codecs like H.263. */ - /* This doesn't take account of any particular */ - /* headers inside the transmitted RTP payload. */ -// #endif - -// #if FF_API_STAT_BITS - /* statistics, used for 2-pass encoding */ - public native @Deprecated int mv_bits(); public native AVCodecContext mv_bits(int setter); - public native @Deprecated int header_bits(); public native AVCodecContext header_bits(int setter); - public native @Deprecated int i_tex_bits(); public native AVCodecContext i_tex_bits(int setter); - public native @Deprecated int p_tex_bits(); public native AVCodecContext p_tex_bits(int setter); - public native @Deprecated int i_count(); public native AVCodecContext i_count(int setter); - public native @Deprecated int p_count(); public native AVCodecContext p_count(int setter); - public native @Deprecated int skip_count(); public native AVCodecContext skip_count(int setter); - public native @Deprecated int misc_bits(); public native AVCodecContext misc_bits(int setter); - - /** @deprecated this field is unused */ - public native @Deprecated int frame_bits(); public native AVCodecContext frame_bits(int setter); -// #endif - /** * pass1 encoding statistics output buffer * - encoding: Set by libavcodec. @@ -1223,8 +1078,7 @@ public static class Rtp_callback_AVCodecContext_Pointer_int_int extends Function * For some hardware accelerators, a global context needs to be * provided by the user. In that case, this holds display-dependent * data FFmpeg cannot instantiate itself. Please refer to the - * FFmpeg HW accelerator documentation to know how to fill this - * is. e.g. for VA API, this is a struct vaapi_context. + * FFmpeg HW accelerator documentation to know how to fill this. * - encoding: unused * - decoding: Set by user */ @@ -1293,17 +1147,6 @@ public static class Rtp_callback_AVCodecContext_Pointer_int_int extends Function */ public native int lowres(); public native AVCodecContext lowres(int setter); -// #if FF_API_CODED_FRAME - /** - * the picture in the bitstream - * - encoding: Set by libavcodec. - * - decoding: unused - * - * @deprecated use the quality factor packet side data instead - */ - public native @Deprecated AVFrame coded_frame(); public native AVCodecContext coded_frame(AVFrame setter); -// #endif - /** * thread count * is used to decide how many independent tasks should be passed to execute() @@ -1589,32 +1432,6 @@ public static class Execute2_AVCodecContext_Func_AVCodecContext_Pointer_int_int_ public native @Cast("uint8_t*") BytePointer subtitle_header(); public native AVCodecContext subtitle_header(BytePointer setter); public native int subtitle_header_size(); public native AVCodecContext subtitle_header_size(int setter); -// #if FF_API_VBV_DELAY - /** - * VBV delay coded in the last frame (in periods of a 27 MHz clock). - * Used for compliant TS muxing. - * - encoding: Set by libavcodec. - * - decoding: unused. - * @deprecated this value is now exported as a part of - * AV_PKT_DATA_CPB_PROPERTIES packet side data - */ - public native @Cast("uint64_t") @Deprecated long vbv_delay(); public native AVCodecContext vbv_delay(long setter); -// #endif - -// #if FF_API_SIDEDATA_ONLY_PKT - /** - * Encoding only and set by default. Allow encoders to output packets - * that do not contain any encoded data, only side data. - * - * Some encoders need to output such packets, e.g. to update some stream - * parameters at the end of encoding. - * - * @deprecated this field disables the default behaviour and - * it is kept only for compatibility. - */ - public native @Deprecated int side_data_only_packets(); public native AVCodecContext side_data_only_packets(int setter); -// #endif - /** * Audio only. The number of "priming" samples (padding) inserted by the * encoder at the beginning of the audio. I.e. this number of leading @@ -1757,6 +1574,7 @@ public static class Execute2_AVCodecContext_Func_AVCodecContext_Pointer_int_int_ public native @Cast("unsigned") int properties(); public native AVCodecContext properties(int setter); public static final int FF_CODEC_PROPERTY_LOSSLESS = 0x00000001; public static final int FF_CODEC_PROPERTY_CLOSED_CAPTIONS = 0x00000002; +public static final int FF_CODEC_PROPERTY_FILM_GRAIN = 0x00000004; /** * Additional data associated with the entire coded stream. @@ -1791,15 +1609,12 @@ public static class Execute2_AVCodecContext_Func_AVCodecContext_Pointer_int_int_ */ public native AVBufferRef hw_frames_ctx(); public native AVCodecContext hw_frames_ctx(AVBufferRef setter); +// #if FF_API_SUB_TEXT_FORMAT /** - * Control the form of AVSubtitle.rects[N]->ass - * - decoding: set by user - * - encoding: unused + * @deprecated unused */ - public native int sub_text_format(); public native AVCodecContext sub_text_format(int setter); + public native @Deprecated int sub_text_format(); public native AVCodecContext sub_text_format(int setter); public static final int FF_SUB_TEXT_FMT_ASS = 0; -// #if FF_API_ASS_TIMING -public static final int FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS = 1; // #endif /** @@ -1929,6 +1744,10 @@ public static class Execute2_AVCodecContext_Func_AVCodecContext_Pointer_int_int_ * This callback must use the above value to calculate the required buffer size, * which must padded by at least AV_INPUT_BUFFER_PADDING_SIZE bytes. * + * In some specific cases, the encoder may not use the entire buffer allocated by this + * callback. This will be reflected in the size value in the packet once returned by + * avcodec_receive_packet(). + * * This callback must fill the following fields in the packet: * - data: alignment requirements for AVPacket apply, if any. Some architectures and * encoders may benefit from having aligned data. diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParser.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParser.java index e81c720917b..5cac850748e 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParser.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParser.java @@ -77,7 +77,4 @@ public static class Split_AVCodecContext_BytePointer_int extends FunctionPointer public native int call(AVCodecContext avctx, @Cast("const uint8_t*") BytePointer buf, int buf_size); } public native Split_AVCodecContext_BytePointer_int split(); public native AVCodecParser split(Split_AVCodecContext_BytePointer_int setter); -// #if FF_API_NEXT - public native @Deprecated AVCodecParser next(); public native AVCodecParser next(AVCodecParser setter); -// #endif } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParserContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParserContext.java index f80fc458f3a..6292205e782 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParserContext.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVCodecParserContext.java @@ -34,7 +34,7 @@ public class AVCodecParserContext extends Pointer { } public native Pointer priv_data(); public native AVCodecParserContext priv_data(Pointer setter); - public native AVCodecParser parser(); public native AVCodecParserContext parser(AVCodecParser setter); + public native @Const AVCodecParser parser(); public native AVCodecParserContext parser(AVCodecParser setter); public native @Cast("int64_t") long frame_offset(); public native AVCodecParserContext frame_offset(long setter); /* offset of the current frame */ public native @Cast("int64_t") long cur_offset(); public native AVCodecParserContext cur_offset(long setter); /* current offset (incremented by each av_parser_parse()) */ @@ -88,13 +88,6 @@ public class AVCodecParserContext extends Pointer { */ public native int key_frame(); public native AVCodecParserContext key_frame(int setter); -// #if FF_API_CONVERGENCE_DURATION - /** - * @deprecated unused - */ - public native @Cast("int64_t") @Deprecated long convergence_duration(); public native AVCodecParserContext convergence_duration(long setter); -// #endif - // Timestamp generation support: /** * Synchronization point for start of timestamp generation. diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacket.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacket.java index f8402fd2b81..37ed8a90456 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacket.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacket.java @@ -108,12 +108,27 @@ public class AVPacket extends Pointer { /** byte position in stream, -1 if unknown */ public native @Cast("int64_t") long pos(); public native AVPacket pos(long setter); -// #if FF_API_CONVERGENCE_DURATION /** - * @deprecated Same as the duration field, but as int64_t. This was required - * for Matroska subtitles, whose duration values could overflow when the - * duration field was still an int. + * for some private data of the user */ - public native @Cast("int64_t") @Deprecated long convergence_duration(); public native AVPacket convergence_duration(long setter); -// #endif + public native Pointer opaque(); public native AVPacket opaque(Pointer setter); + + /** + * AVBufferRef for free use by the API user. FFmpeg will never check the + * contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when + * the packet is unreferenced. av_packet_copy_props() calls create a new + * reference with av_buffer_ref() for the target packet's opaque_ref field. + * + * This is unrelated to the opaque field, although it serves a similar + * purpose. + */ + public native AVBufferRef opaque_ref(); public native AVPacket opaque_ref(AVBufferRef setter); + + /** + * Time base of the packet's timestamps. + * In the future, this field may be set on packets output by encoders or + * demuxers, but its value will be by default ignored on input to decoders + * or muxers. + */ + public native @ByRef AVRational time_base(); public native AVPacket time_base(AVRational setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacketSideData.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacketSideData.java index 7e10c26aec6..a04103cb3cf 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacketSideData.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPacketSideData.java @@ -34,9 +34,6 @@ public class AVPacketSideData extends Pointer { } public native @Cast("uint8_t*") BytePointer data(); public native AVPacketSideData data(BytePointer setter); -// #if FF_API_BUFFER_SIZE_T - public native int size(); public native AVPacketSideData size(int setter); -// #else -// #endif + public native @Cast("size_t") long size(); public native AVPacketSideData size(long setter); public native @Cast("AVPacketSideDataType") int type(); public native AVPacketSideData type(int setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPicture.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPicture.java deleted file mode 100644 index 150e59a13cb..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVPicture.java +++ /dev/null @@ -1,61 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avcodec; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; - -import static org.bytedeco.ffmpeg.global.avcodec.*; - - -/** - * \} - */ - -// #if FF_API_AVPICTURE -/** - * \defgroup lavc_picture AVPicture - * - * Functions for working with AVPicture - * \{ - */ - -/** - * Picture data structure. - * - * Up to four components can be stored into it, the last component is - * alpha. - * @deprecated use AVFrame or imgutils functions instead - */ -@Properties(inherit = org.bytedeco.ffmpeg.presets.avcodec.class) -public class AVPicture extends Pointer { - static { Loader.load(); } - /** Default native constructor. */ - public AVPicture() { super((Pointer)null); allocate(); } - /** Native array allocator. Access with {@link Pointer#position(long)}. */ - public AVPicture(long size) { super((Pointer)null); allocateArray(size); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVPicture(Pointer p) { super(p); } - private native void allocate(); - private native void allocateArray(long size); - @Override public AVPicture position(long position) { - return (AVPicture)super.position(position); - } - @Override public AVPicture getPointer(long i) { - return new AVPicture((Pointer)this).offsetAddress(i); - } - - /** pointers to the image data planes */ - public native @Cast("uint8_t*") @Deprecated BytePointer data(int i); public native AVPicture data(int i, BytePointer setter); - @MemberGetter public native @Cast("uint8_t**") @Deprecated PointerPointer data(); - /** number of bytes per line */ - public native @Deprecated int linesize(int i); public native AVPicture linesize(int i, int setter); - @MemberGetter public native @Deprecated IntPointer linesize(); -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVSubtitleRect.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVSubtitleRect.java index 2dd6f6ed173..2d03126b3c3 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVSubtitleRect.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/AVSubtitleRect.java @@ -44,12 +44,6 @@ public class AVSubtitleRect extends Pointer { /** number of colors in pict, undefined when pict is not set */ public native int nb_colors(); public native AVSubtitleRect nb_colors(int setter); -// #if FF_API_AVPICTURE - /** - * @deprecated unused - */ - public native @Deprecated @ByRef AVPicture pict(); public native AVSubtitleRect pict(AVPicture setter); -// #endif /** * data+linesize for the bitmap of this subtitle. * Can be set for text/ass as well once they are rendered. diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/Cb_PointerPointer_int.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/Cb_PointerPointer_int.java deleted file mode 100644 index 63c96e24908..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/Cb_PointerPointer_int.java +++ /dev/null @@ -1,52 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avcodec; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; - -import static org.bytedeco.ffmpeg.global.avcodec.*; - - -/** - * Register a user provided lock manager supporting the operations - * specified by AVLockOp. The "mutex" argument to the function points - * to a (void *) where the lockmgr should store/get a pointer to a user - * allocated mutex. It is NULL upon AV_LOCK_CREATE and equal to the - * value left by the last call for all other ops. If the lock manager is - * unable to perform the op then it should leave the mutex in the same - * state as when it was called and return a non-zero value. However, - * when called with AV_LOCK_DESTROY the mutex will always be assumed to - * have been successfully destroyed. If av_lockmgr_register succeeds - * it will return a non-negative value, if it fails it will return a - * negative value and destroy all mutex and unregister all callbacks. - * av_lockmgr_register is not thread-safe, it must be called from a - * single thread before any calls which make use of locking are used. - * - * @param cb User defined callback. av_lockmgr_register invokes calls - * to this callback and the previously registered callback. - * The callback will be used to create more than one mutex - * each of which must be backed by its own underlying locking - * mechanism (i.e. do not use a single static object to - * implement your lock manager). If cb is set to NULL the - * lockmgr will be unregistered. - * - * @deprecated This function does nothing, and always returns 0. Be sure to - * build with thread support to get basic thread safety. - */ -@Properties(inherit = org.bytedeco.ffmpeg.presets.avcodec.class) -public class Cb_PointerPointer_int extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Cb_PointerPointer_int(Pointer p) { super(p); } - protected Cb_PointerPointer_int() { allocate(); } - private native void allocate(); - public native int call(@Cast("void**") PointerPointer mutex, @Cast("AVLockOp") int op); -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/Cb_Pointer_int.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/Cb_Pointer_int.java deleted file mode 100644 index ba9a33360bb..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/Cb_Pointer_int.java +++ /dev/null @@ -1,25 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avcodec; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; - -import static org.bytedeco.ffmpeg.global.avcodec.*; - -@Properties(inherit = org.bytedeco.ffmpeg.presets.avcodec.class) -public class Cb_Pointer_int extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Cb_Pointer_int(Pointer p) { super(p); } - protected Cb_Pointer_int() { allocate(); } - private native void allocate(); - public native int call(@Cast("void**") @ByPtrPtr Pointer mutex, @Cast("AVLockOp") int op); -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/MpegEncContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/MpegEncContext.java index 60a9c0d90c6..2a0ad64fc22 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/MpegEncContext.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avcodec/MpegEncContext.java @@ -14,7 +14,6 @@ import static org.bytedeco.ffmpeg.global.avcodec.*; -// #endif @Opaque @Properties(inherit = org.bytedeco.ffmpeg.presets.avcodec.class) public class MpegEncContext extends Pointer { diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avdevice/AVDeviceInfo.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avdevice/AVDeviceInfo.java index adcf75ea4bb..7273db00add 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avdevice/AVDeviceInfo.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avdevice/AVDeviceInfo.java @@ -51,4 +51,8 @@ public class AVDeviceInfo extends Pointer { public native @Cast("char*") BytePointer device_name(); public native AVDeviceInfo device_name(BytePointer setter); /** human friendly name */ public native @Cast("char*") BytePointer device_description(); public native AVDeviceInfo device_description(BytePointer setter); + /** array indicating what media types(s), if any, a device can provide. If null, cannot provide any */ + public native @Cast("AVMediaType*") IntPointer media_types(); public native AVDeviceInfo media_types(IntPointer setter); + /** length of media_types array, 0 if device cannot provide any media types */ + public native int nb_media_types(); public native AVDeviceInfo nb_media_types(int setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilter.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilter.java index d58b1687ee0..ed418e0076e 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilter.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilter.java @@ -58,15 +58,16 @@ public class AVFilter extends Pointer { public native @Cast("const char*") BytePointer description(); public native AVFilter description(BytePointer setter); /** - * List of inputs, terminated by a zeroed element. + * List of static inputs. * * NULL if there are no (static) inputs. Instances of filters with * AVFILTER_FLAG_DYNAMIC_INPUTS set may have more inputs than present in * this list. */ public native @Const AVFilterPad inputs(); public native AVFilter inputs(AVFilterPad setter); + /** - * List of outputs, terminated by a zeroed element. + * List of static outputs. * * NULL if there are no (static) outputs. Instances of filters with * AVFILTER_FLAG_DYNAMIC_OUTPUTS set may have more outputs than present in @@ -97,6 +98,22 @@ public class AVFilter extends Pointer { ***************************************************************** */ + /** + * The number of entries in the list of inputs. + */ + public native @Cast("uint8_t") byte nb_inputs(); public native AVFilter nb_inputs(byte setter); + + /** + * The number of entries in the list of outputs. + */ + public native @Cast("uint8_t") byte nb_outputs(); public native AVFilter nb_outputs(byte setter); + + /** + * This field determines the state of the formats union. + * It is an enum FilterFormatsState value. + */ + public native @Cast("uint8_t") byte formats_state(); public native AVFilter formats_state(byte setter); + /** * Filter pre-initialization function * @@ -193,36 +210,68 @@ public static class Uninit_AVFilterContext extends FunctionPointer { public native Uninit_AVFilterContext uninit(); public native AVFilter uninit(Uninit_AVFilterContext setter); /** - * Query formats supported by the filter on its inputs and outputs. - * - * This callback is called after the filter is initialized (so the inputs - * and outputs are fixed), shortly before the format negotiation. This - * callback may be called more than once. - * - * This callback must set AVFilterLink.outcfg.formats on every input link and - * AVFilterLink.incfg.formats on every output link to a list of pixel/sample - * formats that the filter supports on that link. For audio links, this - * filter must also set \ref AVFilterLink.incfg.samplerates "in_samplerates" / - * \ref AVFilterLink.outcfg.samplerates "out_samplerates" and - * \ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" / - * \ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously. - * - * This callback may be NULL for filters with one input, in which case - * libavfilter assumes that it supports all input formats and preserves - * them on output. - * - * @return zero on success, a negative value corresponding to an - * AVERROR code otherwise + * The state of the following union is determined by formats_state. + * See the documentation of enum FilterFormatsState in internal.h. */ - public static class Query_formats_AVFilterContext extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Query_formats_AVFilterContext(Pointer p) { super(p); } - protected Query_formats_AVFilterContext() { allocate(); } - private native void allocate(); - public native int call(AVFilterContext arg0); - } - public native Query_formats_AVFilterContext query_formats(); public native AVFilter query_formats(Query_formats_AVFilterContext setter); + /** + * Query formats supported by the filter on its inputs and outputs. + * + * This callback is called after the filter is initialized (so the inputs + * and outputs are fixed), shortly before the format negotiation. This + * callback may be called more than once. + * + * This callback must set AVFilterLink.outcfg.formats on every input link + * and AVFilterLink.incfg.formats on every output link to a list of + * pixel/sample formats that the filter supports on that link. For audio + * links, this filter must also set \ref AVFilterLink.incfg.samplerates + * "in_samplerates" / \ref AVFilterLink.outcfg.samplerates "out_samplerates" + * and \ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" / + * \ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously. + * + * This callback must never be NULL if the union is in this state. + * + * @return zero on success, a negative value corresponding to an + * AVERROR code otherwise + */ + public static class Query_func_AVFilterContext extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Query_func_AVFilterContext(Pointer p) { super(p); } + protected Query_func_AVFilterContext() { allocate(); } + private native void allocate(); + public native int call(AVFilterContext arg0); + } + @Name("formats.query_func") public native Query_func_AVFilterContext formats_query_func(); public native AVFilter formats_query_func(Query_func_AVFilterContext setter); + /** + * A pointer to an array of admissible pixel formats delimited + * by AV_PIX_FMT_NONE. The generic code will use this list + * to indicate that this filter supports each of these pixel formats, + * provided that all inputs and outputs use the same pixel format. + * + * This list must never be NULL if the union is in this state. + * The type of all inputs and outputs of filters using this must + * be AVMEDIA_TYPE_VIDEO. + */ + @Name("formats.pixels_list") public native @Cast("const AVPixelFormat*") IntPointer formats_pixels_list(); public native AVFilter formats_pixels_list(IntPointer setter); + /** + * Analogous to pixels, but delimited by AV_SAMPLE_FMT_NONE + * and restricted to filters that only have AVMEDIA_TYPE_AUDIO + * inputs and outputs. + * + * In addition to that the generic code will mark all inputs + * and all outputs as supporting all sample rates and every + * channel count and channel layout, as long as all inputs + * and outputs use the same sample rate and channel count/layout. + */ + @Name("formats.samples_list") public native @Cast("const AVSampleFormat*") IntPointer formats_samples_list(); public native AVFilter formats_samples_list(IntPointer setter); + /** + * Equivalent to { pix_fmt, AV_PIX_FMT_NONE } as pixels_list. + */ + @Name("formats.pix_fmt") public native @Cast("AVPixelFormat") int formats_pix_fmt(); public native AVFilter formats_pix_fmt(int setter); + /** + * Equivalent to { sample_fmt, AV_SAMPLE_FMT_NONE } as samples_list. + */ + @Name("formats.sample_fmt") public native @Cast("AVSampleFormat") int formats_sample_fmt(); public native AVFilter formats_sample_fmt(int setter); /** size of private data to allocate for the filter */ public native int priv_size(); public native AVFilter priv_size(int setter); @@ -230,14 +279,6 @@ public static class Query_formats_AVFilterContext extends FunctionPointer { /** Additional flags for avfilter internal use only. */ public native int flags_internal(); public native AVFilter flags_internal(int setter); -// #if FF_API_NEXT - /** - * Used by the filter registration system. Must not be touched by any other - * code. - */ - public native AVFilter next(); public native AVFilter next(AVFilter setter); -// #endif - /** * Make the filter instance process a command. * @@ -260,21 +301,6 @@ public static class Process_command_AVFilterContext_BytePointer_BytePointer_Byte } public native Process_command_AVFilterContext_BytePointer_BytePointer_BytePointer_int_int process_command(); public native AVFilter process_command(Process_command_AVFilterContext_BytePointer_BytePointer_BytePointer_int_int setter); - /** - * Filter initialization function, alternative to the init() - * callback. Args contains the user-supplied parameters, opaque is - * used for providing binary data. - */ - public static class Init_opaque_AVFilterContext_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Init_opaque_AVFilterContext_Pointer(Pointer p) { super(p); } - protected Init_opaque_AVFilterContext_Pointer() { allocate(); } - private native void allocate(); - public native int call(AVFilterContext ctx, Pointer opaque); - } - public native Init_opaque_AVFilterContext_Pointer init_opaque(); public native AVFilter init_opaque(Init_opaque_AVFilterContext_Pointer setter); - /** * Filter activation function. * diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterGraph.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterGraph.java index e50c5b05539..42aed813bf7 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterGraph.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterGraph.java @@ -48,10 +48,6 @@ public class AVFilterGraph extends Pointer { /** sws options to use for the auto-inserted scale filters */ public native @Cast("char*") BytePointer scale_sws_opts(); public native AVFilterGraph scale_sws_opts(BytePointer setter); -// #if FF_API_LAVR_OPTS - /** libavresample options to use for the auto-inserted resample filters */ - public native @Cast("char*") @Deprecated BytePointer resample_lavr_opts(); public native AVFilterGraph resample_lavr_opts(BytePointer setter); -// #endif /** * Type of multithreading allowed for filters in this graph. A combination diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterLink.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterLink.java index 5ad7d44ff01..ba0d49fed91 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterLink.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avfilter/AVFilterLink.java @@ -154,20 +154,9 @@ public class AVFilterLink extends Pointer { */ public native @ByRef AVRational frame_rate(); public native AVFilterLink frame_rate(AVRational setter); - /** - * Buffer partially filled with samples to achieve a fixed/minimum size. - */ - public native AVFrame partial_buf(); public native AVFilterLink partial_buf(AVFrame setter); - - /** - * Size of the partial buffer to allocate. - * Must be between min_samples and max_samples. - */ - public native int partial_buf_size(); public native AVFilterLink partial_buf_size(int setter); - /** * Minimum number of samples to filter at once. If filter_frame() is - * called with fewer samples, it will accumulate them in partial_buf. + * called with fewer samples, it will accumulate them in fifo. * This field and the related ones must not be changed after filtering * has started. * If 0, all related fields are ignored. @@ -191,6 +180,12 @@ public class AVFilterLink extends Pointer { public native @Cast("int64_t") long frame_count_in(); public native AVFilterLink frame_count_in(long setter); public native @Cast("int64_t") long frame_count_out(); public native AVFilterLink frame_count_out(long setter); + /** + * Number of past samples sent through the link. + */ + public native @Cast("int64_t") long sample_count_in(); public native AVFilterLink sample_count_in(long setter); + public native @Cast("int64_t") long sample_count_out(); public native AVFilterLink sample_count_out(long setter); + /** * A pointer to a FFFramePool struct. */ diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVChapter.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVChapter.java index 60e04e0377a..018a8eec7a0 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVChapter.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVChapter.java @@ -35,11 +35,8 @@ public class AVChapter extends Pointer { return new AVChapter((Pointer)this).offsetAddress(i); } -// #if FF_API_CHAPTER_ID_INT /** unique ID to identify the chapter */ - public native int id(); public native AVChapter id(int setter); -// #else -// #endif + public native @Cast("int64_t") long id(); public native AVChapter id(long setter); /** time base in which the start/end timestamps are specified */ public native @ByRef AVRational time_base(); public native AVChapter time_base(AVRational setter); /** chapter start/end time in time_base units */ diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatContext.java index a7398c939a5..c17fd2c8b94 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatContext.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatContext.java @@ -60,14 +60,14 @@ public class AVFormatContext extends Pointer { * * Demuxing only, set by avformat_open_input(). */ - public native AVInputFormat iformat(); public native AVFormatContext iformat(AVInputFormat setter); + public native @Const AVInputFormat iformat(); public native AVFormatContext iformat(AVInputFormat setter); /** * The output container format. * * Muxing only, must be set by the caller before avformat_write_header(). */ - public native AVOutputFormat oformat(); public native AVFormatContext oformat(AVOutputFormat setter); + public native @Const AVOutputFormat oformat(); public native AVFormatContext oformat(AVOutputFormat setter); /** * Format private data. This is an AVOptions-enabled struct @@ -119,19 +119,6 @@ public class AVFormatContext extends Pointer { public native AVStream streams(int i); public native AVFormatContext streams(int i, AVStream setter); public native @Cast("AVStream**") PointerPointer streams(); public native AVFormatContext streams(PointerPointer setter); -// #if FF_API_FORMAT_FILENAME - /** - * input or output filename - * - * - demuxing: set by avformat_open_input() - * - muxing: may be set by the caller before avformat_write_header() - * - * @deprecated Use url instead. - */ - public native @Cast("char") @Deprecated byte filename(int i); public native AVFormatContext filename(int i, byte setter); - @MemberGetter public native @Cast("char*") @Deprecated BytePointer filename(); -// #endif - /** * input or output URL. Unlike the old filename field, this field has no * length restriction. @@ -208,20 +195,12 @@ public class AVFormatContext extends Pointer { * This flag is mainly intended for testing. */ public static final int AVFMT_FLAG_BITEXACT = 0x0400; -// #if FF_API_LAVF_MP4A_LATM -/** Deprecated, does nothing. */ -public static final int AVFMT_FLAG_MP4A_LATM = 0x8000; -// #endif /** try to interleave outputted packets by dts (using this flag can slow demuxing down) */ public static final int AVFMT_FLAG_SORT_DTS = 0x10000; // #if FF_API_LAVF_PRIV_OPT -/** Enable use of private options by delaying codec open (deprecated, will do nothing once av_demuxer_open() is removed) */ +/** Enable use of private options by delaying codec open (deprecated, does nothing) */ public static final int AVFMT_FLAG_PRIV_OPT = 0x20000; // #endif -// #if FF_API_LAVF_KEEPSIDE_FLAG -/** Deprecated, does nothing. */ -public static final int AVFMT_FLAG_KEEP_SIDE_DATA = 0x40000; -// #endif /** Enable fast, but inaccurate seeks for some formats */ public static final int AVFMT_FLAG_FAST_SEEK = 0x80000; /** Stop muxing when the shortest stream stops. */ @@ -230,9 +209,15 @@ public class AVFormatContext extends Pointer { public static final int AVFMT_FLAG_AUTO_BSF = 0x200000; /** - * Maximum size of the data read from input for determining - * the input container format. + * Maximum number of bytes read from input in order to determine stream + * properties. Used when reading the global header and in + * avformat_find_stream_info(). + * * Demuxing only, set by the caller before avformat_open_input(). + * + * \note this is \e not used for determining the \ref AVInputFormat + * "input format" + * @see format_probesize */ public native @Cast("int64_t") long probesize(); public native AVFormatContext probesize(long setter); @@ -512,9 +497,13 @@ public class AVFormatContext extends Pointer { public native int probe_score(); public native AVFormatContext probe_score(int setter); /** - * number of bytes to read maximally to identify format. - * - encoding: unused - * - decoding: set by user + * Maximum number of bytes read from input in order to identify the + * \ref AVInputFormat "input format". Only used when the format is not set + * explicitly by the caller. + * + * Demuxing only, set by the caller before avformat_open_input(). + * + * @see probesize */ public native int format_probesize(); public native AVFormatContext format_probesize(int setter); @@ -534,12 +523,6 @@ public class AVFormatContext extends Pointer { */ public native @Cast("char*") BytePointer format_whitelist(); public native AVFormatContext format_whitelist(BytePointer setter); - /** - * An opaque field for libavformat internal usage. - * Must not be accessed in any way by callers. - */ - public native AVFormatInternal internal(); public native AVFormatContext internal(AVFormatInternal setter); - /** * IO repositioned flag. * This is set by avformat when the underlaying IO context read pointer @@ -554,7 +537,7 @@ public class AVFormatContext extends Pointer { * the same codec_id. * Demuxing: Set by user */ - public native AVCodec video_codec(); public native AVFormatContext video_codec(AVCodec setter); + public native @Const AVCodec video_codec(); public native AVFormatContext video_codec(AVCodec setter); /** * Forced audio codec. @@ -562,7 +545,7 @@ public class AVFormatContext extends Pointer { * the same codec_id. * Demuxing: Set by user */ - public native AVCodec audio_codec(); public native AVFormatContext audio_codec(AVCodec setter); + public native @Const AVCodec audio_codec(); public native AVFormatContext audio_codec(AVCodec setter); /** * Forced subtitle codec. @@ -570,7 +553,7 @@ public class AVFormatContext extends Pointer { * the same codec_id. * Demuxing: Set by user */ - public native AVCodec subtitle_codec(); public native AVFormatContext subtitle_codec(AVCodec setter); + public native @Const AVCodec subtitle_codec(); public native AVFormatContext subtitle_codec(AVCodec setter); /** * Forced data codec. @@ -578,7 +561,7 @@ public class AVFormatContext extends Pointer { * the same codec_id. * Demuxing: Set by user */ - public native AVCodec data_codec(); public native AVFormatContext data_codec(AVCodec setter); + public native @Const AVCodec data_codec(); public native AVFormatContext data_codec(AVCodec setter); /** * Number of bytes to be written as padding in a metadata header. @@ -618,35 +601,6 @@ public class AVFormatContext extends Pointer { */ public native @Cast("AVCodecID") int data_codec_id(); public native AVFormatContext data_codec_id(int setter); -// #if FF_API_OLD_OPEN_CALLBACKS - /** - * Called to open further IO contexts when needed for demuxing. - * - * This can be set by the user application to perform security checks on - * the URLs before opening them. - * The function should behave like avio_open2(), AVFormatContext is provided - * as contextual information and to reach AVFormatContext.opaque. - * - * If NULL then some simple checks are used together with avio_open2(). - * - * Must not be accessed directly from outside avformat. - * \See av_format_set_open_cb() - * - * Demuxing: Set by user. - * - * @deprecated Use io_open and io_close. - */ - public static class Open_cb_AVFormatContext_PointerPointer_BytePointer_int_AVIOInterruptCB_PointerPointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Open_cb_AVFormatContext_PointerPointer_BytePointer_int_AVIOInterruptCB_PointerPointer(Pointer p) { super(p); } - protected Open_cb_AVFormatContext_PointerPointer_BytePointer_int_AVIOInterruptCB_PointerPointer() { allocate(); } - private native void allocate(); - public native @Deprecated int call(AVFormatContext s, @Cast("AVIOContext**") PointerPointer p, @Cast("const char*") BytePointer url, int flags, @Const AVIOInterruptCB int_cb, @Cast("AVDictionary**") PointerPointer options); - } - public native Open_cb_AVFormatContext_PointerPointer_BytePointer_int_AVIOInterruptCB_PointerPointer open_cb(); public native AVFormatContext open_cb(Open_cb_AVFormatContext_PointerPointer_BytePointer_int_AVIOInterruptCB_PointerPointer setter); -// #endif - /** * ',' separated list of allowed protocols. * - encoding: unused @@ -725,4 +679,25 @@ public static class Io_close_AVFormatContext_AVIOContext extends FunctionPointer * - decoding: set by user */ public native int max_probe_packets(); public native AVFormatContext max_probe_packets(int setter); + + /** + * A callback for closing the streams opened with AVFormatContext.io_open(). + * + * Using this is preferred over io_close, because this can return an error. + * Therefore this callback is used instead of io_close by the generic + * libavformat code if io_close is NULL or the default. + * + * @param s the format context + * @param pb IO context to be closed and freed + * @return 0 on success, a negative AVERROR code on failure + */ + public static class Io_close2_AVFormatContext_AVIOContext extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Io_close2_AVFormatContext_AVIOContext(Pointer p) { super(p); } + protected Io_close2_AVFormatContext_AVIOContext() { allocate(); } + private native void allocate(); + public native int call(AVFormatContext s, AVIOContext pb); + } + public native Io_close2_AVFormatContext_AVIOContext io_close2(); public native AVFormatContext io_close2(Io_close2_AVFormatContext_AVIOContext setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatInternal.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatInternal.java deleted file mode 100644 index 2862bc09dd0..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVFormatInternal.java +++ /dev/null @@ -1,26 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avformat; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; -import org.bytedeco.ffmpeg.avcodec.*; -import static org.bytedeco.ffmpeg.global.avcodec.*; - -import static org.bytedeco.ffmpeg.global.avformat.*; - - -@Opaque @Properties(inherit = org.bytedeco.ffmpeg.presets.avformat.class) -public class AVFormatInternal extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public AVFormatInternal() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVFormatInternal(Pointer p) { super(p); } -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVIOContext.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVIOContext.java index 4a268114064..d847e8d78c3 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVIOContext.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVIOContext.java @@ -19,9 +19,9 @@ /** * Bytestream IO Context. - * New fields can be added to the end with minor version bumps. - * Removal, reordering and changes to existing fields require a major - * version bump. + * New public fields can be added with minor version bumps. + * Removal, reordering and changes to existing public fields require + * a major version bump. * sizeof(AVIOContext) must not be used outside libav*. * * \note None of the function pointers in AVIOContext should be called @@ -156,9 +156,14 @@ public static class Seek_Pointer_long_int extends FunctionPointer { public native @Cast("int64_t") long pos(); public native AVIOContext pos(long setter); /** true if was unable to read due to error or eof */ public native int eof_reached(); public native AVIOContext eof_reached(int setter); + /** contains the error code or 0 if no error happened */ + public native int error(); public native AVIOContext error(int setter); /** true if open for writing */ public native int write_flag(); public native AVIOContext write_flag(int setter); public native int max_packet_size(); public native AVIOContext max_packet_size(int setter); + /** Try to buffer at least this amount of data + before flushing it. */ + public native int min_packet_size(); public native AVIOContext min_packet_size(int setter); public native @Cast("unsigned long") long checksum(); public native AVIOContext checksum(long setter); public native @Cast("unsigned char*") BytePointer checksum_ptr(); public native AVIOContext checksum_ptr(BytePointer setter); public static class Update_checksum_long_BytePointer_int extends FunctionPointer { @@ -170,8 +175,6 @@ public static class Update_checksum_long_BytePointer_int extends FunctionPointer public native @Cast("unsigned long") long call(@Cast("unsigned long") long checksum, @Cast("const uint8_t*") BytePointer buf, @Cast("unsigned int") int size); } public native Update_checksum_long_BytePointer_int update_checksum(); public native AVIOContext update_checksum(Update_checksum_long_BytePointer_int setter); - /** contains the error code or 0 if no error happened */ - public native int error(); public native AVIOContext error(int setter); /** * Pause or resume playback for network streaming protocols - e.g. MMS. */ @@ -204,12 +207,6 @@ public static class Read_seek_Pointer_int_long_int extends FunctionPointer { */ public native int seekable(); public native AVIOContext seekable(int setter); - /** - * max filesize, used to limit allocations - * This field is internal to libavformat and access from outside is not allowed. - */ - public native @Cast("int64_t") long maxsize(); public native AVIOContext maxsize(long setter); - /** * avio_read and avio_write should if possible be satisfied directly * instead of going through a buffer, and avio_seek will always @@ -217,37 +214,6 @@ public static class Read_seek_Pointer_int_long_int extends FunctionPointer { */ public native int direct(); public native AVIOContext direct(int setter); - /** - * Bytes read statistic - * This field is internal to libavformat and access from outside is not allowed. - */ - public native @Cast("int64_t") long bytes_read(); public native AVIOContext bytes_read(long setter); - - /** - * seek statistic - * This field is internal to libavformat and access from outside is not allowed. - */ - public native int seek_count(); public native AVIOContext seek_count(int setter); - - /** - * writeout statistic - * This field is internal to libavformat and access from outside is not allowed. - */ - public native int writeout_count(); public native AVIOContext writeout_count(int setter); - - /** - * Original buffer size - * used internally after probing and ensure seekback to reset the buffer size - * This field is internal to libavformat and access from outside is not allowed. - */ - public native int orig_buffer_size(); public native AVIOContext orig_buffer_size(int setter); - - /** - * Threshold to favor readahead over seek. - * This is current internal only, do not use from outside. - */ - public native int short_seek_threshold(); public native AVIOContext short_seek_threshold(int setter); - /** * ',' separated list of allowed protocols. */ @@ -278,27 +244,14 @@ public native int call(Pointer opaque, @Cast("uint8_t*") BytePointer buf, int bu */ public native int ignore_boundary_point(); public native AVIOContext ignore_boundary_point(int setter); +// #if FF_API_AVIOCONTEXT_WRITTEN /** - * Internal, not meant to be used from outside of AVIOContext. + * @deprecated field utilized privately by libavformat. For a public + * statistic of how many bytes were written out, see + * AVIOContext::bytes_written. */ - public native @Cast("AVIODataMarkerType") int current_type(); public native AVIOContext current_type(int setter); - public native @Cast("int64_t") long last_time(); public native AVIOContext last_time(long setter); - - /** - * A callback that is used instead of short_seek_threshold. - * This is current internal only, do not use from outside. - */ - public static class Short_seek_get_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Short_seek_get_Pointer(Pointer p) { super(p); } - protected Short_seek_get_Pointer() { allocate(); } - private native void allocate(); - public native int call(Pointer opaque); - } - public native Short_seek_get_Pointer short_seek_get(); public native AVIOContext short_seek_get(Short_seek_get_Pointer setter); - - public native @Cast("int64_t") long written(); public native AVIOContext written(long setter); + public native @Cast("int64_t") @Deprecated long written(); public native AVIOContext written(long setter); +// #endif /** * Maximum reached position before a backward seek in the write buffer, @@ -307,7 +260,12 @@ public static class Short_seek_get_Pointer extends FunctionPointer { public native @Cast("unsigned char*") BytePointer buf_ptr_max(); public native AVIOContext buf_ptr_max(BytePointer setter); /** - * Try to buffer at least this amount of data before flushing it + * Read-only statistic of bytes read for this AVIOContext. */ - public native int min_packet_size(); public native AVIOContext min_packet_size(int setter); + public native @Cast("int64_t") long bytes_read(); public native AVIOContext bytes_read(long setter); + + /** + * Read-only statistic of bytes written for this AVIOContext. + */ + public native @Cast("int64_t") long bytes_written(); public native AVIOContext bytes_written(long setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVInputFormat.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVInputFormat.java index 27f9dd74220..5d107356293 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVInputFormat.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVInputFormat.java @@ -89,10 +89,6 @@ public class AVInputFormat extends Pointer { * New public fields should be added right above. ***************************************************************** */ -// #if FF_API_NEXT - public native AVInputFormat next(); public native AVInputFormat next(AVInputFormat setter); -// #endif - /** * Raw demuxers store their codec ID here. */ @@ -103,6 +99,11 @@ public class AVInputFormat extends Pointer { */ public native int priv_data_size(); public native AVInputFormat priv_data_size(int setter); + /** + * Internal flags. See FF_FMT_FLAG_* in internal.h. + */ + public native int flags_internal(); public native AVInputFormat flags_internal(int setter); + /** * Tell if a given file has a chance of being parsed as this format. * The buffer provided is guaranteed to be AVPROBE_PADDING_SIZE bytes @@ -257,33 +258,4 @@ public static class Get_device_list_AVFormatContext_Pointer extends FunctionPoin } public native Get_device_list_AVFormatContext_Pointer get_device_list(); public native AVInputFormat get_device_list(Get_device_list_AVFormatContext_Pointer setter); -// #if LIBAVFORMAT_VERSION_MAJOR < 59 - /** - * Initialize device capabilities submodule. - * @see avdevice_capabilities_create() for more details. - */ - public static class Create_device_capabilities_AVFormatContext_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Create_device_capabilities_AVFormatContext_Pointer(Pointer p) { super(p); } - protected Create_device_capabilities_AVFormatContext_Pointer() { allocate(); } - private native void allocate(); - public native int call(AVFormatContext s, @Cast("AVDeviceCapabilitiesQuery*") Pointer caps); - } - public native Create_device_capabilities_AVFormatContext_Pointer create_device_capabilities(); public native AVInputFormat create_device_capabilities(Create_device_capabilities_AVFormatContext_Pointer setter); - - /** - * Free device capabilities submodule. - * @see avdevice_capabilities_free() for more details. - */ - public static class Free_device_capabilities_AVFormatContext_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Free_device_capabilities_AVFormatContext_Pointer(Pointer p) { super(p); } - protected Free_device_capabilities_AVFormatContext_Pointer() { allocate(); } - private native void allocate(); - public native int call(AVFormatContext s, @Cast("AVDeviceCapabilitiesQuery*") Pointer caps); - } - public native Free_device_capabilities_AVFormatContext_Pointer free_device_capabilities(); public native AVInputFormat free_device_capabilities(Free_device_capabilities_AVFormatContext_Pointer setter); -// #endif } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVOutputFormat.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVOutputFormat.java index 931a02a89c5..f241c5ce94d 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVOutputFormat.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVOutputFormat.java @@ -82,23 +82,16 @@ public class AVOutputFormat extends Pointer { * New public fields should be added right above. ***************************************************************** */ - /** - * The ff_const59 define is not part of the public API and will - * be removed without further warning. - */ -// #if FF_API_AVIOFORMAT -// #define ff_const59 -// #else -// #define ff_const59 const -// #endif -// #if FF_API_NEXT - public native AVOutputFormat next(); public native AVOutputFormat next(AVOutputFormat setter); -// #endif /** * size of private data so that it can be allocated in the wrapper */ public native int priv_data_size(); public native AVOutputFormat priv_data_size(int setter); + /** + * Internal flags. See FF_FMT_FLAG_* in internal.h. + */ + public native int flags_internal(); public native AVOutputFormat flags_internal(int setter); + public static class Write_header_AVFormatContext extends FunctionPointer { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ @@ -136,17 +129,29 @@ public static class Write_trailer_AVFormatContext extends FunctionPointer { /** * A format-specific function for interleavement. * If unset, packets will be interleaved by dts. + * + * @param s An AVFormatContext for output. pkt will be added to + * resp. taken from its packet buffer. + * @param pkt [in,out] A packet to be interleaved if has_packet is set; + * also used to return packets. If no packet is returned + * (e.g. on error), pkt is blank on return. + * @param flush 1 if no further packets are available as input and + * all remaining packets should be output. + * @param has_packet If set, pkt contains a packet to be interleaved + * on input; otherwise pkt is blank on input. + * @return 1 if a packet was output, 0 if no packet could be output, + * < 0 if an error occurred */ - public static class Interleave_packet_AVFormatContext_AVPacket_AVPacket_int extends FunctionPointer { + public static class Interleave_packet_AVFormatContext_AVPacket_int_int extends FunctionPointer { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Interleave_packet_AVFormatContext_AVPacket_AVPacket_int(Pointer p) { super(p); } - protected Interleave_packet_AVFormatContext_AVPacket_AVPacket_int() { allocate(); } + public Interleave_packet_AVFormatContext_AVPacket_int_int(Pointer p) { super(p); } + protected Interleave_packet_AVFormatContext_AVPacket_int_int() { allocate(); } private native void allocate(); - public native int call(AVFormatContext arg0, AVPacket out, - AVPacket in, int flush); + public native int call(AVFormatContext s, AVPacket pkt, + int flush, int has_packet); } - public native Interleave_packet_AVFormatContext_AVPacket_AVPacket_int interleave_packet(); public native AVOutputFormat interleave_packet(Interleave_packet_AVFormatContext_AVPacket_AVPacket_int setter); + public native Interleave_packet_AVFormatContext_AVPacket_int_int interleave_packet(); public native AVOutputFormat interleave_packet(Interleave_packet_AVFormatContext_AVPacket_int_int setter); /** * Test if the given codec can be stored in this container. * @@ -219,34 +224,6 @@ public static class Get_device_list_AVFormatContext_Pointer extends FunctionPoin public native int call(AVFormatContext s, @Cast("AVDeviceInfoList*") Pointer device_list); } public native Get_device_list_AVFormatContext_Pointer get_device_list(); public native AVOutputFormat get_device_list(Get_device_list_AVFormatContext_Pointer setter); -// #if LIBAVFORMAT_VERSION_MAJOR < 59 - /** - * Initialize device capabilities submodule. - * @see avdevice_capabilities_create() for more details. - */ - public static class Create_device_capabilities_AVFormatContext_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Create_device_capabilities_AVFormatContext_Pointer(Pointer p) { super(p); } - protected Create_device_capabilities_AVFormatContext_Pointer() { allocate(); } - private native void allocate(); - public native int call(AVFormatContext s, @Cast("AVDeviceCapabilitiesQuery*") Pointer caps); - } - public native Create_device_capabilities_AVFormatContext_Pointer create_device_capabilities(); public native AVOutputFormat create_device_capabilities(Create_device_capabilities_AVFormatContext_Pointer setter); - /** - * Free device capabilities submodule. - * @see avdevice_capabilities_free() for more details. - */ - public static class Free_device_capabilities_AVFormatContext_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Free_device_capabilities_AVFormatContext_Pointer(Pointer p) { super(p); } - protected Free_device_capabilities_AVFormatContext_Pointer() { allocate(); } - private native void allocate(); - public native int call(AVFormatContext s, @Cast("AVDeviceCapabilitiesQuery*") Pointer caps); - } - public native Free_device_capabilities_AVFormatContext_Pointer free_device_capabilities(); public native AVOutputFormat free_device_capabilities(Free_device_capabilities_AVFormatContext_Pointer setter); -// #endif /** default data codec */ public native @Cast("AVCodecID") int data_codec(); public native AVOutputFormat data_codec(int setter); /** @@ -287,15 +264,19 @@ public static class Deinit_AVFormatContext extends FunctionPointer { /** * Set up any necessary bitstream filtering and extract any extra data needed * for the global header. + * + * \note pkt might have been directly forwarded by a meta-muxer; therefore + * pkt->stream_index as well as the pkt's timebase might be invalid. * Return 0 if more packets from this stream must be checked; 1 if not. */ - public static class Check_bitstream_AVFormatContext_AVPacket extends FunctionPointer { + public static class Check_bitstream_AVFormatContext_AVStream_AVPacket extends FunctionPointer { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Check_bitstream_AVFormatContext_AVPacket(Pointer p) { super(p); } - protected Check_bitstream_AVFormatContext_AVPacket() { allocate(); } + public Check_bitstream_AVFormatContext_AVStream_AVPacket(Pointer p) { super(p); } + protected Check_bitstream_AVFormatContext_AVStream_AVPacket() { allocate(); } private native void allocate(); - public native int call(AVFormatContext arg0, @Const AVPacket pkt); + public native int call(AVFormatContext s, AVStream st, + @Const AVPacket pkt); } - public native Check_bitstream_AVFormatContext_AVPacket check_bitstream(); public native AVOutputFormat check_bitstream(Check_bitstream_AVFormatContext_AVPacket setter); + public native Check_bitstream_AVFormatContext_AVStream_AVPacket check_bitstream(); public native AVOutputFormat check_bitstream(Check_bitstream_AVFormatContext_AVStream_AVPacket setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStream.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStream.java index 8dee649d58e..47f8a1d3ad3 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStream.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStream.java @@ -42,6 +42,9 @@ public class AVStream extends Pointer { return new AVStream((Pointer)this).offsetAddress(i); } +// #if FF_API_AVSTREAM_CLASS +// #endif + /** stream index in AVFormatContext */ public native int index(); public native AVStream index(int setter); /** @@ -50,12 +53,7 @@ public class AVStream extends Pointer { * encoding: set by the user, replaced by libavformat if left unset */ public native int id(); public native AVStream id(int setter); -// #if FF_API_LAVF_AVCTX - /** - * @deprecated use the codecpar struct instead - */ - public native @Deprecated AVCodecContext codec(); public native AVStream codec(AVCodecContext setter); -// #endif + public native Pointer priv_data(); public native AVStream priv_data(Pointer setter); /** @@ -95,7 +93,12 @@ public class AVStream extends Pointer { /** number of frames in this stream if known or 0 */ public native @Cast("int64_t") long nb_frames(); public native AVStream nb_frames(long setter); - /** AV_DISPOSITION_* bit field */ + /** + * Stream disposition - a combination of AV_DISPOSITION_* flags. + * - demuxing: set by libavformat when creating the stream or in + * avformat_find_stream_info(). + * - muxing: may be set by the caller before avformat_write_header(). + */ public native int disposition(); public native AVStream disposition(int setter); /** Selects which packets can be discarded at will and do not need to be demuxed. */ @@ -188,17 +191,6 @@ public class AVStream extends Pointer { */ public native @ByRef AVRational r_frame_rate(); public native AVStream r_frame_rate(AVRational setter); -// #if FF_API_LAVF_FFSERVER - /** - * String containing pairs of key and values describing recommended encoder configuration. - * Pairs are separated by ','. - * Keys are separated from values by '='. - * - * @deprecated unused - */ - public native @Cast("char*") @Deprecated BytePointer recommended_encoder_configuration(); public native AVStream recommended_encoder_configuration(BytePointer setter); -// #endif - /** * Codec parameters associated with this stream. Allocated and freed by * libavformat in avformat_new_stream() and avformat_free_context() @@ -210,81 +202,12 @@ public class AVStream extends Pointer { */ public native AVCodecParameters codecpar(); public native AVStream codecpar(AVCodecParameters setter); - /***************************************************************** - * All fields below this line are not part of the public API. They - * may not be used outside of libavformat and can be changed and - * removed at will. - * Internal note: be aware that physically removing these fields - * will break ABI. Replace removed fields with dummy fields, and - * add new fields to AVStreamInternal. - ***************************************************************** - */ - -// #if LIBAVFORMAT_VERSION_MAJOR < 59 - // kept for ABI compatibility only, do not access in any way - public native Pointer unused(); public native AVStream unused(Pointer setter); -// #endif - - /** number of bits in pts (used for wrapping control) */ - public native int pts_wrap_bits(); public native AVStream pts_wrap_bits(int setter); - - // Timestamp generation support: /** - * Timestamp corresponding to the last dts sync point. + * Number of bits in timestamps. Used for wrapping control. + * + * - demuxing: set by libavformat + * - muxing: set by libavformat * - * Initialized when AVCodecParserContext.dts_sync_point >= 0 and - * a DTS is received from the underlying container. Otherwise set to - * AV_NOPTS_VALUE by default. - */ - public native @Cast("int64_t") long first_dts(); public native AVStream first_dts(long setter); - public native @Cast("int64_t") long cur_dts(); public native AVStream cur_dts(long setter); - public native @Cast("int64_t") long last_IP_pts(); public native AVStream last_IP_pts(long setter); - public native int last_IP_duration(); public native AVStream last_IP_duration(int setter); - - /** - * Number of packets to buffer for codec probing - */ - public native int probe_packets(); public native AVStream probe_packets(int setter); - - /** - * Number of frames that have been demuxed during avformat_find_stream_info() - */ - public native int codec_info_nb_frames(); public native AVStream codec_info_nb_frames(int setter); - - /* av_read_frame() support */ - public native @Cast("AVStreamParseType") int need_parsing(); public native AVStream need_parsing(int setter); - public native AVCodecParserContext parser(); public native AVStream parser(AVCodecParserContext setter); - -// #if LIBAVFORMAT_VERSION_MAJOR < 59 - // kept for ABI compatibility only, do not access in any way - public native Pointer unused7(); public native AVStream unused7(Pointer setter); - public native @ByRef AVProbeData unused6(); public native AVStream unused6(AVProbeData setter); - public native @Cast("int64_t") long unused5(int i); public native AVStream unused5(int i, long setter); - @MemberGetter public native @Cast("int64_t*") LongPointer unused5(); -// #endif - /** Only used if the format does not - support seeking natively. */ - public native AVIndexEntry index_entries(); public native AVStream index_entries(AVIndexEntry setter); - public native int nb_index_entries(); public native AVStream nb_index_entries(int setter); - public native @Cast("unsigned int") int index_entries_allocated_size(); public native AVStream index_entries_allocated_size(int setter); - - /** - * Stream Identifier - * This is the MPEG-TS stream identifier +1 - * 0 means unknown - */ - public native int stream_identifier(); public native AVStream stream_identifier(int setter); - -// #if LIBAVFORMAT_VERSION_MAJOR < 59 - // kept for ABI compatibility only, do not access in any way - public native int unused8(); public native AVStream unused8(int setter); - public native int unused9(); public native AVStream unused9(int setter); - public native int unused10(); public native AVStream unused10(int setter); -// #endif - - /** - * An opaque field for libavformat internal usage. - * Must not be accessed in any way by callers. */ - public native AVStreamInternal internal(); public native AVStream internal(AVStreamInternal setter); + public native int pts_wrap_bits(); public native AVStream pts_wrap_bits(int setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStreamInternal.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStreamInternal.java deleted file mode 100644 index caf58fe2b07..00000000000 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avformat/AVStreamInternal.java +++ /dev/null @@ -1,26 +0,0 @@ -// Targeted by JavaCPP version 1.5.7-SNAPSHOT: DO NOT EDIT THIS FILE - -package org.bytedeco.ffmpeg.avformat; - -import java.nio.*; -import org.bytedeco.javacpp.*; -import org.bytedeco.javacpp.annotation.*; - -import static org.bytedeco.javacpp.presets.javacpp.*; -import org.bytedeco.ffmpeg.avutil.*; -import static org.bytedeco.ffmpeg.global.avutil.*; -import org.bytedeco.ffmpeg.swresample.*; -import static org.bytedeco.ffmpeg.global.swresample.*; -import org.bytedeco.ffmpeg.avcodec.*; -import static org.bytedeco.ffmpeg.global.avcodec.*; - -import static org.bytedeco.ffmpeg.global.avformat.*; - - -@Opaque @Properties(inherit = org.bytedeco.ffmpeg.presets.avformat.class) -public class AVStreamInternal extends Pointer { - /** Empty constructor. Calls {@code super((Pointer)null)}. */ - public AVStreamInternal() { super((Pointer)null); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public AVStreamInternal(Pointer p) { super(p); } -} diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVBufferRef.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVBufferRef.java index e6dee6cc95c..890b0cfae66 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVBufferRef.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVBufferRef.java @@ -46,8 +46,5 @@ public class AVBufferRef extends Pointer { /** * Size of data in bytes. */ -// #if FF_API_BUFFER_SIZE_T - public native int size(); public native AVBufferRef size(int setter); -// #else -// #endif + public native @Cast("size_t") long size(); public native AVBufferRef size(long setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVClass.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVClass.java index a619cee09c9..ae4a74a712a 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVClass.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVClass.java @@ -84,39 +84,6 @@ public static class Item_name_Pointer extends FunctionPointer { */ public native int parent_log_context_offset(); public native AVClass parent_log_context_offset(int setter); - /** - * Return next AVOptions-enabled child or NULL - */ - public static class Child_next_Pointer_Pointer extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Child_next_Pointer_Pointer(Pointer p) { super(p); } - protected Child_next_Pointer_Pointer() { allocate(); } - private native void allocate(); - public native Pointer call(Pointer obj, Pointer prev); - } - public native Child_next_Pointer_Pointer child_next(); public native AVClass child_next(Child_next_Pointer_Pointer setter); - -// #if FF_API_CHILD_CLASS_NEXT - /** - * Return an AVClass corresponding to the next potential - * AVOptions-enabled child. - * - * The difference between child_next and this is that - * child_next iterates over _already existing_ objects, while - * child_class_next iterates over _all possible_ children. - */ - public static class Child_class_next_AVClass extends FunctionPointer { - static { Loader.load(); } - /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Child_class_next_AVClass(Pointer p) { super(p); } - protected Child_class_next_AVClass() { allocate(); } - private native void allocate(); - public native @Const @Deprecated AVClass call(@Const AVClass prev); - } - public native Child_class_next_AVClass child_class_next(); public native AVClass child_class_next(Child_class_next_AVClass setter); -// #endif - /** * Category used for visualization (like color) * This is only set if the category is equal for all objects using this class. @@ -152,6 +119,19 @@ public static class Query_ranges_PointerPointer_Pointer_BytePointer_int extends } public native Query_ranges_PointerPointer_Pointer_BytePointer_int query_ranges(); public native AVClass query_ranges(Query_ranges_PointerPointer_Pointer_BytePointer_int setter); + /** + * Return next AVOptions-enabled child or NULL + */ + public static class Child_next_Pointer_Pointer extends FunctionPointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public Child_next_Pointer_Pointer(Pointer p) { super(p); } + protected Child_next_Pointer_Pointer() { allocate(); } + private native void allocate(); + public native Pointer call(Pointer obj, Pointer prev); + } + public native Child_next_Pointer_Pointer child_next(); public native AVClass child_next(Child_next_Pointer_Pointer setter); + /** * Iterate over the AVClasses corresponding to potential AVOptions-enabled * children. diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVComponentDescriptor.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVComponentDescriptor.java index 1dcfecc492a..0848d319bbd 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVComponentDescriptor.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVComponentDescriptor.java @@ -56,15 +56,4 @@ public class AVComponentDescriptor extends Pointer { * Number of bits in the component. */ public native int depth(); public native AVComponentDescriptor depth(int setter); - -// #if FF_API_PLUS1_MINUS1 - /** deprecated, use step instead */ - public native @Deprecated int step_minus1(); public native AVComponentDescriptor step_minus1(int setter); - - /** deprecated, use depth instead */ - public native @Deprecated int depth_minus1(); public native AVComponentDescriptor depth_minus1(int setter); - - /** deprecated, use offset instead */ - public native @Deprecated int offset_plus1(); public native AVComponentDescriptor offset_plus1(int setter); -// #endif } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrame.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrame.java index 6ac88cb959c..1439633ad6e 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrame.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrame.java @@ -62,22 +62,33 @@ public class AVFrame extends Pointer { public static final int AV_NUM_DATA_POINTERS = 8; /** * pointer to the picture/channel planes. - * This might be different from the first allocated byte + * This might be different from the first allocated byte. For video, + * it could even point to the end of the image data. + * + * All pointers in data and extended_data must point into one of the + * AVBufferRef in buf or extended_buf. * * Some decoders access areas outside 0,0 - width,height, please * see avcodec_align_dimensions2(). Some filters and swscale can read * up to 16 bytes beyond the planes, if these filters are to be used, * then 16 extra bytes must be allocated. * - * NOTE: Except for hwaccel formats, pointers not needed by the format - * MUST be set to NULL. + * NOTE: Pointers not needed by the format MUST be set to NULL. + * + * \attention In case of video, the data[] pointers can point to the + * end of image data in order to reverse line order, when used in + * combination with negative values in the linesize[] array. */ public native @Cast("uint8_t*") BytePointer data(int i); public native AVFrame data(int i, BytePointer setter); @MemberGetter public native @Cast("uint8_t**") PointerPointer data(); /** - * For video, size in bytes of each picture line. - * For audio, size in bytes of each plane. + * For video, a positive or negative value, which is typically indicating + * the size in bytes of each picture line, but it can also be: + * - the negative byte size of lines for vertical flipping + * (with data[n] pointing to the end of the data + * - a positive or negative multiple of the byte size as for accessing + * even and odd fields of a frame (possibly flipped) * * For audio, only linesize[0] may be set. For planar audio, each channel * plane must be the same size. @@ -89,6 +100,9 @@ public class AVFrame extends Pointer { * * \note The linesize may be larger than the size of usable data -- there * may be extra padding present for performance reasons. + * + * \attention In case of video, line size values can be negative to achieve + * a vertically inverted iteration over image lines. */ public native int linesize(int i); public native AVFrame linesize(int i, int setter); @MemberGetter public native IntPointer linesize(); @@ -157,14 +171,6 @@ public class AVFrame extends Pointer { */ public native @Cast("int64_t") long pts(); public native AVFrame pts(long setter); -// #if FF_API_PKT_PTS - /** - * PTS copied from the AVPacket that was decoded to produce this frame. - * @deprecated use the pts field instead - */ - public native @Cast("int64_t") @Deprecated long pkt_pts(); public native AVFrame pkt_pts(long setter); -// #endif - /** * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used) * This is also the Presentation time of this AVFrame calculated from @@ -172,6 +178,14 @@ public class AVFrame extends Pointer { */ public native @Cast("int64_t") long pkt_dts(); public native AVFrame pkt_dts(long setter); + /** + * Time base for the timestamps in this frame. + * In the future, this field may be set on frames output by decoders or + * filters, but its value will be by default ignored on input to encoders + * or filters. + */ + public native @ByRef AVRational time_base(); public native AVFrame time_base(AVRational setter); + /** * picture number in bitstream order */ @@ -191,14 +205,6 @@ public class AVFrame extends Pointer { */ public native Pointer opaque(); public native AVFrame opaque(Pointer setter); -// #if FF_API_ERROR_FRAME - /** - * @deprecated unused - */ - public native @Cast("uint64_t") @Deprecated long error(int i); public native AVFrame error(int i, long setter); - @MemberGetter public native @Cast("uint64_t*") @Deprecated LongPointer error(); -// #endif - /** * When decoding, this signals how much the picture must be delayed. * extra_delay = repeat_pict / (2*fps) @@ -241,10 +247,10 @@ public class AVFrame extends Pointer { public native @Cast("uint64_t") long channel_layout(); public native AVFrame channel_layout(long setter); /** - * AVBuffer references backing the data for this frame. If all elements of - * this array are NULL, then this frame is not reference counted. This array - * must be filled contiguously -- if buf[i] is non-NULL then buf[j] must - * also be non-NULL for all j < i. + * AVBuffer references backing the data for this frame. All the pointers in + * data and extended_data must point inside one of the buffers in buf or + * extended_buf. This array must be filled contiguously -- if buf[i] is + * non-NULL then buf[j] must also be non-NULL for all j < i. * * There may be at most one AVBuffer per data plane, so for video this array * always contains all the references. For planar audio with more than @@ -381,20 +387,6 @@ public class AVFrame extends Pointer { */ public native int pkt_size(); public native AVFrame pkt_size(int setter); -// #if FF_API_FRAME_QP - /** - * QP table - */ - public native @Deprecated BytePointer qscale_table(); public native AVFrame qscale_table(BytePointer setter); - /** - * QP store stride - */ - public native @Deprecated int qstride(); public native AVFrame qstride(int setter); - - public native @Deprecated int qscale_type(); public native AVFrame qscale_type(int setter); - - public native @Deprecated AVBufferRef qp_table_buf(); public native AVFrame qp_table_buf(AVBufferRef setter); -// #endif /** * For hwaccel-format frames, this should be a reference to the * AVHWFramesContext describing the frame. diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrameSideData.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrameSideData.java index ee4be35f3b2..7faeeab037a 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrameSideData.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/AVFrameSideData.java @@ -38,10 +38,7 @@ public class AVFrameSideData extends Pointer { public native @Cast("AVFrameSideDataType") int type(); public native AVFrameSideData type(int setter); public native @Cast("uint8_t*") BytePointer data(); public native AVFrameSideData data(BytePointer setter); -// #if FF_API_BUFFER_SIZE_T - public native int size(); public native AVFrameSideData size(int setter); -// #else -// #endif + public native @Cast("size_t") long size(); public native AVFrameSideData size(long setter); public native AVDictionary metadata(); public native AVFrameSideData metadata(AVDictionary setter); public native AVBufferRef buf(); public native AVFrameSideData buf(AVBufferRef setter); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_Pointer_int.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_Pointer_long.java similarity index 82% rename from ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_Pointer_int.java rename to ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_Pointer_long.java index 2c0a317f960..fba194a1c9e 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_Pointer_int.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_Pointer_long.java @@ -10,8 +10,6 @@ import static org.bytedeco.ffmpeg.global.avutil.*; -// #else -// #endif /** * Allocate and initialize a buffer pool with a more complex allocator. @@ -28,13 +26,12 @@ * data. May be NULL. * @return newly created buffer pool on success, NULL on error. */ -// #if FF_API_BUFFER_SIZE_T @Properties(inherit = org.bytedeco.ffmpeg.presets.avutil.class) -public class Alloc_Pointer_int extends FunctionPointer { +public class Alloc_Pointer_long extends FunctionPointer { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Alloc_Pointer_int(Pointer p) { super(p); } - protected Alloc_Pointer_int() { allocate(); } + public Alloc_Pointer_long(Pointer p) { super(p); } + protected Alloc_Pointer_long() { allocate(); } private native void allocate(); - public native AVBufferRef call(Pointer opaque, int size); + public native AVBufferRef call(Pointer opaque, @Cast("size_t") long size); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_int.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_long.java similarity index 80% rename from ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_int.java rename to ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_long.java index 629c21a5eea..e80d956db6b 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_int.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Alloc_long.java @@ -20,13 +20,12 @@ * (av_buffer_alloc()). * @return newly created buffer pool on success, NULL on error. */ -// #if FF_API_BUFFER_SIZE_T @Properties(inherit = org.bytedeco.ffmpeg.presets.avutil.class) -public class Alloc_int extends FunctionPointer { +public class Alloc_long extends FunctionPointer { static { Loader.load(); } /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ - public Alloc_int(Pointer p) { super(p); } - protected Alloc_int() { allocate(); } + public Alloc_long(Pointer p) { super(p); } + protected Alloc_long() { allocate(); } private native void allocate(); - public native AVBufferRef call(int size); + public native AVBufferRef call(@Cast("size_t") long size); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Free_Pointer_BytePointer.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Free_Pointer_BytePointer.java index 309f7fc02d6..356ab7c33c3 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Free_Pointer_BytePointer.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/Free_Pointer_BytePointer.java @@ -26,7 +26,6 @@ * * @return an AVBufferRef referring to data on success, NULL on failure. */ -// #if FF_API_BUFFER_SIZE_T @Properties(inherit = org.bytedeco.ffmpeg.presets.avutil.class) public class Free_Pointer_BytePointer extends FunctionPointer { static { Loader.load(); } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/av_tx_fn.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/av_tx_fn.java index 0d3a0d47788..60380bd461e 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/av_tx_fn.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/avutil/av_tx_fn.java @@ -23,7 +23,7 @@ * @param stride the input or output stride in bytes * * The out and in arrays must be aligned to the maximum required by the CPU - * architecture. + * architecture unless the AV_TX_UNALIGNED flag was set in av_tx_init(). * The stride must follow the constraints the transform type has specified. */ @Properties(inherit = org.bytedeco.ffmpeg.presets.avutil.class) diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avcodec.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avcodec.java index eba44ac8283..5e7283b4f45 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avcodec.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avcodec.java @@ -43,6 +43,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { // #define AVCODEC_CODEC_ID_H // #include "libavutil/avutil.h" +// #include "libavutil/samplefmt.h" /** * \addtogroup lavc_core @@ -272,67 +273,67 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { AV_CODEC_ID_VVC = 196; public static final int AV_CODEC_ID_H266 = AV_CODEC_ID_VVC; public static final int - - AV_CODEC_ID_Y41P = 0x8000, - AV_CODEC_ID_AVRP = 0x8000 + 1, - AV_CODEC_ID_012V = 0x8000 + 2, - AV_CODEC_ID_AVUI = 0x8000 + 3, - AV_CODEC_ID_AYUV = 0x8000 + 4, - AV_CODEC_ID_TARGA_Y216 = 0x8000 + 5, - AV_CODEC_ID_V308 = 0x8000 + 6, - AV_CODEC_ID_V408 = 0x8000 + 7, - AV_CODEC_ID_YUV4 = 0x8000 + 8, - AV_CODEC_ID_AVRN = 0x8000 + 9, - AV_CODEC_ID_CPIA = 0x8000 + 10, - AV_CODEC_ID_XFACE = 0x8000 + 11, - AV_CODEC_ID_SNOW = 0x8000 + 12, - AV_CODEC_ID_SMVJPEG = 0x8000 + 13, - AV_CODEC_ID_APNG = 0x8000 + 14, - AV_CODEC_ID_DAALA = 0x8000 + 15, - AV_CODEC_ID_CFHD = 0x8000 + 16, - AV_CODEC_ID_TRUEMOTION2RT = 0x8000 + 17, - AV_CODEC_ID_M101 = 0x8000 + 18, - AV_CODEC_ID_MAGICYUV = 0x8000 + 19, - AV_CODEC_ID_SHEERVIDEO = 0x8000 + 20, - AV_CODEC_ID_YLC = 0x8000 + 21, - AV_CODEC_ID_PSD = 0x8000 + 22, - AV_CODEC_ID_PIXLET = 0x8000 + 23, - AV_CODEC_ID_SPEEDHQ = 0x8000 + 24, - AV_CODEC_ID_FMVC = 0x8000 + 25, - AV_CODEC_ID_SCPR = 0x8000 + 26, - AV_CODEC_ID_CLEARVIDEO = 0x8000 + 27, - AV_CODEC_ID_XPM = 0x8000 + 28, - AV_CODEC_ID_AV1 = 0x8000 + 29, - AV_CODEC_ID_BITPACKED = 0x8000 + 30, - AV_CODEC_ID_MSCC = 0x8000 + 31, - AV_CODEC_ID_SRGC = 0x8000 + 32, - AV_CODEC_ID_SVG = 0x8000 + 33, - AV_CODEC_ID_GDV = 0x8000 + 34, - AV_CODEC_ID_FITS = 0x8000 + 35, - AV_CODEC_ID_IMM4 = 0x8000 + 36, - AV_CODEC_ID_PROSUMER = 0x8000 + 37, - AV_CODEC_ID_MWSC = 0x8000 + 38, - AV_CODEC_ID_WCMV = 0x8000 + 39, - AV_CODEC_ID_RASC = 0x8000 + 40, - AV_CODEC_ID_HYMT = 0x8000 + 41, - AV_CODEC_ID_ARBC = 0x8000 + 42, - AV_CODEC_ID_AGM = 0x8000 + 43, - AV_CODEC_ID_LSCR = 0x8000 + 44, - AV_CODEC_ID_VP4 = 0x8000 + 45, - AV_CODEC_ID_IMM5 = 0x8000 + 46, - AV_CODEC_ID_MVDV = 0x8000 + 47, - AV_CODEC_ID_MVHA = 0x8000 + 48, - AV_CODEC_ID_CDTOONS = 0x8000 + 49, - AV_CODEC_ID_MV30 = 0x8000 + 50, - AV_CODEC_ID_NOTCHLC = 0x8000 + 51, - AV_CODEC_ID_PFM = 0x8000 + 52, - AV_CODEC_ID_MOBICLIP = 0x8000 + 53, - AV_CODEC_ID_PHOTOCD = 0x8000 + 54, - AV_CODEC_ID_IPU = 0x8000 + 55, - AV_CODEC_ID_ARGO = 0x8000 + 56, - AV_CODEC_ID_CRI = 0x8000 + 57, - AV_CODEC_ID_SIMBIOSIS_IMX = 0x8000 + 58, - AV_CODEC_ID_SGA_VIDEO = 0x8000 + 59, + AV_CODEC_ID_Y41P = 197, + AV_CODEC_ID_AVRP = 198, + AV_CODEC_ID_012V = 199, + AV_CODEC_ID_AVUI = 200, + AV_CODEC_ID_AYUV = 201, + AV_CODEC_ID_TARGA_Y216 = 202, + AV_CODEC_ID_V308 = 203, + AV_CODEC_ID_V408 = 204, + AV_CODEC_ID_YUV4 = 205, + AV_CODEC_ID_AVRN = 206, + AV_CODEC_ID_CPIA = 207, + AV_CODEC_ID_XFACE = 208, + AV_CODEC_ID_SNOW = 209, + AV_CODEC_ID_SMVJPEG = 210, + AV_CODEC_ID_APNG = 211, + AV_CODEC_ID_DAALA = 212, + AV_CODEC_ID_CFHD = 213, + AV_CODEC_ID_TRUEMOTION2RT = 214, + AV_CODEC_ID_M101 = 215, + AV_CODEC_ID_MAGICYUV = 216, + AV_CODEC_ID_SHEERVIDEO = 217, + AV_CODEC_ID_YLC = 218, + AV_CODEC_ID_PSD = 219, + AV_CODEC_ID_PIXLET = 220, + AV_CODEC_ID_SPEEDHQ = 221, + AV_CODEC_ID_FMVC = 222, + AV_CODEC_ID_SCPR = 223, + AV_CODEC_ID_CLEARVIDEO = 224, + AV_CODEC_ID_XPM = 225, + AV_CODEC_ID_AV1 = 226, + AV_CODEC_ID_BITPACKED = 227, + AV_CODEC_ID_MSCC = 228, + AV_CODEC_ID_SRGC = 229, + AV_CODEC_ID_SVG = 230, + AV_CODEC_ID_GDV = 231, + AV_CODEC_ID_FITS = 232, + AV_CODEC_ID_IMM4 = 233, + AV_CODEC_ID_PROSUMER = 234, + AV_CODEC_ID_MWSC = 235, + AV_CODEC_ID_WCMV = 236, + AV_CODEC_ID_RASC = 237, + AV_CODEC_ID_HYMT = 238, + AV_CODEC_ID_ARBC = 239, + AV_CODEC_ID_AGM = 240, + AV_CODEC_ID_LSCR = 241, + AV_CODEC_ID_VP4 = 242, + AV_CODEC_ID_IMM5 = 243, + AV_CODEC_ID_MVDV = 244, + AV_CODEC_ID_MVHA = 245, + AV_CODEC_ID_CDTOONS = 246, + AV_CODEC_ID_MV30 = 247, + AV_CODEC_ID_NOTCHLC = 248, + AV_CODEC_ID_PFM = 249, + AV_CODEC_ID_MOBICLIP = 250, + AV_CODEC_ID_PHOTOCD = 251, + AV_CODEC_ID_IPU = 252, + AV_CODEC_ID_ARGO = 253, + AV_CODEC_ID_CRI = 254, + AV_CODEC_ID_SIMBIOSIS_IMX = 255, + AV_CODEC_ID_SGA_VIDEO = 256, + AV_CODEC_ID_GEM = 257, /* various PCM "codecs" */ /** A dummy id pointing at the start of audio codecs */ @@ -368,13 +369,12 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { AV_CODEC_ID_PCM_S24LE_PLANAR = 0x10000 + 28, AV_CODEC_ID_PCM_S32LE_PLANAR = 0x10000 + 29, AV_CODEC_ID_PCM_S16BE_PLANAR = 0x10000 + 30, - - AV_CODEC_ID_PCM_S64LE = 0x10800, - AV_CODEC_ID_PCM_S64BE = 0x10800 + 1, - AV_CODEC_ID_PCM_F16LE = 0x10800 + 2, - AV_CODEC_ID_PCM_F24LE = 0x10800 + 3, - AV_CODEC_ID_PCM_VIDC = 0x10800 + 4, - AV_CODEC_ID_PCM_SGA = 0x10800 + 5, + AV_CODEC_ID_PCM_S64LE = 0x10000 + 31, + AV_CODEC_ID_PCM_S64BE = 0x10000 + 32, + AV_CODEC_ID_PCM_F16LE = 0x10000 + 33, + AV_CODEC_ID_PCM_F24LE = 0x10000 + 34, + AV_CODEC_ID_PCM_VIDC = 0x10000 + 35, + AV_CODEC_ID_PCM_SGA = 0x10000 + 36, /* various ADPCM codecs */ AV_CODEC_ID_ADPCM_IMA_QT = 0x11000, @@ -408,26 +408,26 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { AV_CODEC_ID_ADPCM_G722 = 0x11000 + 28, AV_CODEC_ID_ADPCM_IMA_APC = 0x11000 + 29, AV_CODEC_ID_ADPCM_VIMA = 0x11000 + 30, - - AV_CODEC_ID_ADPCM_AFC = 0x11800, - AV_CODEC_ID_ADPCM_IMA_OKI = 0x11800 + 1, - AV_CODEC_ID_ADPCM_DTK = 0x11800 + 2, - AV_CODEC_ID_ADPCM_IMA_RAD = 0x11800 + 3, - AV_CODEC_ID_ADPCM_G726LE = 0x11800 + 4, - AV_CODEC_ID_ADPCM_THP_LE = 0x11800 + 5, - AV_CODEC_ID_ADPCM_PSX = 0x11800 + 6, - AV_CODEC_ID_ADPCM_AICA = 0x11800 + 7, - AV_CODEC_ID_ADPCM_IMA_DAT4 = 0x11800 + 8, - AV_CODEC_ID_ADPCM_MTAF = 0x11800 + 9, - AV_CODEC_ID_ADPCM_AGM = 0x11800 + 10, - AV_CODEC_ID_ADPCM_ARGO = 0x11800 + 11, - AV_CODEC_ID_ADPCM_IMA_SSI = 0x11800 + 12, - AV_CODEC_ID_ADPCM_ZORK = 0x11800 + 13, - AV_CODEC_ID_ADPCM_IMA_APM = 0x11800 + 14, - AV_CODEC_ID_ADPCM_IMA_ALP = 0x11800 + 15, - AV_CODEC_ID_ADPCM_IMA_MTF = 0x11800 + 16, - AV_CODEC_ID_ADPCM_IMA_CUNNING = 0x11800 + 17, - AV_CODEC_ID_ADPCM_IMA_MOFLEX = 0x11800 + 18, + AV_CODEC_ID_ADPCM_AFC = 0x11000 + 31, + AV_CODEC_ID_ADPCM_IMA_OKI = 0x11000 + 32, + AV_CODEC_ID_ADPCM_DTK = 0x11000 + 33, + AV_CODEC_ID_ADPCM_IMA_RAD = 0x11000 + 34, + AV_CODEC_ID_ADPCM_G726LE = 0x11000 + 35, + AV_CODEC_ID_ADPCM_THP_LE = 0x11000 + 36, + AV_CODEC_ID_ADPCM_PSX = 0x11000 + 37, + AV_CODEC_ID_ADPCM_AICA = 0x11000 + 38, + AV_CODEC_ID_ADPCM_IMA_DAT4 = 0x11000 + 39, + AV_CODEC_ID_ADPCM_MTAF = 0x11000 + 40, + AV_CODEC_ID_ADPCM_AGM = 0x11000 + 41, + AV_CODEC_ID_ADPCM_ARGO = 0x11000 + 42, + AV_CODEC_ID_ADPCM_IMA_SSI = 0x11000 + 43, + AV_CODEC_ID_ADPCM_ZORK = 0x11000 + 44, + AV_CODEC_ID_ADPCM_IMA_APM = 0x11000 + 45, + AV_CODEC_ID_ADPCM_IMA_ALP = 0x11000 + 46, + AV_CODEC_ID_ADPCM_IMA_MTF = 0x11000 + 47, + AV_CODEC_ID_ADPCM_IMA_CUNNING = 0x11000 + 48, + AV_CODEC_ID_ADPCM_IMA_MOFLEX = 0x11000 + 49, + AV_CODEC_ID_ADPCM_IMA_ACORN = 0x11000 + 50, /* AMR */ AV_CODEC_ID_AMR_NB = 0x12000, @@ -442,10 +442,9 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { AV_CODEC_ID_INTERPLAY_DPCM = 0x14000 + 1, AV_CODEC_ID_XAN_DPCM = 0x14000 + 2, AV_CODEC_ID_SOL_DPCM = 0x14000 + 3, - - AV_CODEC_ID_SDX2_DPCM = 0x14800, - AV_CODEC_ID_GREMLIN_DPCM = 0x14800 + 1, - AV_CODEC_ID_DERF_DPCM = 0x14800 + 2, + AV_CODEC_ID_SDX2_DPCM = 0x14000 + 4, + AV_CODEC_ID_GREMLIN_DPCM = 0x14000 + 5, + AV_CODEC_ID_DERF_DPCM = 0x14000 + 6, /* audio codecs */ AV_CODEC_ID_MP2 = 0x15000, @@ -518,34 +517,34 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { AV_CODEC_ID_ON2AVC = 0x15000 + 65, AV_CODEC_ID_DSS_SP = 0x15000 + 66, AV_CODEC_ID_CODEC2 = 0x15000 + 67, - - AV_CODEC_ID_FFWAVESYNTH = 0x15800, - AV_CODEC_ID_SONIC = 0x15800 + 1, - AV_CODEC_ID_SONIC_LS = 0x15800 + 2, - AV_CODEC_ID_EVRC = 0x15800 + 3, - AV_CODEC_ID_SMV = 0x15800 + 4, - AV_CODEC_ID_DSD_LSBF = 0x15800 + 5, - AV_CODEC_ID_DSD_MSBF = 0x15800 + 6, - AV_CODEC_ID_DSD_LSBF_PLANAR = 0x15800 + 7, - AV_CODEC_ID_DSD_MSBF_PLANAR = 0x15800 + 8, - AV_CODEC_ID_4GV = 0x15800 + 9, - AV_CODEC_ID_INTERPLAY_ACM = 0x15800 + 10, - AV_CODEC_ID_XMA1 = 0x15800 + 11, - AV_CODEC_ID_XMA2 = 0x15800 + 12, - AV_CODEC_ID_DST = 0x15800 + 13, - AV_CODEC_ID_ATRAC3AL = 0x15800 + 14, - AV_CODEC_ID_ATRAC3PAL = 0x15800 + 15, - AV_CODEC_ID_DOLBY_E = 0x15800 + 16, - AV_CODEC_ID_APTX = 0x15800 + 17, - AV_CODEC_ID_APTX_HD = 0x15800 + 18, - AV_CODEC_ID_SBC = 0x15800 + 19, - AV_CODEC_ID_ATRAC9 = 0x15800 + 20, - AV_CODEC_ID_HCOM = 0x15800 + 21, - AV_CODEC_ID_ACELP_KELVIN = 0x15800 + 22, - AV_CODEC_ID_MPEGH_3D_AUDIO = 0x15800 + 23, - AV_CODEC_ID_SIREN = 0x15800 + 24, - AV_CODEC_ID_HCA = 0x15800 + 25, - AV_CODEC_ID_FASTAUDIO = 0x15800 + 26, + AV_CODEC_ID_FFWAVESYNTH = 0x15000 + 68, + AV_CODEC_ID_SONIC = 0x15000 + 69, + AV_CODEC_ID_SONIC_LS = 0x15000 + 70, + AV_CODEC_ID_EVRC = 0x15000 + 71, + AV_CODEC_ID_SMV = 0x15000 + 72, + AV_CODEC_ID_DSD_LSBF = 0x15000 + 73, + AV_CODEC_ID_DSD_MSBF = 0x15000 + 74, + AV_CODEC_ID_DSD_LSBF_PLANAR = 0x15000 + 75, + AV_CODEC_ID_DSD_MSBF_PLANAR = 0x15000 + 76, + AV_CODEC_ID_4GV = 0x15000 + 77, + AV_CODEC_ID_INTERPLAY_ACM = 0x15000 + 78, + AV_CODEC_ID_XMA1 = 0x15000 + 79, + AV_CODEC_ID_XMA2 = 0x15000 + 80, + AV_CODEC_ID_DST = 0x15000 + 81, + AV_CODEC_ID_ATRAC3AL = 0x15000 + 82, + AV_CODEC_ID_ATRAC3PAL = 0x15000 + 83, + AV_CODEC_ID_DOLBY_E = 0x15000 + 84, + AV_CODEC_ID_APTX = 0x15000 + 85, + AV_CODEC_ID_APTX_HD = 0x15000 + 86, + AV_CODEC_ID_SBC = 0x15000 + 87, + AV_CODEC_ID_ATRAC9 = 0x15000 + 88, + AV_CODEC_ID_HCOM = 0x15000 + 89, + AV_CODEC_ID_ACELP_KELVIN = 0x15000 + 90, + AV_CODEC_ID_MPEGH_3D_AUDIO = 0x15000 + 91, + AV_CODEC_ID_SIREN = 0x15000 + 92, + AV_CODEC_ID_HCA = 0x15000 + 93, + AV_CODEC_ID_FASTAUDIO = 0x15000 + 94, + AV_CODEC_ID_MSNSIREN = 0x15000 + 95, /* subtitle codecs */ /** A dummy ID pointing at the start of subtitle codecs. */ @@ -560,24 +559,23 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { AV_CODEC_ID_HDMV_PGS_SUBTITLE = 0x17000 + 6, AV_CODEC_ID_DVB_TELETEXT = 0x17000 + 7, AV_CODEC_ID_SRT = 0x17000 + 8, - - AV_CODEC_ID_MICRODVD = 0x17800, - AV_CODEC_ID_EIA_608 = 0x17800 + 1, - AV_CODEC_ID_JACOSUB = 0x17800 + 2, - AV_CODEC_ID_SAMI = 0x17800 + 3, - AV_CODEC_ID_REALTEXT = 0x17800 + 4, - AV_CODEC_ID_STL = 0x17800 + 5, - AV_CODEC_ID_SUBVIEWER1 = 0x17800 + 6, - AV_CODEC_ID_SUBVIEWER = 0x17800 + 7, - AV_CODEC_ID_SUBRIP = 0x17800 + 8, - AV_CODEC_ID_WEBVTT = 0x17800 + 9, - AV_CODEC_ID_MPL2 = 0x17800 + 10, - AV_CODEC_ID_VPLAYER = 0x17800 + 11, - AV_CODEC_ID_PJS = 0x17800 + 12, - AV_CODEC_ID_ASS = 0x17800 + 13, - AV_CODEC_ID_HDMV_TEXT_SUBTITLE = 0x17800 + 14, - AV_CODEC_ID_TTML = 0x17800 + 15, - AV_CODEC_ID_ARIB_CAPTION = 0x17800 + 16, + AV_CODEC_ID_MICRODVD = 0x17000 + 9, + AV_CODEC_ID_EIA_608 = 0x17000 + 10, + AV_CODEC_ID_JACOSUB = 0x17000 + 11, + AV_CODEC_ID_SAMI = 0x17000 + 12, + AV_CODEC_ID_REALTEXT = 0x17000 + 13, + AV_CODEC_ID_STL = 0x17000 + 14, + AV_CODEC_ID_SUBVIEWER1 = 0x17000 + 15, + AV_CODEC_ID_SUBVIEWER = 0x17000 + 16, + AV_CODEC_ID_SUBRIP = 0x17000 + 17, + AV_CODEC_ID_WEBVTT = 0x17000 + 18, + AV_CODEC_ID_MPL2 = 0x17000 + 19, + AV_CODEC_ID_VPLAYER = 0x17000 + 20, + AV_CODEC_ID_PJS = 0x17000 + 21, + AV_CODEC_ID_ASS = 0x17000 + 22, + AV_CODEC_ID_HDMV_TEXT_SUBTITLE = 0x17000 + 23, + AV_CODEC_ID_TTML = 0x17000 + 24, + AV_CODEC_ID_ARIB_CAPTION = 0x17000 + 25, /* other specific kind of codecs (generally used for attachments) */ /** A dummy ID pointing at the start of various fake codecs. */ @@ -587,14 +585,14 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { /** Contain timestamp estimated through PCR of program stream. */ AV_CODEC_ID_SCTE_35 = 0x18000 + 1, AV_CODEC_ID_EPG = 0x18000 + 2, - AV_CODEC_ID_BINTEXT = 0x18800, - AV_CODEC_ID_XBIN = 0x18800 + 1, - AV_CODEC_ID_IDF = 0x18800 + 2, - AV_CODEC_ID_OTF = 0x18800 + 3, - AV_CODEC_ID_SMPTE_KLV = 0x18800 + 4, - AV_CODEC_ID_DVD_NAV = 0x18800 + 5, - AV_CODEC_ID_TIMED_ID3 = 0x18800 + 6, - AV_CODEC_ID_BIN_DATA = 0x18800 + 7, + AV_CODEC_ID_BINTEXT = 0x18000 + 3, + AV_CODEC_ID_XBIN = 0x18000 + 4, + AV_CODEC_ID_IDF = 0x18000 + 5, + AV_CODEC_ID_OTF = 0x18000 + 6, + AV_CODEC_ID_SMPTE_KLV = 0x18000 + 7, + AV_CODEC_ID_DVD_NAV = 0x18000 + 8, + AV_CODEC_ID_TIMED_ID3 = 0x18000 + 9, + AV_CODEC_ID_BIN_DATA = 0x18000 + 10, /** codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it */ @@ -622,6 +620,45 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native @Cast("const char*") BytePointer avcodec_get_name(@Cast("AVCodecID") int id); +/** + * Return codec bits per sample. + * + * @param codec_id [in] the codec + * @return Number of bits per sample or zero if unknown for the given codec. + */ +@NoException public static native int av_get_bits_per_sample(@Cast("AVCodecID") int codec_id); + +/** + * Return codec bits per sample. + * Only return non-zero if the bits per sample is exactly correct, not an + * approximation. + * + * @param codec_id [in] the codec + * @return Number of bits per sample or zero if unknown for the given codec. + */ +@NoException public static native int av_get_exact_bits_per_sample(@Cast("AVCodecID") int codec_id); + +/** + * Return a name for the specified profile, if available. + * + * @param codec_id the ID of the codec to which the requested profile belongs + * @param profile the profile value for which a name is requested + * @return A name for the profile if found, NULL otherwise. + * + * \note unlike av_get_profile_name(), which searches a list of profiles + * supported by a specific decoder or encoder implementation, this + * function searches the list of profiles from the AVCodecDescriptor + */ +@NoException public static native @Cast("const char*") BytePointer avcodec_profile_name(@Cast("AVCodecID") int codec_id, int profile); + +/** + * Return the PCM codec associated with a sample format. + * @param be endianness, 0 for little, 1 for big, + * -1 (or anything else) for native + * @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE + */ +@NoException public static native @Cast("AVCodecID") int av_get_pcm_codec(@Cast("AVSampleFormat") int fmt, int be); + /** * \} */ @@ -796,6 +833,11 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native int avcodec_parameters_copy(AVCodecParameters dst, @Const AVCodecParameters src); +/** + * This function is the same as av_get_audio_frame_duration(), except it works + * with AVCodecParameters instead of an AVCodecContext. + */ +@NoException public static native int av_get_audio_frame_duration2(AVCodecParameters par, int frame_bytes); /** * \} @@ -804,6 +846,119 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { // #endif // AVCODEC_CODEC_PAR_H +// Parsed from + +/* + * + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef AVCODEC_DEFS_H +// #define AVCODEC_DEFS_H + +/** + * \file + * \ingroup libavc + * Misc types and constants that do not belong anywhere else. + */ + +// #include +// #include + +/** + * \ingroup lavc_decoding + * Required number of additionally allocated bytes at the end of the input bitstream for decoding. + * This is mainly needed because some optimized bitstream readers read + * 32 or 64 bit at once and could read over the end.
+ * Note: If the first 23 bits of the additional bytes are not 0, then damaged + * MPEG bitstreams could cause overread and segfault. + */ +public static final int AV_INPUT_BUFFER_PADDING_SIZE = 64; + +/** + * \ingroup lavc_decoding + */ +/** enum AVDiscard */ +public static final int + /* We leave some space between them for extensions (drop some + * keyframes for intra-only or drop just some bidir frames). */ + /** discard nothing */ + AVDISCARD_NONE = -16, + /** discard useless packets like 0 size packets in avi */ + AVDISCARD_DEFAULT = 0, + /** discard all non reference */ + AVDISCARD_NONREF = 8, + /** discard all bidirectional frames */ + AVDISCARD_BIDIR = 16, + /** discard all non intra frames */ + AVDISCARD_NONINTRA = 24, + /** discard all frames except keyframes */ + AVDISCARD_NONKEY = 32, + /** discard all */ + AVDISCARD_ALL = 48; + +/** enum AVAudioServiceType */ +public static final int + AV_AUDIO_SERVICE_TYPE_MAIN = 0, + AV_AUDIO_SERVICE_TYPE_EFFECTS = 1, + AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2, + AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3, + AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4, + AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5, + AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6, + AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7, + AV_AUDIO_SERVICE_TYPE_KARAOKE = 8, + /** Not part of ABI */ + AV_AUDIO_SERVICE_TYPE_NB = 9; +// Targeting ../avcodec/AVPanScan.java + + +// Targeting ../avcodec/AVCPBProperties.java + + + +/** + * Allocate a CPB properties structure and initialize its fields to default + * values. + * + * @param size if non-NULL, the size of the allocated struct will be written + * here. This is useful for embedding it in side data. + * + * @return the newly allocated struct or NULL on failure + */ +@NoException public static native AVCPBProperties av_cpb_properties_alloc(@Cast("size_t*") SizeTPointer size); +// Targeting ../avcodec/AVProducerReferenceTime.java + + + +/** + * Encode extradata length to a buffer. Used by xiph codecs. + * + * @param s buffer to write to; must be at least (v/255+1) bytes long + * @param v size of extradata in bytes + * @return number of bytes written to the buffer. + */ +@NoException public static native @Cast("unsigned int") int av_xiphlacing(@Cast("unsigned char*") BytePointer s, @Cast("unsigned int") int v); +@NoException public static native @Cast("unsigned int") int av_xiphlacing(@Cast("unsigned char*") ByteBuffer s, @Cast("unsigned int") int v); +@NoException public static native @Cast("unsigned int") int av_xiphlacing(@Cast("unsigned char*") byte[] s, @Cast("unsigned int") int v); + +// #endif // AVCODEC_DEFS_H + + // Parsed from /* @@ -1099,6 +1254,14 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ AV_PKT_DATA_S12M_TIMECODE = 30, + /** + * HDR10+ dynamic metadata associated with a video frame. The metadata is in + * the form of the AVDynamicHDRPlus struct and contains + * information for color volume transform - application 4 of + * SMPTE 2094-40:2016 standard. + */ + AV_PKT_DATA_DYNAMIC_HDR10_PLUS = 31, + /** * The number of side data types. * This is not part of the public API/ABI in the sense that it may @@ -1107,7 +1270,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * If its value becomes huge, some code using it * needs to be updated as it assumes it to be smaller than other limits. */ - AV_PKT_DATA_NB = 31; + AV_PKT_DATA_NB = 32; public static final int AV_PKT_DATA_QUALITY_FACTOR = AV_PKT_DATA_QUALITY_STATS; // Targeting ../avcodec/AVPacketSideData.java @@ -1247,41 +1410,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { @NoException public static native int av_packet_from_data(AVPacket pkt, @Cast("uint8_t*") ByteBuffer data, int size); @NoException public static native int av_packet_from_data(AVPacket pkt, @Cast("uint8_t*") byte[] data, int size); -// #if FF_API_AVPACKET_OLD_API -/** - * \warning This is a hack - the packet memory allocation stuff is broken. The - * packet is allocated if it was not really allocated. - * - * @deprecated Use av_packet_ref or av_packet_make_refcounted - */ -@NoException public static native @Deprecated int av_dup_packet(AVPacket pkt); -/** - * Copy packet, including contents - * - * @return 0 on success, negative AVERROR on fail - * - * @deprecated Use av_packet_ref - */ -@NoException public static native @Deprecated int av_copy_packet(AVPacket dst, @Const AVPacket src); - -/** - * Copy packet side data - * - * @return 0 on success, negative AVERROR on fail - * - * @deprecated Use av_packet_copy_props - */ -@NoException public static native @Deprecated int av_copy_packet_side_data(AVPacket dst, @Const AVPacket src); - -/** - * Free a packet. - * - * @deprecated Use av_packet_unref - * - * @param pkt packet to free - */ -@NoException public static native @Deprecated void av_free_packet(AVPacket pkt); -// #endif /** * Allocate new information of a packet. * @@ -1291,9 +1419,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @return pointer to fresh allocated data or NULL otherwise */ @NoException public static native @Cast("uint8_t*") BytePointer av_packet_new_side_data(AVPacket pkt, @Cast("AVPacketSideDataType") int type, - int size); -// #else -// #endif + @Cast("size_t") long size); /** * Wrap an existing array as a packet side data. @@ -1324,9 +1450,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @return 0 on success, < 0 on failure */ @NoException public static native int av_packet_shrink_side_data(AVPacket pkt, @Cast("AVPacketSideDataType") int type, - int size); -// #else -// #endif + @Cast("size_t") long size); /** * Get side information from packet. @@ -1338,19 +1462,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @return pointer to data if present or NULL otherwise */ @NoException public static native @Cast("uint8_t*") BytePointer av_packet_get_side_data(@Const AVPacket pkt, @Cast("AVPacketSideDataType") int type, - IntPointer size); -@NoException public static native @Cast("uint8_t*") ByteBuffer av_packet_get_side_data(@Const AVPacket pkt, @Cast("AVPacketSideDataType") int type, - IntBuffer size); -@NoException public static native @Cast("uint8_t*") byte[] av_packet_get_side_data(@Const AVPacket pkt, @Cast("AVPacketSideDataType") int type, - int[] size); -// #else -// #endif - -// #if FF_API_MERGE_SD_API -@NoException public static native @Deprecated int av_packet_merge_side_data(AVPacket pkt); - -@NoException public static native @Deprecated int av_packet_split_side_data(AVPacket pkt); -// #endif + @Cast("size_t*") SizeTPointer size); @NoException public static native @Cast("const char*") BytePointer av_packet_side_data_name(@Cast("AVPacketSideDataType") int type); @@ -1361,12 +1473,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @param size pointer to store the size of the returned data * @return pointer to data if successful, NULL otherwise */ -// #if FF_API_BUFFER_SIZE_T -@NoException public static native @Cast("uint8_t*") BytePointer av_packet_pack_dictionary(AVDictionary dict, IntPointer size); -@NoException public static native @Cast("uint8_t*") ByteBuffer av_packet_pack_dictionary(AVDictionary dict, IntBuffer size); -@NoException public static native @Cast("uint8_t*") byte[] av_packet_pack_dictionary(AVDictionary dict, int[] size); -// #else -// #endif +@NoException public static native @Cast("uint8_t*") BytePointer av_packet_pack_dictionary(AVDictionary dict, @Cast("size_t*") SizeTPointer size); /** * Unpack a dictionary from side_data. * @@ -1375,13 +1482,14 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @param dict the metadata storage dictionary * @return 0 on success, < 0 on failure */ -// #if FF_API_BUFFER_SIZE_T -@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") BytePointer data, int size, @Cast("AVDictionary**") PointerPointer dict); -@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") BytePointer data, int size, @ByPtrPtr AVDictionary dict); -@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") ByteBuffer data, int size, @ByPtrPtr AVDictionary dict); -@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") byte[] data, int size, @ByPtrPtr AVDictionary dict); -// #else -// #endif +@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") BytePointer data, @Cast("size_t") long size, + @Cast("AVDictionary**") PointerPointer dict); +@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") BytePointer data, @Cast("size_t") long size, + @ByPtrPtr AVDictionary dict); +@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") ByteBuffer data, @Cast("size_t") long size, + @ByPtrPtr AVDictionary dict); +@NoException public static native int av_packet_unpack_dictionary(@Cast("const uint8_t*") byte[] data, @Cast("size_t") long size, + @ByPtrPtr AVDictionary dict); /** * Convenience function to free all the side data stored. @@ -1522,9 +1630,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { // #include "codec_id.h" // #include "codec_par.h" // #include "packet.h" -// Targeting ../avcodec/AVBSFInternal.java - - // Targeting ../avcodec/AVBSFContext.java @@ -1788,7 +1893,12 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer. */ public static final int AV_CODEC_CAP_DR1 = (1 << 1); +// #if FF_API_FLAG_TRUNCATED +/** + * @deprecated Use parsers to always send proper frames. + */ public static final int AV_CODEC_CAP_TRUNCATED = (1 << 3); +// #endif /** * Encoder or decoder requires flushing with NULL input at the end in order to * give the complete and correct output. @@ -1942,7 +2052,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @param id AVCodecID of the requested decoder * @return A decoder if one was found, NULL otherwise. */ -@NoException public static native AVCodec avcodec_find_decoder(@Cast("AVCodecID") int id); +@NoException public static native @Const AVCodec avcodec_find_decoder(@Cast("AVCodecID") int id); /** * Find a registered decoder with the specified name. @@ -1950,8 +2060,8 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @param name name of the requested decoder * @return A decoder if one was found, NULL otherwise. */ -@NoException public static native AVCodec avcodec_find_decoder_by_name(@Cast("const char*") BytePointer name); -@NoException public static native AVCodec avcodec_find_decoder_by_name(String name); +@NoException public static native @Const AVCodec avcodec_find_decoder_by_name(@Cast("const char*") BytePointer name); +@NoException public static native @Const AVCodec avcodec_find_decoder_by_name(String name); /** * Find a registered encoder with a matching codec ID. @@ -1959,7 +2069,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @param id AVCodecID of the requested encoder * @return An encoder if one was found, NULL otherwise. */ -@NoException public static native AVCodec avcodec_find_encoder(@Cast("AVCodecID") int id); +@NoException public static native @Const AVCodec avcodec_find_encoder(@Cast("AVCodecID") int id); /** * Find a registered encoder with the specified name. @@ -1967,8 +2077,8 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * @param name name of the requested encoder * @return An encoder if one was found, NULL otherwise. */ -@NoException public static native AVCodec avcodec_find_encoder_by_name(@Cast("const char*") BytePointer name); -@NoException public static native AVCodec avcodec_find_encoder_by_name(String name); +@NoException public static native @Const AVCodec avcodec_find_encoder_by_name(@Cast("const char*") BytePointer name); +@NoException public static native @Const AVCodec avcodec_find_encoder_by_name(String name); /** * @return a non-zero number if codec is an encoder, zero otherwise */ @@ -1979,6 +2089,15 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native int av_codec_is_decoder(@Const AVCodec codec); +/** + * Return a name for the specified profile, if available. + * + * @param codec the codec that is searched for the given profile + * @param profile the profile value for which a name is requested + * @return A name for the profile if found, NULL otherwise. + */ +@NoException public static native @Cast("const char*") BytePointer av_get_profile_name(@Const AVCodec codec, int profile); + /** enum */ public static final int /** @@ -2069,25 +2188,21 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * Libavcodec external API header */ -// #include // #include "libavutil/samplefmt.h" // #include "libavutil/attributes.h" // #include "libavutil/avutil.h" // #include "libavutil/buffer.h" -// #include "libavutil/cpu.h" -// #include "libavutil/channel_layout.h" // #include "libavutil/dict.h" // #include "libavutil/frame.h" -// #include "libavutil/hwcontext.h" // #include "libavutil/log.h" // #include "libavutil/pixfmt.h" // #include "libavutil/rational.h" -// #include "bsf.h" // #include "codec.h" // #include "codec_desc.h" // #include "codec_par.h" // #include "codec_id.h" +// #include "defs.h" // #include "packet.h" // #include "version.h" @@ -2197,29 +2312,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * at least will not fail with AVERROR(EAGAIN). In general, no codec will * permit unlimited buffering of input or output. * - * This API replaces the following legacy functions: - * - avcodec_decode_video2() and avcodec_decode_audio4(): - * Use avcodec_send_packet() to feed input to the decoder, then use - * avcodec_receive_frame() to receive decoded frames after each packet. - * Unlike with the old video decoding API, multiple frames might result from - * a packet. For audio, splitting the input packet into frames by partially - * decoding packets becomes transparent to the API user. You never need to - * feed an AVPacket to the API twice (unless it is rejected with AVERROR(EAGAIN) - then - * no data was read from the packet). - * Additionally, sending a flush/draining packet is required only once. - * - avcodec_encode_video2()/avcodec_encode_audio2(): - * Use avcodec_send_frame() to feed input to the encoder, then use - * avcodec_receive_packet() to receive encoded packets. - * Providing user-allocated buffers for avcodec_receive_packet() is not - * possible. - * - The new API does not handle subtitles yet. - * - * Mixing new and old function calls on the same AVCodecContext is not allowed, - * and will result in undefined behavior. - * - * Some codecs might require using the new API; using the old API will return - * an error when calling it. All codecs support the new API. - * * A codec is not allowed to return AVERROR(EAGAIN) for both sending and receiving. This * would be an invalid state, which could put the codec user into an endless * loop. The API has no concept of time either: it cannot happen that trying to @@ -2246,58 +2338,12 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * \{ */ -/** - * \ingroup lavc_decoding - * Required number of additionally allocated bytes at the end of the input bitstream for decoding. - * This is mainly needed because some optimized bitstream readers read - * 32 or 64 bit at once and could read over the end.
- * Note: If the first 23 bits of the additional bytes are not 0, then damaged - * MPEG bitstreams could cause overread and segfault. - */ -public static final int AV_INPUT_BUFFER_PADDING_SIZE = 64; - /** * \ingroup lavc_encoding * minimum encoding buffer size * Used to avoid some checks during header writing. */ public static final int AV_INPUT_BUFFER_MIN_SIZE = 16384; - -/** - * \ingroup lavc_decoding - */ -/** enum AVDiscard */ -public static final int - /* We leave some space between them for extensions (drop some - * keyframes for intra-only or drop just some bidir frames). */ - /** discard nothing */ - AVDISCARD_NONE = -16, - /** discard useless packets like 0 size packets in avi */ - AVDISCARD_DEFAULT = 0, - /** discard all non reference */ - AVDISCARD_NONREF = 8, - /** discard all bidirectional frames */ - AVDISCARD_BIDIR = 16, - /** discard all non intra frames */ - AVDISCARD_NONINTRA = 24, - /** discard all frames except keyframes */ - AVDISCARD_NONKEY = 32, - /** discard all */ - AVDISCARD_ALL = 48; - -/** enum AVAudioServiceType */ -public static final int - AV_AUDIO_SERVICE_TYPE_MAIN = 0, - AV_AUDIO_SERVICE_TYPE_EFFECTS = 1, - AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2, - AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3, - AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4, - AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5, - AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6, - AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7, - AV_AUDIO_SERVICE_TYPE_KARAOKE = 8, - /** Not part of ABI */ - AV_AUDIO_SERVICE_TYPE_NB = 9; // Targeting ../avcodec/RcOverride.java @@ -2353,11 +2399,15 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * error[?] variables will be set during encoding. */ public static final int AV_CODEC_FLAG_PSNR = (1 << 15); +// #if FF_API_FLAG_TRUNCATED /** * Input bitstream might be truncated at a random location * instead of only at frame boundaries. + * + * @deprecated use codec parsers for packetizing input */ public static final int AV_CODEC_FLAG_TRUNCATED = (1 << 16); +// #endif /** * Use interlaced DCT. */ @@ -2458,20 +2508,11 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * Do not apply film grain, export it instead. */ public static final int AV_CODEC_EXPORT_DATA_FILM_GRAIN = (1 << 3); -// Targeting ../avcodec/AVPanScan.java - - -// Targeting ../avcodec/AVCPBProperties.java - - -// Targeting ../avcodec/AVProducerReferenceTime.java - - -/** - * The decoder will keep a reference to the frame and may reuse it later. - */ -public static final int AV_GET_BUFFER_FLAG_REF = (1 << 0); +/** + * The decoder will keep a reference to the frame and may reuse it later. + */ +public static final int AV_GET_BUFFER_FLAG_REF = (1 << 0); /** * The encoder will keep a reference to the packet and may reuse it later. @@ -2483,34 +2524,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { // Targeting ../avcodec/AVCodecContext.java - -// #if FF_API_CODEC_GET_SET -/** - * Accessors for some AVCodecContext fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -@NoException public static native @Deprecated @ByVal AVRational av_codec_get_pkt_timebase(@Const AVCodecContext avctx); -@NoException public static native @Deprecated void av_codec_set_pkt_timebase(AVCodecContext avctx, @ByVal AVRational val); - -@NoException public static native @Const @Deprecated AVCodecDescriptor av_codec_get_codec_descriptor(@Const AVCodecContext avctx); -@NoException public static native @Deprecated void av_codec_set_codec_descriptor(AVCodecContext avctx, @Const AVCodecDescriptor desc); - -@NoException public static native @Cast("unsigned") @Deprecated int av_codec_get_codec_properties(@Const AVCodecContext avctx); - -@NoException public static native @Deprecated int av_codec_get_lowres(@Const AVCodecContext avctx); -@NoException public static native @Deprecated void av_codec_set_lowres(AVCodecContext avctx, int val); - -@NoException public static native @Deprecated int av_codec_get_seek_preroll(@Const AVCodecContext avctx); -@NoException public static native @Deprecated void av_codec_set_seek_preroll(AVCodecContext avctx, int val); - -@NoException public static native @Cast("uint16_t*") @Deprecated ShortPointer av_codec_get_chroma_intra_matrix(@Const AVCodecContext avctx); -@NoException public static native @Deprecated void av_codec_set_chroma_intra_matrix(AVCodecContext avctx, @Cast("uint16_t*") ShortPointer val); -@NoException public static native @Deprecated void av_codec_set_chroma_intra_matrix(AVCodecContext avctx, @Cast("uint16_t*") ShortBuffer val); -@NoException public static native @Deprecated void av_codec_set_chroma_intra_matrix(AVCodecContext avctx, @Cast("uint16_t*") short[] val); -// #endif - -// #if FF_API_CODEC_GET_SET -@NoException public static native @Deprecated int av_codec_get_max_lowres(@Const AVCodec codec); // Targeting ../avcodec/MpegEncContext.java @@ -2553,14 +2566,10 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * while indicating success. */ public static final int AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH = (1 << 2); -// Targeting ../avcodec/AVPicture.java - - /** * \} */ -// #endif /** enum AVSubtitleType */ public static final int @@ -2589,15 +2598,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { -// #if FF_API_NEXT -/** - * If c is NULL, returns the first registered codec, - * if c is non-NULL, returns the next registered codec after c, - * or NULL if c is the last one. - */ -@NoException public static native @Deprecated AVCodec av_codec_next(@Const AVCodec c); -// #endif - /** * Return the LIBAVCODEC_VERSION_INT constant. */ @@ -2613,18 +2613,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native @Cast("const char*") BytePointer avcodec_license(); -// #if FF_API_NEXT -/** - * @deprecated Calling this function is unnecessary. - */ -@NoException public static native @Deprecated void avcodec_register(AVCodec codec); - -/** - * @deprecated Calling this function is unnecessary. - */ -@NoException public static native @Deprecated void avcodec_register_all(); -// #endif - /** * Allocate an AVCodecContext and set its fields to default values. The * resulting struct should be freed with avcodec_free_context(). @@ -2647,15 +2635,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { @NoException public static native void avcodec_free_context(@Cast("AVCodecContext**") PointerPointer avctx); @NoException public static native void avcodec_free_context(@ByPtrPtr AVCodecContext avctx); -// #if FF_API_GET_CONTEXT_DEFAULTS -/** - * @deprecated This function should not be used, as closing and opening a codec - * context multiple time is not supported. A new codec context should be - * allocated for each new use. - */ -@NoException public static native int avcodec_get_context_defaults3(AVCodecContext s, @Const AVCodec codec); -// #endif - /** * Get the AVClass for AVCodecContext. It can be used in combination with * AV_OPT_SEARCH_FAKE_OBJ for examining options. @@ -2679,27 +2658,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native @Const AVClass avcodec_get_subtitle_rect_class(); -// #if FF_API_COPY_CONTEXT -/** - * Copy the settings of the source AVCodecContext into the destination - * AVCodecContext. The resulting destination codec context will be - * unopened, i.e. you are required to call avcodec_open2() before you - * can use this AVCodecContext to decode/encode video/audio data. - * - * @param dest target codec context, should be initialized with - * avcodec_alloc_context3(NULL), but otherwise uninitialized - * @param src source codec context - * @return AVERROR() on error (e.g. memory allocation error), 0 on success - * - * @deprecated The semantics of this function are ill-defined and it should not - * be used. If you need to transfer the stream parameters from one codec context - * to another, use an intermediate AVCodecParameters instance and the - * avcodec_parameters_from_context() / avcodec_parameters_to_context() - * functions. - */ -@NoException public static native @Deprecated int avcodec_copy_context(AVCodecContext dest, @Const AVCodecContext src); -// #endif - /** * Fill the parameters struct based on the values from the supplied codec * context. Any allocated fields in par are freed and replaced with duplicates @@ -2855,123 +2813,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native @Cast("AVChromaLocation") int avcodec_chroma_pos_to_enum(int xpos, int ypos); -// #if FF_API_OLD_ENCDEC -/** - * Decode the audio frame of size avpkt->size from avpkt->data into frame. - * - * Some decoders may support multiple frames in a single AVPacket. Such - * decoders would then just decode the first frame and the return value would be - * less than the packet size. In this case, avcodec_decode_audio4 has to be - * called again with an AVPacket containing the remaining data in order to - * decode the second frame, etc... Even if no frames are returned, the packet - * needs to be fed to the decoder with remaining data until it is completely - * consumed or an error occurs. - * - * Some decoders (those marked with AV_CODEC_CAP_DELAY) have a delay between input - * and output. This means that for some packets they will not immediately - * produce decoded output and need to be flushed at the end of decoding to get - * all the decoded data. Flushing is done by calling this function with packets - * with avpkt->data set to NULL and avpkt->size set to 0 until it stops - * returning samples. It is safe to flush even those decoders that are not - * marked with AV_CODEC_CAP_DELAY, then no samples will be returned. - * - * \warning The input buffer, avpkt->data must be AV_INPUT_BUFFER_PADDING_SIZE - * larger than the actual read bytes because some optimized bitstream - * readers read 32 or 64 bits at once and could read over the end. - * - * \note The AVCodecContext MUST have been opened with \ref avcodec_open2() - * before packets may be fed to the decoder. - * - * @param avctx the codec context - * @param frame [out] The AVFrame in which to store decoded audio samples. - * The decoder will allocate a buffer for the decoded frame by - * calling the AVCodecContext.get_buffer2() callback. - * When AVCodecContext.refcounted_frames is set to 1, the frame is - * reference counted and the returned reference belongs to the - * caller. The caller must release the frame using av_frame_unref() - * when the frame is no longer needed. The caller may safely write - * to the frame if av_frame_is_writable() returns 1. - * When AVCodecContext.refcounted_frames is set to 0, the returned - * reference belongs to the decoder and is valid only until the - * next call to this function or until closing or flushing the - * decoder. The caller may not write to it. - * @param got_frame_ptr [out] Zero if no frame could be decoded, otherwise it is - * non-zero. Note that this field being set to zero - * does not mean that an error has occurred. For - * decoders with AV_CODEC_CAP_DELAY set, no given decode - * call is guaranteed to produce a frame. - * @param avpkt [in] The input AVPacket containing the input buffer. - * At least avpkt->data and avpkt->size should be set. Some - * decoders might also require additional fields to be set. - * @return A negative error code is returned if an error occurred during - * decoding, otherwise the number of bytes consumed from the input - * AVPacket is returned. - * -* @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). - */ -@NoException public static native @Deprecated int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, - IntPointer got_frame_ptr, @Const AVPacket avpkt); -@NoException public static native @Deprecated int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, - IntBuffer got_frame_ptr, @Const AVPacket avpkt); -@NoException public static native @Deprecated int avcodec_decode_audio4(AVCodecContext avctx, AVFrame frame, - int[] got_frame_ptr, @Const AVPacket avpkt); - -/** - * Decode the video frame of size avpkt->size from avpkt->data into picture. - * Some decoders may support multiple frames in a single AVPacket, such - * decoders would then just decode the first frame. - * - * \warning The input buffer must be AV_INPUT_BUFFER_PADDING_SIZE larger than - * the actual read bytes because some optimized bitstream readers read 32 or 64 - * bits at once and could read over the end. - * - * \warning The end of the input buffer buf should be set to 0 to ensure that - * no overreading happens for damaged MPEG streams. - * - * \note Codecs which have the AV_CODEC_CAP_DELAY capability set have a delay - * between input and output, these need to be fed with avpkt->data=NULL, - * avpkt->size=0 at the end to return the remaining frames. - * - * \note The AVCodecContext MUST have been opened with \ref avcodec_open2() - * before packets may be fed to the decoder. - * - * @param avctx the codec context - * @param picture [out] The AVFrame in which the decoded video frame will be stored. - * Use av_frame_alloc() to get an AVFrame. The codec will - * allocate memory for the actual bitmap by calling the - * AVCodecContext.get_buffer2() callback. - * When AVCodecContext.refcounted_frames is set to 1, the frame is - * reference counted and the returned reference belongs to the - * caller. The caller must release the frame using av_frame_unref() - * when the frame is no longer needed. The caller may safely write - * to the frame if av_frame_is_writable() returns 1. - * When AVCodecContext.refcounted_frames is set to 0, the returned - * reference belongs to the decoder and is valid only until the - * next call to this function or until closing or flushing the - * decoder. The caller may not write to it. - * - * @param avpkt [in] The input AVPacket containing the input buffer. - * You can create such packet with av_init_packet() and by then setting - * data and size, some decoders might in addition need other fields like - * flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least - * fields possible. - * @param got_picture_ptr [in,out] Zero if no frame could be decompressed, otherwise, it is nonzero. - * @return On error a negative value is returned, otherwise the number of bytes - * used or zero if no frame could be decompressed. - * - * @deprecated Use avcodec_send_packet() and avcodec_receive_frame(). - */ -@NoException public static native @Deprecated int avcodec_decode_video2(AVCodecContext avctx, AVFrame picture, - IntPointer got_picture_ptr, - @Const AVPacket avpkt); -@NoException public static native @Deprecated int avcodec_decode_video2(AVCodecContext avctx, AVFrame picture, - IntBuffer got_picture_ptr, - @Const AVPacket avpkt); -@NoException public static native @Deprecated int avcodec_decode_video2(AVCodecContext avctx, AVFrame picture, - int[] got_picture_ptr, - @Const AVPacket avpkt); -// #endif - /** * Decode a subtitle message. * Return a negative value on error, otherwise return the number of bytes used. @@ -3021,10 +2862,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * larger than the actual read bytes because some optimized bitstream * readers read 32 or 64 bits at once and could read over the end. * - * \warning Do not mix this API with the legacy API (like avcodec_decode_video2()) - * on the same AVCodecContext. It will return unexpected results now - * or in future libavcodec versions. - * * \note The AVCodecContext MUST have been opened with \ref avcodec_open2() * before packets may be fed to the decoder. * @@ -3114,8 +2951,7 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * the call will not fail with EAGAIN). * AVERROR_EOF: the encoder has been flushed, and no new frames can * be sent to it - * AVERROR(EINVAL): codec not opened, refcounted_frames not set, it is a - * decoder, or requires flush + * AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush * AVERROR(ENOMEM): failed to add packet to internal queue, or similar * other errors: legitimate encoding errors */ @@ -3276,11 +3112,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { @NoException public static native @Const AVCodecParser av_parser_iterate(@Cast("void**") PointerPointer opaque); @NoException public static native @Const AVCodecParser av_parser_iterate(@Cast("void**") @ByPtrPtr Pointer opaque); -// #if FF_API_NEXT -@NoException public static native @Deprecated AVCodecParser av_parser_next(@Const AVCodecParser c); - -@NoException public static native @Deprecated void av_register_codec_parser(AVCodecParser parser); -// #endif @NoException public static native AVCodecParserContext av_parser_init(int codec_id); /** @@ -3339,29 +3170,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { @Cast("int64_t") long pts, @Cast("int64_t") long dts, @Cast("int64_t") long pos); -// #if FF_API_PARSER_CHANGE -/** - * @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed - * @deprecated Use dump_extradata, remove_extra or extract_extradata - * bitstream filters instead. - */ -@NoException public static native @Deprecated int av_parser_change(AVCodecParserContext s, - AVCodecContext avctx, - @Cast("uint8_t**") PointerPointer poutbuf, IntPointer poutbuf_size, - @Cast("const uint8_t*") BytePointer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_parser_change(AVCodecParserContext s, - AVCodecContext avctx, - @Cast("uint8_t**") @ByPtrPtr BytePointer poutbuf, IntPointer poutbuf_size, - @Cast("const uint8_t*") BytePointer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_parser_change(AVCodecParserContext s, - AVCodecContext avctx, - @Cast("uint8_t**") @ByPtrPtr ByteBuffer poutbuf, IntBuffer poutbuf_size, - @Cast("const uint8_t*") ByteBuffer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_parser_change(AVCodecParserContext s, - AVCodecContext avctx, - @Cast("uint8_t**") @ByPtrPtr byte[] poutbuf, int[] poutbuf_size, - @Cast("const uint8_t*") byte[] buf, int buf_size, int keyframe); -// #endif @NoException public static native void av_parser_close(AVCodecParserContext s); /** @@ -3374,101 +3182,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * \{ */ -// #if FF_API_OLD_ENCDEC -/** - * Encode a frame of audio. - * - * Takes input samples from frame and writes the next output packet, if - * available, to avpkt. The output packet does not necessarily contain data for - * the most recent frame, as encoders can delay, split, and combine input frames - * internally as needed. - * - * @param avctx codec context - * @param avpkt output AVPacket. - * The user can supply an output buffer by setting - * avpkt->data and avpkt->size prior to calling the - * function, but if the size of the user-provided data is not - * large enough, encoding will fail. If avpkt->data and - * avpkt->size are set, avpkt->destruct must also be set. All - * other AVPacket fields will be reset by the encoder using - * av_init_packet(). If avpkt->data is NULL, the encoder will - * allocate it. The encoder will set avpkt->size to the size - * of the output packet. - * - * If this function fails or produces no output, avpkt will be - * freed using av_packet_unref(). - * @param frame [in] AVFrame containing the raw audio data to be encoded. - * May be NULL when flushing an encoder that has the - * AV_CODEC_CAP_DELAY capability set. - * If AV_CODEC_CAP_VARIABLE_FRAME_SIZE is set, then each frame - * can have any number of samples. - * If it is not set, frame->nb_samples must be equal to - * avctx->frame_size for all frames except the last. - * The final frame may be smaller than avctx->frame_size. - * @param got_packet_ptr [out] This field is set to 1 by libavcodec if the - * output packet is non-empty, and to 0 if it is - * empty. If the function returns an error, the - * packet can be assumed to be invalid, and the - * value of got_packet_ptr is undefined and should - * not be used. - * @return 0 on success, negative error code on failure - * - * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead. - * If allowed and required, set AVCodecContext.get_encode_buffer to - * a custom function to pass user supplied output buffers. - */ -@NoException public static native @Deprecated int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, - @Const AVFrame frame, IntPointer got_packet_ptr); -@NoException public static native @Deprecated int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, - @Const AVFrame frame, IntBuffer got_packet_ptr); -@NoException public static native @Deprecated int avcodec_encode_audio2(AVCodecContext avctx, AVPacket avpkt, - @Const AVFrame frame, int[] got_packet_ptr); - -/** - * Encode a frame of video. - * - * Takes input raw video data from frame and writes the next output packet, if - * available, to avpkt. The output packet does not necessarily contain data for - * the most recent frame, as encoders can delay and reorder input frames - * internally as needed. - * - * @param avctx codec context - * @param avpkt output AVPacket. - * The user can supply an output buffer by setting - * avpkt->data and avpkt->size prior to calling the - * function, but if the size of the user-provided data is not - * large enough, encoding will fail. All other AVPacket fields - * will be reset by the encoder using av_init_packet(). If - * avpkt->data is NULL, the encoder will allocate it. - * The encoder will set avpkt->size to the size of the - * output packet. The returned data (if any) belongs to the - * caller, he is responsible for freeing it. - * - * If this function fails or produces no output, avpkt will be - * freed using av_packet_unref(). - * @param frame [in] AVFrame containing the raw video data to be encoded. - * May be NULL when flushing an encoder that has the - * AV_CODEC_CAP_DELAY capability set. - * @param got_packet_ptr [out] This field is set to 1 by libavcodec if the - * output packet is non-empty, and to 0 if it is - * empty. If the function returns an error, the - * packet can be assumed to be invalid, and the - * value of got_packet_ptr is undefined and should - * not be used. - * @return 0 on success, negative error code on failure - * - * @deprecated use avcodec_send_frame()/avcodec_receive_packet() instead. - * If allowed and required, set AVCodecContext.get_encode_buffer to - * a custom function to pass user supplied output buffers. - */ -@NoException public static native @Deprecated int avcodec_encode_video2(AVCodecContext avctx, AVPacket avpkt, - @Const AVFrame frame, IntPointer got_packet_ptr); -@NoException public static native @Deprecated int avcodec_encode_video2(AVCodecContext avctx, AVPacket avpkt, - @Const AVFrame frame, IntBuffer got_packet_ptr); -@NoException public static native @Deprecated int avcodec_encode_video2(AVCodecContext avctx, AVPacket avpkt, - @Const AVFrame frame, int[] got_packet_ptr); -// #endif - @NoException public static native int avcodec_encode_subtitle(AVCodecContext avctx, @Cast("uint8_t*") BytePointer buf, int buf_size, @Const AVSubtitle sub); @NoException public static native int avcodec_encode_subtitle(AVCodecContext avctx, @Cast("uint8_t*") ByteBuffer buf, int buf_size, @@ -3481,77 +3194,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * \} */ -// #if FF_API_AVPICTURE -/** - * \addtogroup lavc_picture - * \{ - */ - -/** - * @deprecated unused - */ -@NoException public static native @Deprecated int avpicture_alloc(AVPicture picture, @Cast("AVPixelFormat") int pix_fmt, int width, int height); - -/** - * @deprecated unused - */ -@NoException public static native @Deprecated void avpicture_free(AVPicture picture); - -/** - * @deprecated use av_image_fill_arrays() instead. - */ -@NoException public static native @Deprecated int avpicture_fill(AVPicture picture, @Cast("const uint8_t*") BytePointer ptr, - @Cast("AVPixelFormat") int pix_fmt, int width, int height); -@NoException public static native @Deprecated int avpicture_fill(AVPicture picture, @Cast("const uint8_t*") ByteBuffer ptr, - @Cast("AVPixelFormat") int pix_fmt, int width, int height); -@NoException public static native @Deprecated int avpicture_fill(AVPicture picture, @Cast("const uint8_t*") byte[] ptr, - @Cast("AVPixelFormat") int pix_fmt, int width, int height); - -/** - * @deprecated use av_image_copy_to_buffer() instead. - */ -@NoException public static native @Deprecated int avpicture_layout(@Const AVPicture src, @Cast("AVPixelFormat") int pix_fmt, - int width, int height, - @Cast("unsigned char*") BytePointer dest, int dest_size); -@NoException public static native @Deprecated int avpicture_layout(@Const AVPicture src, @Cast("AVPixelFormat") int pix_fmt, - int width, int height, - @Cast("unsigned char*") ByteBuffer dest, int dest_size); -@NoException public static native @Deprecated int avpicture_layout(@Const AVPicture src, @Cast("AVPixelFormat") int pix_fmt, - int width, int height, - @Cast("unsigned char*") byte[] dest, int dest_size); - -/** - * @deprecated use av_image_get_buffer_size() instead. - */ -@NoException public static native @Deprecated int avpicture_get_size(@Cast("AVPixelFormat") int pix_fmt, int width, int height); - -/** - * @deprecated av_image_copy() instead. - */ -@NoException public static native @Deprecated void av_picture_copy(AVPicture dst, @Const AVPicture src, - @Cast("AVPixelFormat") int pix_fmt, int width, int height); - -/** - * @deprecated unused - */ -@NoException public static native @Deprecated int av_picture_crop(AVPicture dst, @Const AVPicture src, - @Cast("AVPixelFormat") int pix_fmt, int top_band, int left_band); - -/** - * @deprecated unused - */ -@NoException public static native @Deprecated int av_picture_pad(AVPicture dst, @Const AVPicture src, int height, int width, @Cast("AVPixelFormat") int pix_fmt, - int padtop, int padbottom, int padleft, int padright, IntPointer color); -@NoException public static native @Deprecated int av_picture_pad(AVPicture dst, @Const AVPicture src, int height, int width, @Cast("AVPixelFormat") int pix_fmt, - int padtop, int padbottom, int padleft, int padright, IntBuffer color); -@NoException public static native @Deprecated int av_picture_pad(AVPicture dst, @Const AVPicture src, int height, int width, @Cast("AVPixelFormat") int pix_fmt, - int padtop, int padbottom, int padleft, int padright, int[] color); - -/** - * \} - */ -// #endif - /** * \defgroup lavc_misc Utility functions * \ingroup libavc @@ -3568,16 +3210,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * \{ */ -// #if FF_API_GETCHROMA -/** - * @deprecated Use av_pix_fmt_get_chroma_sub_sample - */ - -@NoException public static native @Deprecated void avcodec_get_chroma_sub_sample(@Cast("AVPixelFormat") int pix_fmt, IntPointer h_shift, IntPointer v_shift); -@NoException public static native @Deprecated void avcodec_get_chroma_sub_sample(@Cast("AVPixelFormat") int pix_fmt, IntBuffer h_shift, IntBuffer v_shift); -@NoException public static native @Deprecated void avcodec_get_chroma_sub_sample(@Cast("AVPixelFormat") int pix_fmt, int[] h_shift, int[] v_shift); -// #endif - /** * Return a value representing the fourCC code associated to the * pixel format pix_fmt, or 0 if no associated fourCC code can be @@ -3612,30 +3244,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, int[] loss_ptr); -// #if FF_API_AVCODEC_PIX_FMT -/** - * @deprecated see av_get_pix_fmt_loss() - */ -@NoException public static native @Deprecated int avcodec_get_pix_fmt_loss(@Cast("AVPixelFormat") int dst_pix_fmt, @Cast("AVPixelFormat") int src_pix_fmt, - int has_alpha); -/** - * @deprecated see av_find_best_pix_fmt_of_2() - */ -@NoException public static native @Cast("AVPixelFormat") @Deprecated int avcodec_find_best_pix_fmt_of_2(@Cast("AVPixelFormat") int dst_pix_fmt1, @Cast("AVPixelFormat") int dst_pix_fmt2, - @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, IntPointer loss_ptr); -@NoException public static native @Cast("AVPixelFormat") @Deprecated int avcodec_find_best_pix_fmt_of_2(@Cast("AVPixelFormat") int dst_pix_fmt1, @Cast("AVPixelFormat") int dst_pix_fmt2, - @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, IntBuffer loss_ptr); -@NoException public static native @Cast("AVPixelFormat") @Deprecated int avcodec_find_best_pix_fmt_of_2(@Cast("AVPixelFormat") int dst_pix_fmt1, @Cast("AVPixelFormat") int dst_pix_fmt2, - @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, int[] loss_ptr); - -@NoException public static native @Cast("AVPixelFormat") @Deprecated int avcodec_find_best_pix_fmt2(@Cast("AVPixelFormat") int dst_pix_fmt1, @Cast("AVPixelFormat") int dst_pix_fmt2, - @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, IntPointer loss_ptr); -@NoException public static native @Cast("AVPixelFormat") @Deprecated int avcodec_find_best_pix_fmt2(@Cast("AVPixelFormat") int dst_pix_fmt1, @Cast("AVPixelFormat") int dst_pix_fmt2, - @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, IntBuffer loss_ptr); -@NoException public static native @Cast("AVPixelFormat") @Deprecated int avcodec_find_best_pix_fmt2(@Cast("AVPixelFormat") int dst_pix_fmt1, @Cast("AVPixelFormat") int dst_pix_fmt2, - @Cast("AVPixelFormat") int src_pix_fmt, int has_alpha, int[] loss_ptr); -// #endif - @NoException public static native @Cast("AVPixelFormat") int avcodec_default_get_format(AVCodecContext s, @Cast("const AVPixelFormat*") IntPointer fmt); @NoException public static native @Cast("AVPixelFormat") int avcodec_default_get_format(AVCodecContext s, @Cast("const AVPixelFormat*") IntBuffer fmt); @NoException public static native @Cast("AVPixelFormat") int avcodec_default_get_format(AVCodecContext s, @Cast("const AVPixelFormat*") int[] fmt); @@ -3644,48 +3252,9 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * \} */ -// #if FF_API_TAG_STRING -/** - * Put a string representing the codec tag codec_tag in buf. - * - * @param buf buffer to place codec tag in - * @param buf_size size in bytes of buf - * @param codec_tag codec tag to assign - * @return the length of the string that would have been generated if - * enough space had been available, excluding the trailing null - * - * @deprecated see av_fourcc_make_string() and av_fourcc2str(). - */ -@NoException public static native @Cast("size_t") @Deprecated long av_get_codec_tag_string(@Cast("char*") BytePointer buf, @Cast("size_t") long buf_size, @Cast("unsigned int") int codec_tag); -@NoException public static native @Cast("size_t") @Deprecated long av_get_codec_tag_string(@Cast("char*") ByteBuffer buf, @Cast("size_t") long buf_size, @Cast("unsigned int") int codec_tag); -@NoException public static native @Cast("size_t") @Deprecated long av_get_codec_tag_string(@Cast("char*") byte[] buf, @Cast("size_t") long buf_size, @Cast("unsigned int") int codec_tag); -// #endif - @NoException public static native void avcodec_string(@Cast("char*") BytePointer buf, int buf_size, AVCodecContext enc, int encode); @NoException public static native void avcodec_string(@Cast("char*") ByteBuffer buf, int buf_size, AVCodecContext enc, int encode); @NoException public static native void avcodec_string(@Cast("char*") byte[] buf, int buf_size, AVCodecContext enc, int encode); - -/** - * Return a name for the specified profile, if available. - * - * @param codec the codec that is searched for the given profile - * @param profile the profile value for which a name is requested - * @return A name for the profile if found, NULL otherwise. - */ -@NoException public static native @Cast("const char*") BytePointer av_get_profile_name(@Const AVCodec codec, int profile); - -/** - * Return a name for the specified profile, if available. - * - * @param codec_id the ID of the codec to which the requested profile belongs - * @param profile the profile value for which a name is requested - * @return A name for the profile if found, NULL otherwise. - * - * \note unlike av_get_profile_name(), which searches a list of profiles - * supported by a specific decoder or encoder implementation, this - * function searches the list of profiles from the AVCodecDescriptor - */ -@NoException public static native @Cast("const char*") BytePointer avcodec_profile_name(@Cast("AVCodecID") int codec_id, int profile); // Targeting ../avcodec/Func_AVCodecContext_Pointer.java @@ -3737,11 +3306,8 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { * Reset the internal codec state / flush internal buffers. Should be called * e.g. when seeking or when switching to a different stream. * - * \note for decoders, when refcounted frames are not used - * (i.e. avctx->refcounted_frames is 0), this invalidates the frames previously - * returned from the decoder. When refcounted frames are used, the decoder just - * releases any references it might keep internally, but the caller's reference - * remains valid. + * \note for decoders, this function just releases any references the decoder + * might keep internally, but the caller's references remain valid. * * \note for encoders, this function will only do something if the encoder * declares support for AV_CODEC_CAP_ENCODER_FLUSH. When called, the encoder @@ -3752,32 +3318,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native void avcodec_flush_buffers(AVCodecContext avctx); -/** - * Return codec bits per sample. - * - * @param codec_id [in] the codec - * @return Number of bits per sample or zero if unknown for the given codec. - */ -@NoException public static native int av_get_bits_per_sample(@Cast("AVCodecID") int codec_id); - -/** - * Return the PCM codec associated with a sample format. - * @param be endianness, 0 for little, 1 for big, - * -1 (or anything else) for native - * @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE - */ -@NoException public static native @Cast("AVCodecID") int av_get_pcm_codec(@Cast("AVSampleFormat") int fmt, int be); - -/** - * Return codec bits per sample. - * Only return non-zero if the bits per sample is exactly correct, not an - * approximation. - * - * @param codec_id [in] the codec - * @return Number of bits per sample or zero if unknown for the given codec. - */ -@NoException public static native int av_get_exact_bits_per_sample(@Cast("AVCodecID") int codec_id); - /** * Return audio frame duration. * @@ -3788,79 +3328,6 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { */ @NoException public static native int av_get_audio_frame_duration(AVCodecContext avctx, int frame_bytes); -/** - * This function is the same as av_get_audio_frame_duration(), except it works - * with AVCodecParameters instead of an AVCodecContext. - */ -@NoException public static native int av_get_audio_frame_duration2(AVCodecParameters par, int frame_bytes); -// Targeting ../avcodec/AVBitStreamFilterContext.java - - - -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use the new bitstream filtering API (using AVBSFContext). - */ -@NoException public static native @Deprecated void av_register_bitstream_filter(AVBitStreamFilter bsf); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_get_by_name(), av_bsf_alloc(), and av_bsf_init() - * from the new bitstream filtering API (using AVBSFContext). - */ -@NoException public static native @Deprecated AVBitStreamFilterContext av_bitstream_filter_init(@Cast("const char*") BytePointer name); -@NoException public static native @Deprecated AVBitStreamFilterContext av_bitstream_filter_init(String name); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_send_packet() and av_bsf_receive_packet() from the - * new bitstream filtering API (using AVBSFContext). - */ -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, @Cast("const char*") BytePointer args, - @Cast("uint8_t**") PointerPointer poutbuf, IntPointer poutbuf_size, - @Cast("const uint8_t*") BytePointer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, @Cast("const char*") BytePointer args, - @Cast("uint8_t**") @ByPtrPtr BytePointer poutbuf, IntPointer poutbuf_size, - @Cast("const uint8_t*") BytePointer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, String args, - @Cast("uint8_t**") @ByPtrPtr ByteBuffer poutbuf, IntBuffer poutbuf_size, - @Cast("const uint8_t*") ByteBuffer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, @Cast("const char*") BytePointer args, - @Cast("uint8_t**") @ByPtrPtr byte[] poutbuf, int[] poutbuf_size, - @Cast("const uint8_t*") byte[] buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, String args, - @Cast("uint8_t**") @ByPtrPtr BytePointer poutbuf, IntPointer poutbuf_size, - @Cast("const uint8_t*") BytePointer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, @Cast("const char*") BytePointer args, - @Cast("uint8_t**") @ByPtrPtr ByteBuffer poutbuf, IntBuffer poutbuf_size, - @Cast("const uint8_t*") ByteBuffer buf, int buf_size, int keyframe); -@NoException public static native @Deprecated int av_bitstream_filter_filter(AVBitStreamFilterContext bsfc, - AVCodecContext avctx, String args, - @Cast("uint8_t**") @ByPtrPtr byte[] poutbuf, int[] poutbuf_size, - @Cast("const uint8_t*") byte[] buf, int buf_size, int keyframe); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_free() from the new bitstream filtering API (using - * AVBSFContext). - */ -@NoException public static native @Deprecated void av_bitstream_filter_close(AVBitStreamFilterContext bsf); -/** - * @deprecated the old bitstream filtering API (using AVBitStreamFilterContext) - * is deprecated. Use av_bsf_iterate() from the new bitstream filtering API (using - * AVBSFContext). - */ -@NoException public static native @Const @Deprecated AVBitStreamFilter av_bitstream_filter_next(@Const AVBitStreamFilter f); -// #endif - -// #if FF_API_NEXT -@NoException public static native @Const @Deprecated AVBitStreamFilter av_bsf_next(@Cast("void**") PointerPointer opaque); -@NoException public static native @Const @Deprecated AVBitStreamFilter av_bsf_next(@Cast("void**") @ByPtrPtr Pointer opaque); -// #endif - /* memory */ /** @@ -3882,79 +3349,12 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { @NoException public static native void av_fast_padded_mallocz(Pointer ptr, @Cast("unsigned int*") IntBuffer size, @Cast("size_t") long min_size); @NoException public static native void av_fast_padded_mallocz(Pointer ptr, @Cast("unsigned int*") int[] size, @Cast("size_t") long min_size); -/** - * Encode extradata length to a buffer. Used by xiph codecs. - * - * @param s buffer to write to; must be at least (v/255+1) bytes long - * @param v size of extradata in bytes - * @return number of bytes written to the buffer. - */ -@NoException public static native @Cast("unsigned int") int av_xiphlacing(@Cast("unsigned char*") BytePointer s, @Cast("unsigned int") int v); -@NoException public static native @Cast("unsigned int") int av_xiphlacing(@Cast("unsigned char*") ByteBuffer s, @Cast("unsigned int") int v); -@NoException public static native @Cast("unsigned int") int av_xiphlacing(@Cast("unsigned char*") byte[] s, @Cast("unsigned int") int v); - -// #if FF_API_USER_VISIBLE_AVHWACCEL -/** - * Register the hardware accelerator hwaccel. - * - * @deprecated This function doesn't do anything. - */ -@NoException public static native @Deprecated void av_register_hwaccel(AVHWAccel hwaccel); - -/** - * If hwaccel is NULL, returns the first registered hardware accelerator, - * if hwaccel is non-NULL, returns the next registered hardware accelerator - * after hwaccel, or NULL if hwaccel is the last one. - * - * @deprecated AVHWaccel structures contain no user-serviceable parts, so - * this function should not be used. - */ -@NoException public static native @Deprecated AVHWAccel av_hwaccel_next(@Const AVHWAccel hwaccel); -// #endif - -// #if FF_API_LOCKMGR -/** - * Lock operation used by lockmgr - * - * @deprecated Deprecated together with av_lockmgr_register(). - */ -/** enum AVLockOp */ -public static final int - /** Create a mutex */ - AV_LOCK_CREATE = 0, - /** Lock the mutex */ - AV_LOCK_OBTAIN = 1, - /** Unlock the mutex */ - AV_LOCK_RELEASE = 2, - /** Free mutex resources */ - AV_LOCK_DESTROY = 3; -// Targeting ../avcodec/Cb_PointerPointer_int.java - - -@NoException public static native @Deprecated int av_lockmgr_register(Cb_PointerPointer_int cb); -// Targeting ../avcodec/Cb_Pointer_int.java - - -@NoException public static native @Deprecated int av_lockmgr_register(Cb_Pointer_int cb); -// #endif - /** * @return a positive value if s is open (i.e. avcodec_open2() was called on it * with no corresponding avcodec_close()), 0 otherwise. */ @NoException public static native int avcodec_is_open(AVCodecContext s); -/** - * Allocate a CPB properties structure and initialize its fields to default - * values. - * - * @param size if non-NULL, the size of the allocated struct will be written - * here. This is useful for embedding it in side data. - * - * @return the newly allocated struct or NULL on failure - */ -@NoException public static native AVCPBProperties av_cpb_properties_alloc(@Cast("size_t*") SizeTPointer size); - /** * \} */ @@ -4142,4 +3542,75 @@ public class avcodec extends org.bytedeco.ffmpeg.presets.avcodec { // #endif /* AVCODEC_AVFFT_H */ +// Parsed from + +/* + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef AVCODEC_VERSION_H +// #define AVCODEC_VERSION_H + +/** + * \file + * \ingroup libavc + * Libavcodec version macros. + */ + +// #include "libavutil/version.h" + +public static final int LIBAVCODEC_VERSION_MAJOR = 59; +public static final int LIBAVCODEC_VERSION_MINOR = 18; +public static final int LIBAVCODEC_VERSION_MICRO = 100; + +public static native @MemberGetter int LIBAVCODEC_VERSION_INT(); +public static final int LIBAVCODEC_VERSION_INT = LIBAVCODEC_VERSION_INT(); +// #define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, +// LIBAVCODEC_VERSION_MINOR, +// LIBAVCODEC_VERSION_MICRO) +public static final int LIBAVCODEC_BUILD = LIBAVCODEC_VERSION_INT; + +public static native @MemberGetter String LIBAVCODEC_IDENT(); +public static final String LIBAVCODEC_IDENT = LIBAVCODEC_IDENT(); + +/** + * 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. + * + * \note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + */ + +public static final boolean FF_API_OPENH264_SLICE_MODE = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_OPENH264_CABAC = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_UNUSED_CODEC_CAPS = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_THREAD_SAFE_CALLBACKS = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_DEBUG_MV = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_GET_FRAME_CLASS = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_AUTO_THREADS = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_AVCTX_TIMEBASE = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_MPEGVIDEO_OPTS = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_FLAG_TRUNCATED = (LIBAVCODEC_VERSION_MAJOR < 60); +public static final boolean FF_API_SUB_TEXT_FORMAT = (LIBAVCODEC_VERSION_MAJOR < 60); + +// #endif /* AVCODEC_VERSION_H */ + + } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avdevice.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avdevice.java index 4add6f72a11..552f2c840c4 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avdevice.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avdevice.java @@ -108,7 +108,7 @@ public class avdevice extends org.bytedeco.ffmpeg.presets.avdevice { * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. */ -@NoException public static native AVInputFormat av_input_audio_device_next(AVInputFormat d); +@NoException public static native @Const AVInputFormat av_input_audio_device_next(@Const AVInputFormat d); /** * Video input devices iterator. @@ -117,7 +117,7 @@ public class avdevice extends org.bytedeco.ffmpeg.presets.avdevice { * if d is non-NULL, returns the next registered input audio/video device after d * or NULL if d is the last one. */ -@NoException public static native AVInputFormat av_input_video_device_next(AVInputFormat d); +@NoException public static native @Const AVInputFormat av_input_video_device_next(@Const AVInputFormat d); /** * Audio output devices iterator. @@ -126,7 +126,7 @@ public class avdevice extends org.bytedeco.ffmpeg.presets.avdevice { * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. */ -@NoException public static native AVOutputFormat av_output_audio_device_next(AVOutputFormat d); +@NoException public static native @Const AVOutputFormat av_output_audio_device_next(@Const AVOutputFormat d); /** * Video output devices iterator. @@ -135,7 +135,7 @@ public class avdevice extends org.bytedeco.ffmpeg.presets.avdevice { * if d is non-NULL, returns the next registered output audio/video device after d * or NULL if d is the last one. */ -@NoException public static native AVOutputFormat av_output_video_device_next(AVOutputFormat d); +@NoException public static native @Const AVOutputFormat av_output_video_device_next(@Const AVOutputFormat d); // Targeting ../avdevice/AVDeviceRect.java @@ -480,17 +480,17 @@ public class avdevice extends org.bytedeco.ffmpeg.presets.avdevice { * @return count of autodetected devices, negative on error. * \note device argument takes precedence over device_name when both are set. */ -@NoException public static native int avdevice_list_input_sources(AVInputFormat device, @Cast("const char*") BytePointer device_name, +@NoException public static native int avdevice_list_input_sources(@Const AVInputFormat device, @Cast("const char*") BytePointer device_name, AVDictionary device_options, @Cast("AVDeviceInfoList**") PointerPointer device_list); -@NoException public static native int avdevice_list_input_sources(AVInputFormat device, @Cast("const char*") BytePointer device_name, +@NoException public static native int avdevice_list_input_sources(@Const AVInputFormat device, @Cast("const char*") BytePointer device_name, AVDictionary device_options, @ByPtrPtr AVDeviceInfoList device_list); -@NoException public static native int avdevice_list_input_sources(AVInputFormat device, String device_name, +@NoException public static native int avdevice_list_input_sources(@Const AVInputFormat device, String device_name, AVDictionary device_options, @ByPtrPtr AVDeviceInfoList device_list); -@NoException public static native int avdevice_list_output_sinks(AVOutputFormat device, @Cast("const char*") BytePointer device_name, +@NoException public static native int avdevice_list_output_sinks(@Const AVOutputFormat device, @Cast("const char*") BytePointer device_name, AVDictionary device_options, @Cast("AVDeviceInfoList**") PointerPointer device_list); -@NoException public static native int avdevice_list_output_sinks(AVOutputFormat device, @Cast("const char*") BytePointer device_name, +@NoException public static native int avdevice_list_output_sinks(@Const AVOutputFormat device, @Cast("const char*") BytePointer device_name, AVDictionary device_options, @ByPtrPtr AVDeviceInfoList device_list); -@NoException public static native int avdevice_list_output_sinks(AVOutputFormat device, String device_name, +@NoException public static native int avdevice_list_output_sinks(@Const AVOutputFormat device, String device_name, AVDictionary device_options, @ByPtrPtr AVDeviceInfoList device_list); /** @@ -500,4 +500,59 @@ public class avdevice extends org.bytedeco.ffmpeg.presets.avdevice { // #endif /* AVDEVICE_AVDEVICE_H */ +// Parsed from + +/* + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef AVDEVICE_VERSION_H +// #define AVDEVICE_VERSION_H + +/** + * \file + * \ingroup lavd + * Libavdevice version macros + */ + +// #include "libavutil/version.h" + +public static final int LIBAVDEVICE_VERSION_MAJOR = 59; +public static final int LIBAVDEVICE_VERSION_MINOR = 4; +public static final int LIBAVDEVICE_VERSION_MICRO = 100; + +public static native @MemberGetter int LIBAVDEVICE_VERSION_INT(); +public static final int LIBAVDEVICE_VERSION_INT = LIBAVDEVICE_VERSION_INT(); +// #define LIBAVDEVICE_VERSION AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, +// LIBAVDEVICE_VERSION_MINOR, +// LIBAVDEVICE_VERSION_MICRO) +public static final int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT; + +public static native @MemberGetter String LIBAVDEVICE_IDENT(); +public static final String LIBAVDEVICE_IDENT = LIBAVDEVICE_IDENT(); + +/** + * 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. + */ +public static final boolean FF_API_DEVICE_CAPABILITIES = (LIBAVDEVICE_VERSION_MAJOR < 60); + +// #endif /* AVDEVICE_VERSION_H */ + + } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avfilter.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avfilter.java index 489d61353b3..a152d848bca 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avfilter.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avfilter.java @@ -99,11 +99,14 @@ public class avfilter extends org.bytedeco.ffmpeg.presets.avfilter { +// #if FF_API_PAD_COUNT /** - * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g. - * AVFilter.inputs/outputs). + * Get the number of elements in an AVFilter's inputs or outputs array. + * + * @deprecated Use avfilter_filter_pad_count() instead. */ -@NoException public static native int avfilter_pad_count(@Const AVFilterPad pads); +@NoException public static native @Deprecated int avfilter_pad_count(@Const AVFilterPad pads); +// #endif /** * Get the name of an AVFilterPad. @@ -144,6 +147,22 @@ public class avfilter extends org.bytedeco.ffmpeg.presets.avfilter { * and processing them concurrently. */ public static final int AVFILTER_FLAG_SLICE_THREADS = (1 << 2); +/** + * The filter is a "metadata" filter - it does not modify the frame data in any + * way. It may only affect the metadata (i.e. those fields copied by + * av_frame_copy_props()). + * + * More precisely, this means: + * - video: the data of any frame output by the filter must be exactly equal to + * some frame that is received on one of its inputs. Furthermore, all frames + * produced on a given output must correspond to frames received on the same + * input and their order must be unchanged. Note that the filter may still + * drop or duplicate the frames. + * - audio: the data produced by the filter on any of its outputs (viewed e.g. + * as an array of interleaved samples) must be exactly equal to the data + * received by the filter on one of its inputs. + */ +public static final int AVFILTER_FLAG_METADATA_ONLY = (1 << 3); /** * Some filters support a generic "enable" expression option that can be used * to enable or disable a filter in the timeline. Filters supporting this @@ -170,6 +189,11 @@ public class avfilter extends org.bytedeco.ffmpeg.presets.avfilter { +/** + * Get the number of elements in an AVFilter's inputs or outputs array. + */ +@NoException public static native @Cast("unsigned") int avfilter_filter_pad_count(@Const AVFilter filter, int is_output); + /** * Process multiple parts of the frame concurrently. */ @@ -205,21 +229,6 @@ public class avfilter extends org.bytedeco.ffmpeg.presets.avfilter { @NoException public static native void avfilter_link_free(@Cast("AVFilterLink**") PointerPointer link); @NoException public static native void avfilter_link_free(@ByPtrPtr AVFilterLink link); -// #if FF_API_FILTER_GET_SET -/** - * Get the number of channels of a link. - * @deprecated Use av_buffersink_get_channels() - */ -@NoException public static native @Deprecated int avfilter_link_get_channels(AVFilterLink link); -// #endif -// #if FF_API_FILTER_LINK_SET_CLOSED -/** - * Set the closed field of a link. - * @deprecated applications are not supposed to mess with links, they should - * close the sinks. - */ -@NoException public static native @Deprecated void avfilter_link_set_closed(AVFilterLink link, int closed); -// #endif /** * Negotiate the media format, dimensions, etc of all inputs to a filter. * @@ -256,30 +265,6 @@ public class avfilter extends org.bytedeco.ffmpeg.presets.avfilter { @NoException public static native @Const AVFilter av_filter_iterate(@Cast("void**") PointerPointer opaque); @NoException public static native @Const AVFilter av_filter_iterate(@Cast("void**") @ByPtrPtr Pointer opaque); -// #if FF_API_NEXT -/** Initialize the filter system. Register all builtin filters. */ -@NoException public static native @Deprecated void avfilter_register_all(); - -/** - * Register a filter. This is only needed if you plan to use - * avfilter_get_by_name later to lookup the AVFilter structure by name. A - * filter can still by instantiated with avfilter_graph_alloc_filter even if it - * is not registered. - * - * @param filter the filter to register - * @return 0 if the registration was successful, a negative value - * otherwise - */ -@NoException public static native @Deprecated int avfilter_register(AVFilter filter); - -/** - * Iterate over all registered filters. - * @return If prev is non-NULL, next registered filter after prev or NULL if - * prev is the last filter. If prev is NULL, return the first registered filter. - */ -@NoException public static native @Const @Deprecated AVFilter avfilter_next(@Const AVFilter prev); -// #endif - /** * Get a filter definition matching the given name. * @@ -994,4 +979,65 @@ public class avfilter extends org.bytedeco.ffmpeg.presets.avfilter { // #endif /* AVFILTER_BUFFERSRC_H */ +// Parsed from + +/* + * Version macros. + * + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef AVFILTER_VERSION_H +// #define AVFILTER_VERSION_H + +/** + * \file + * \ingroup lavfi + * Libavfilter version macros + */ + +// #include "libavutil/version.h" + +public static final int LIBAVFILTER_VERSION_MAJOR = 8; +public static final int LIBAVFILTER_VERSION_MINOR = 24; +public static final int LIBAVFILTER_VERSION_MICRO = 100; + + +public static native @MemberGetter int LIBAVFILTER_VERSION_INT(); +public static final int LIBAVFILTER_VERSION_INT = LIBAVFILTER_VERSION_INT(); +// #define LIBAVFILTER_VERSION AV_VERSION(LIBAVFILTER_VERSION_MAJOR, +// LIBAVFILTER_VERSION_MINOR, +// LIBAVFILTER_VERSION_MICRO) +public static final int LIBAVFILTER_BUILD = LIBAVFILTER_VERSION_INT; + +public static native @MemberGetter String LIBAVFILTER_IDENT(); +public static final String LIBAVFILTER_IDENT = LIBAVFILTER_IDENT(); + +/** + * 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. + */ + +public static final boolean FF_API_SWS_PARAM_OPTION = (LIBAVFILTER_VERSION_MAJOR < 9); +public static final boolean FF_API_BUFFERSINK_ALLOC = (LIBAVFILTER_VERSION_MAJOR < 9); +public static final boolean FF_API_PAD_COUNT = (LIBAVFILTER_VERSION_MAJOR < 9); + +// #endif /* AVFILTER_VERSION_H */ + + } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avformat.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avformat.java index aca3ae21007..31227c8de98 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avformat.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avformat.java @@ -163,27 +163,6 @@ public class avformat extends org.bytedeco.ffmpeg.presets.avformat { @NoException public static native int avio_check(@Cast("const char*") BytePointer url, int flags); @NoException public static native int avio_check(String url, int flags); -/** - * Move or rename a resource. - * - * \note url_src and url_dst should share the same protocol and authority. - * - * @param url_src url to resource to be moved - * @param url_dst new url to resource if the operation succeeded - * @return >=0 on success or negative on error. - */ -@NoException public static native int avpriv_io_move(@Cast("const char*") BytePointer url_src, @Cast("const char*") BytePointer url_dst); -@NoException public static native int avpriv_io_move(String url_src, String url_dst); - -/** - * Delete a resource. - * - * @param url resource to be deleted. - * @return >=0 on success or negative on error. - */ -@NoException public static native int avpriv_io_delete(@Cast("const char*") BytePointer url); -@NoException public static native int avpriv_io_delete(String url); - /** * Open directory for reading. * @@ -1046,7 +1025,12 @@ public class avformat extends org.bytedeco.ffmpeg.presets.avformat { // #include // #include /* FILE */ -// #include "libavcodec/avcodec.h" + +// #include "libavcodec/codec.h" +// #include "libavcodec/codec_par.h" +// #include "libavcodec/defs.h" +// #include "libavcodec/packet.h" + // #include "libavutil/dict.h" // #include "libavutil/log.h" @@ -1187,6 +1171,13 @@ public class avformat extends org.bytedeco.ffmpeg.presets.avformat { public static final int AVFMT_NOFILE = 0x0001; /** Needs '%d' in filename. */ public static final int AVFMT_NEEDNUMBER = 0x0002; +/** + * The muxer/demuxer is experimental and should be used with caution. + * + * - demuxers: will not be selected automatically by probing, must be specified + * explicitly. + */ +public static final int AVFMT_EXPERIMENTAL = 0x0004; /** Show format stream IDs numbers. */ public static final int AVFMT_SHOW_IDS = 0x0008; /** Format wants global header. */ @@ -1256,25 +1247,56 @@ public class avformat extends org.bytedeco.ffmpeg.presets.avformat { -public static final int AV_DISPOSITION_DEFAULT = 0x0001; -public static final int AV_DISPOSITION_DUB = 0x0002; -public static final int AV_DISPOSITION_ORIGINAL = 0x0004; -public static final int AV_DISPOSITION_COMMENT = 0x0008; -public static final int AV_DISPOSITION_LYRICS = 0x0010; -public static final int AV_DISPOSITION_KARAOKE = 0x0020; +/** + * The stream should be chosen by default among other streams of the same type, + * unless the user has explicitly specified otherwise. + */ +public static final int AV_DISPOSITION_DEFAULT = (1 << 0); +/** + * The stream is not in original language. + * + * \note AV_DISPOSITION_ORIGINAL is the inverse of this disposition. At most + * one of them should be set in properly tagged streams. + * \note This disposition may apply to any stream type, not just audio. + */ +public static final int AV_DISPOSITION_DUB = (1 << 1); +/** + * The stream is in original language. + * + * @see the notes for AV_DISPOSITION_DUB + */ +public static final int AV_DISPOSITION_ORIGINAL = (1 << 2); +/** + * The stream is a commentary track. + */ +public static final int AV_DISPOSITION_COMMENT = (1 << 3); +/** + * The stream contains song lyrics. + */ +public static final int AV_DISPOSITION_LYRICS = (1 << 4); +/** + * The stream contains karaoke audio. + */ +public static final int AV_DISPOSITION_KARAOKE = (1 << 5); /** * Track should be used during playback by default. * Useful for subtitle track that should be displayed * even when user did not explicitly ask for subtitles. */ -public static final int AV_DISPOSITION_FORCED = 0x0040; -/** stream for hearing impaired audiences */ -public static final int AV_DISPOSITION_HEARING_IMPAIRED = 0x0080; -/** stream for visual impaired audiences */ -public static final int AV_DISPOSITION_VISUAL_IMPAIRED = 0x0100; -/** stream without voice */ -public static final int AV_DISPOSITION_CLEAN_EFFECTS = 0x0200; +public static final int AV_DISPOSITION_FORCED = (1 << 6); +/** + * The stream is intended for hearing impaired audiences. + */ +public static final int AV_DISPOSITION_HEARING_IMPAIRED = (1 << 7); +/** + * The stream is intended for visually impaired audiences. + */ +public static final int AV_DISPOSITION_VISUAL_IMPAIRED = (1 << 8); +/** + * The audio stream contains music and sound effects without voice. + */ +public static final int AV_DISPOSITION_CLEAN_EFFECTS = (1 << 9); /** * The stream is stored in the file as an attached picture/"cover art" (e.g. * APIC frame in ID3v2). The first (usually only) packet associated with it @@ -1282,26 +1304,54 @@ public class avformat extends org.bytedeco.ffmpeg.presets.avformat { * seeking takes place. It can also be accessed at any time in * AVStream.attached_pic. */ -public static final int AV_DISPOSITION_ATTACHED_PIC = 0x0400; +public static final int AV_DISPOSITION_ATTACHED_PIC = (1 << 10); /** * The stream is sparse, and contains thumbnail images, often corresponding * to chapter markers. Only ever used with AV_DISPOSITION_ATTACHED_PIC. */ -public static final int AV_DISPOSITION_TIMED_THUMBNAILS = 0x0800; -// Targeting ../avformat/AVStreamInternal.java +public static final int AV_DISPOSITION_TIMED_THUMBNAILS = (1 << 11); +/** + * The subtitle stream contains captions, providing a transcription and possibly + * a translation of audio. Typically intended for hearing-impaired audiences. + */ +public static final int AV_DISPOSITION_CAPTIONS = (1 << 16); +/** + * The subtitle stream contains a textual description of the video content. + * Typically intended for visually-impaired audiences or for the cases where the + * video cannot be seen. + */ +public static final int AV_DISPOSITION_DESCRIPTIONS = (1 << 17); +/** + * The subtitle stream contains time-aligned metadata that is not intended to be + * directly presented to the user. + */ +public static final int AV_DISPOSITION_METADATA = (1 << 18); +/** + * The audio stream is intended to be mixed with another stream before + * presentation. + * Corresponds to mix_type=0 in mpegts. + */ +public static final int AV_DISPOSITION_DEPENDENT = (1 << 19); +/** + * The video stream contains still images. + */ +public static final int AV_DISPOSITION_STILL_IMAGE = (1 << 20); +/** + * @return The AV_DISPOSITION_* flag corresponding to disp or a negative error + * code if disp does not correspond to a known stream disposition. + */ +@NoException public static native int av_disposition_from_string(@Cast("const char*") BytePointer disp); +@NoException public static native int av_disposition_from_string(String disp); /** - * To specify text track kind (different from subtitles default). + * @param disposition a combination of AV_DISPOSITION_* values + * @return The string description corresponding to the lowest set bit in + * disposition. NULL when the lowest set bit does not correspond + * to a known disposition or when disposition is 0. */ -public static final int AV_DISPOSITION_CAPTIONS = 0x10000; -public static final int AV_DISPOSITION_DESCRIPTIONS = 0x20000; -public static final int AV_DISPOSITION_METADATA = 0x40000; -/** dependent audio stream (mix_type=0 in mpegts) */ -public static final int AV_DISPOSITION_DEPENDENT = 0x80000; -/** still images in video stream (still_picture_flag=1 in mpegts) */ -public static final int AV_DISPOSITION_STILL_IMAGE = 0x100000; +@NoException public static native @Cast("const char*") BytePointer av_disposition_to_string(int disposition); /** * Options for behavior on timestamp wrap detection. @@ -1316,21 +1366,6 @@ public class avformat extends org.bytedeco.ffmpeg.presets.avformat { -// #if FF_API_FORMAT_GET_SET -/** - * Accessors for some AVStream fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -@NoException public static native @Deprecated @ByVal AVRational av_stream_get_r_frame_rate(@Const AVStream s); -@NoException public static native @Deprecated void av_stream_set_r_frame_rate(AVStream s, @ByVal AVRational r); -// #if FF_API_LAVF_FFSERVER -@NoException public static native @Cast("char*") @Deprecated BytePointer av_stream_get_recommended_encoder_configuration(@Const AVStream s); -@NoException public static native @Deprecated void av_stream_set_recommended_encoder_configuration(AVStream s, @Cast("char*") BytePointer configuration); -@NoException public static native @Deprecated void av_stream_set_recommended_encoder_configuration(AVStream s, @Cast("char*") ByteBuffer configuration); -@NoException public static native @Deprecated void av_stream_set_recommended_encoder_configuration(AVStream s, @Cast("char*") byte[] configuration); -// #endif -// #endif - @NoException public static native AVCodecParserContext av_stream_get_parser(@Const AVStream s); /** @@ -1376,39 +1411,10 @@ network protocols (e.g. HLS), this can AVFMT_DURATION_FROM_STREAM = 1, /** Duration estimated from bitrate (less accurate) */ AVFMT_DURATION_FROM_BITRATE = 2; -// Targeting ../avformat/AVFormatInternal.java - - // Targeting ../avformat/AVFormatContext.java -// #if FF_API_FORMAT_GET_SET -/** - * Accessors for some AVFormatContext fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -@NoException public static native @Deprecated int av_format_get_probe_score(@Const AVFormatContext s); -@NoException public static native @Deprecated AVCodec av_format_get_video_codec(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_video_codec(AVFormatContext s, AVCodec c); -@NoException public static native @Deprecated AVCodec av_format_get_audio_codec(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_audio_codec(AVFormatContext s, AVCodec c); -@NoException public static native @Deprecated AVCodec av_format_get_subtitle_codec(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_subtitle_codec(AVFormatContext s, AVCodec c); -@NoException public static native @Deprecated AVCodec av_format_get_data_codec(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_data_codec(AVFormatContext s, AVCodec c); -@NoException public static native @Deprecated int av_format_get_metadata_header_padding(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_metadata_header_padding(AVFormatContext s, int c); -@NoException public static native @Deprecated Pointer av_format_get_opaque(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_opaque(AVFormatContext s, Pointer opaque); -@NoException public static native @Deprecated av_format_control_message av_format_get_control_message_cb(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_control_message_cb(AVFormatContext s, av_format_control_message callback); -// #if FF_API_OLD_OPEN_CALLBACKS -@NoException public static native @Deprecated AVOpenCallback av_format_get_open_cb(@Const AVFormatContext s); -@NoException public static native @Deprecated void av_format_set_open_cb(AVFormatContext s, AVOpenCallback callback); -// #endif -// #endif - /** * This function will cause global side data to be injected in the next packet * of each stream as well as after any subsequent seek. @@ -1446,21 +1452,6 @@ network protocols (e.g. HLS), this can */ @NoException public static native @Cast("const char*") BytePointer avformat_license(); -// #if FF_API_NEXT -/** - * Initialize libavformat and register all the muxers, demuxers and - * protocols. If you do not call this function, then you can select - * exactly which formats you want to support. - * - * @see av_register_input_format() - * @see av_register_output_format() - */ -@NoException public static native @Deprecated void av_register_all(); - -@NoException public static native @Deprecated void av_register_input_format(AVInputFormat format); -@NoException public static native @Deprecated void av_register_output_format(AVOutputFormat format); -// #endif - /** * Do global initialization of network libraries. This is optional, * and not recommended anymore. @@ -1483,22 +1474,6 @@ network protocols (e.g. HLS), this can */ @NoException public static native int avformat_network_deinit(); -// #if FF_API_NEXT -/** - * If f is NULL, returns the first registered input format, - * if f is non-NULL, returns the next registered input format after f - * or NULL if f is the last one. - */ -@NoException public static native @Deprecated AVInputFormat av_iformat_next(@Const AVInputFormat f); - -/** - * If f is NULL, returns the first registered output format, - * if f is non-NULL, returns the next registered output format after f - * or NULL if f is the last one. - */ -@NoException public static native @Deprecated AVOutputFormat av_oformat_next(@Const AVOutputFormat f); -// #endif - /** * Iterate over all registered muxers. * @@ -1544,6 +1519,14 @@ network protocols (e.g. HLS), this can */ @NoException public static native @Const AVClass avformat_get_class(); +/** + * Get the AVClass for AVStream. It can be used in combination with + * AV_OPT_SEARCH_FAKE_OBJ for examining options. + * + * @see av_opt_find(). + */ +@NoException public static native @Const AVClass av_stream_get_class(); + /** * Add a new stream to a media file. * @@ -1553,13 +1536,11 @@ network protocols (e.g. HLS), this can * * When muxing, should be called by the user before avformat_write_header(). * - * User is required to call avcodec_close() and avformat_free_context() to - * clean up the allocation by avformat_new_stream(). + * User is required to call avformat_free_context() to clean up the allocation + * by avformat_new_stream(). * * @param s media file handle - * @param c If non-NULL, the AVCodecContext corresponding to the new stream - * will be initialized to use this codec. This is needed for e.g. codec-specific - * defaults to be set, so codec should be provided if it is known. + * @param c unused, does nothing * * @return newly created stream or NULL on error. */ @@ -1593,9 +1574,7 @@ network protocols (e.g. HLS), this can * @return pointer to fresh allocated data or NULL otherwise */ @NoException public static native @Cast("uint8_t*") BytePointer av_stream_new_side_data(AVStream stream, - @Cast("AVPacketSideDataType") int type, int size); -// #else -// #endif + @Cast("AVPacketSideDataType") int type, @Cast("size_t") long size); /** * Get side information from stream. * @@ -1606,13 +1585,7 @@ network protocols (e.g. HLS), this can * @return pointer to data if present or NULL otherwise */ @NoException public static native @Cast("uint8_t*") BytePointer av_stream_get_side_data(@Const AVStream stream, - @Cast("AVPacketSideDataType") int type, IntPointer size); -@NoException public static native @Cast("uint8_t*") ByteBuffer av_stream_get_side_data(@Const AVStream stream, - @Cast("AVPacketSideDataType") int type, IntBuffer size); -@NoException public static native @Cast("uint8_t*") byte[] av_stream_get_side_data(@Const AVStream stream, - @Cast("AVPacketSideDataType") int type, int[] size); -// #else -// #endif + @Cast("AVPacketSideDataType") int type, @Cast("size_t*") SizeTPointer size); @NoException public static native AVProgram av_new_program(AVFormatContext s, int id); @@ -1637,11 +1610,11 @@ network protocols (e.g. HLS), this can * @return >= 0 in case of success, a negative AVERROR code in case of * failure */ -@NoException public static native int avformat_alloc_output_context2(@Cast("AVFormatContext**") PointerPointer ctx, AVOutputFormat oformat, +@NoException public static native int avformat_alloc_output_context2(@Cast("AVFormatContext**") PointerPointer ctx, @Const AVOutputFormat oformat, @Cast("const char*") BytePointer format_name, @Cast("const char*") BytePointer filename); -@NoException public static native int avformat_alloc_output_context2(@ByPtrPtr AVFormatContext ctx, AVOutputFormat oformat, +@NoException public static native int avformat_alloc_output_context2(@ByPtrPtr AVFormatContext ctx, @Const AVOutputFormat oformat, @Cast("const char*") BytePointer format_name, @Cast("const char*") BytePointer filename); -@NoException public static native int avformat_alloc_output_context2(@ByPtrPtr AVFormatContext ctx, AVOutputFormat oformat, +@NoException public static native int avformat_alloc_output_context2(@ByPtrPtr AVFormatContext ctx, @Const AVOutputFormat oformat, String format_name, String filename); /** @@ -1652,8 +1625,8 @@ network protocols (e.g. HLS), this can /** * Find AVInputFormat based on the short name of the input format. */ -@NoException public static native AVInputFormat av_find_input_format(@Cast("const char*") BytePointer short_name); -@NoException public static native AVInputFormat av_find_input_format(String short_name); +@NoException public static native @Const AVInputFormat av_find_input_format(@Cast("const char*") BytePointer short_name); +@NoException public static native @Const AVInputFormat av_find_input_format(String short_name); /** * Guess the file format. @@ -1662,7 +1635,7 @@ network protocols (e.g. HLS), this can * @param is_opened Whether the file is already opened; determines whether * demuxers with or without AVFMT_NOFILE are probed. */ -@NoException public static native AVInputFormat av_probe_input_format(AVProbeData pd, int is_opened); +@NoException public static native @Const AVInputFormat av_probe_input_format(@Const AVProbeData pd, int is_opened); /** * Guess the file format. @@ -1676,9 +1649,12 @@ network protocols (e.g. HLS), this can * If the score is <= AVPROBE_SCORE_MAX / 4 it is recommended * to retry with a larger probe buffer. */ -@NoException public static native AVInputFormat av_probe_input_format2(AVProbeData pd, int is_opened, IntPointer score_max); -@NoException public static native AVInputFormat av_probe_input_format2(AVProbeData pd, int is_opened, IntBuffer score_max); -@NoException public static native AVInputFormat av_probe_input_format2(AVProbeData pd, int is_opened, int[] score_max); +@NoException public static native @Const AVInputFormat av_probe_input_format2(@Const AVProbeData pd, + int is_opened, IntPointer score_max); +@NoException public static native @Const AVInputFormat av_probe_input_format2(@Const AVProbeData pd, + int is_opened, IntBuffer score_max); +@NoException public static native @Const AVInputFormat av_probe_input_format2(@Const AVProbeData pd, + int is_opened, int[] score_max); /** * Guess the file format. @@ -1687,9 +1663,12 @@ network protocols (e.g. HLS), this can * demuxers with or without AVFMT_NOFILE are probed. * @param score_ret The score of the best detection. */ -@NoException public static native AVInputFormat av_probe_input_format3(AVProbeData pd, int is_opened, IntPointer score_ret); -@NoException public static native AVInputFormat av_probe_input_format3(AVProbeData pd, int is_opened, IntBuffer score_ret); -@NoException public static native AVInputFormat av_probe_input_format3(AVProbeData pd, int is_opened, int[] score_ret); +@NoException public static native @Const AVInputFormat av_probe_input_format3(@Const AVProbeData pd, + int is_opened, IntPointer score_ret); +@NoException public static native @Const AVInputFormat av_probe_input_format3(@Const AVProbeData pd, + int is_opened, IntBuffer score_ret); +@NoException public static native @Const AVInputFormat av_probe_input_format3(@Const AVProbeData pd, + int is_opened, int[] score_ret); /** * Probe a bytestream to determine the input format. Each time a probe returns @@ -1707,26 +1686,26 @@ network protocols (e.g. HLS), this can * the maximal score is AVPROBE_SCORE_MAX * AVERROR code otherwise */ -@NoException public static native int av_probe_input_buffer2(AVIOContext pb, @Cast("AVInputFormat**") PointerPointer fmt, +@NoException public static native int av_probe_input_buffer2(AVIOContext pb, @Cast("const AVInputFormat**") PointerPointer fmt, @Cast("const char*") BytePointer url, Pointer logctx, @Cast("unsigned int") int offset, @Cast("unsigned int") int max_probe_size); -@NoException public static native int av_probe_input_buffer2(AVIOContext pb, @ByPtrPtr AVInputFormat fmt, +@NoException public static native int av_probe_input_buffer2(AVIOContext pb, @Const @ByPtrPtr AVInputFormat fmt, @Cast("const char*") BytePointer url, Pointer logctx, @Cast("unsigned int") int offset, @Cast("unsigned int") int max_probe_size); -@NoException public static native int av_probe_input_buffer2(AVIOContext pb, @ByPtrPtr AVInputFormat fmt, +@NoException public static native int av_probe_input_buffer2(AVIOContext pb, @Const @ByPtrPtr AVInputFormat fmt, String url, Pointer logctx, @Cast("unsigned int") int offset, @Cast("unsigned int") int max_probe_size); /** * Like av_probe_input_buffer2() but returns 0 on success */ -@NoException public static native int av_probe_input_buffer(AVIOContext pb, @Cast("AVInputFormat**") PointerPointer fmt, +@NoException public static native int av_probe_input_buffer(AVIOContext pb, @Cast("const AVInputFormat**") PointerPointer fmt, @Cast("const char*") BytePointer url, Pointer logctx, @Cast("unsigned int") int offset, @Cast("unsigned int") int max_probe_size); -@NoException public static native int av_probe_input_buffer(AVIOContext pb, @ByPtrPtr AVInputFormat fmt, +@NoException public static native int av_probe_input_buffer(AVIOContext pb, @Const @ByPtrPtr AVInputFormat fmt, @Cast("const char*") BytePointer url, Pointer logctx, @Cast("unsigned int") int offset, @Cast("unsigned int") int max_probe_size); -@NoException public static native int av_probe_input_buffer(AVIOContext pb, @ByPtrPtr AVInputFormat fmt, +@NoException public static native int av_probe_input_buffer(AVIOContext pb, @Const @ByPtrPtr AVInputFormat fmt, String url, Pointer logctx, @Cast("unsigned int") int offset, @Cast("unsigned int") int max_probe_size); @@ -1749,16 +1728,12 @@ network protocols (e.g. HLS), this can * * \note If you want to use custom IO, preallocate the format context and set its pb field. */ -@NoException public static native int avformat_open_input(@Cast("AVFormatContext**") PointerPointer ps, @Cast("const char*") BytePointer url, AVInputFormat fmt, @Cast("AVDictionary**") PointerPointer options); -@NoException public static native int avformat_open_input(@ByPtrPtr AVFormatContext ps, @Cast("const char*") BytePointer url, AVInputFormat fmt, @ByPtrPtr AVDictionary options); -@NoException public static native int avformat_open_input(@ByPtrPtr AVFormatContext ps, String url, AVInputFormat fmt, @ByPtrPtr AVDictionary options); - -// #if FF_API_DEMUXER_OPEN -/** - * @deprecated Use an AVDictionary to pass options to a demuxer. - */ -@NoException public static native @Deprecated int av_demuxer_open(AVFormatContext ic); -// #endif +@NoException public static native int avformat_open_input(@Cast("AVFormatContext**") PointerPointer ps, @Cast("const char*") BytePointer url, + @Const AVInputFormat fmt, @Cast("AVDictionary**") PointerPointer options); +@NoException public static native int avformat_open_input(@ByPtrPtr AVFormatContext ps, @Cast("const char*") BytePointer url, + @Const AVInputFormat fmt, @ByPtrPtr AVDictionary options); +@NoException public static native int avformat_open_input(@ByPtrPtr AVFormatContext ps, String url, + @Const AVInputFormat fmt, @ByPtrPtr AVDictionary options); /** * Read packets of a media file to get stream information. This @@ -1826,13 +1801,13 @@ network protocols (e.g. HLS), this can @Cast("AVMediaType") int type, int wanted_stream_nb, int related_stream, - @Cast("AVCodec**") PointerPointer decoder_ret, + @Cast("const AVCodec**") PointerPointer decoder_ret, int flags); @NoException public static native int av_find_best_stream(AVFormatContext ic, @Cast("AVMediaType") int type, int wanted_stream_nb, int related_stream, - @ByPtrPtr AVCodec decoder_ret, + @Const @ByPtrPtr AVCodec decoder_ret, int flags); /** @@ -2053,7 +2028,7 @@ network protocols (e.g. HLS), this can * Write a packet to an output media file ensuring correct interleaving. * * This function will buffer the packets internally as needed to make sure the - * packets in the output file are properly interleaved in the order of + * packets in the output file are properly interleaved, usually ordered by * increasing dts. Callers doing their own interleaving should call * av_write_frame() instead of this function. * @@ -2066,10 +2041,10 @@ network protocols (e.g. HLS), this can *
* If the packet is reference-counted, this function will take * ownership of this reference and unreference it later when it sees - * fit. - * The caller must not access the data through this reference after - * this function returns. If the packet is not reference-counted, - * libavformat will make a copy. + * fit. If the packet is not reference-counted, libavformat will + * make a copy. + * The returned packet will be blank (as if returned from + * av_packet_alloc()), even on error. *
* This parameter can be NULL (at any time, not just at the end), to * flush the interleaving queues. @@ -2085,10 +2060,9 @@ network protocols (e.g. HLS), this can * The dts for subsequent packets in one stream must be strictly * increasing (unless the output format is flagged with the * AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing). - * \ref AVPacket.duration "duration") should also be set if known. + * \ref AVPacket.duration "duration" should also be set if known. * - * @return 0 on success, a negative AVERROR on error. Libavformat will always - * take care of freeing the packet, even if this function fails. + * @return 0 on success, a negative AVERROR on error. * * @see av_write_frame(), AVFormatContext.max_interleave_delta */ @@ -2155,22 +2129,22 @@ network protocols (e.g. HLS), this can * @param mime_type if non-NULL checks if mime_type matches with the * MIME type of the registered formats */ -@NoException public static native AVOutputFormat av_guess_format(@Cast("const char*") BytePointer short_name, - @Cast("const char*") BytePointer filename, - @Cast("const char*") BytePointer mime_type); -@NoException public static native AVOutputFormat av_guess_format(String short_name, - String filename, - String mime_type); +@NoException public static native @Const AVOutputFormat av_guess_format(@Cast("const char*") BytePointer short_name, + @Cast("const char*") BytePointer filename, + @Cast("const char*") BytePointer mime_type); +@NoException public static native @Const AVOutputFormat av_guess_format(String short_name, + String filename, + String mime_type); /** * Guess the codec ID based upon muxer and filename. */ -@NoException public static native @Cast("AVCodecID") int av_guess_codec(AVOutputFormat fmt, @Cast("const char*") BytePointer short_name, - @Cast("const char*") BytePointer filename, @Cast("const char*") BytePointer mime_type, - @Cast("AVMediaType") int type); -@NoException public static native @Cast("AVCodecID") int av_guess_codec(AVOutputFormat fmt, String short_name, - String filename, String mime_type, - @Cast("AVMediaType") int type); +@NoException public static native @Cast("AVCodecID") int av_guess_codec(@Const AVOutputFormat fmt, @Cast("const char*") BytePointer short_name, + @Cast("const char*") BytePointer filename, @Cast("const char*") BytePointer mime_type, + @Cast("AVMediaType") int type); +@NoException public static native @Cast("AVCodecID") int av_guess_codec(@Const AVOutputFormat fmt, String short_name, + String filename, String mime_type, + @Cast("AVMediaType") int type); /** * Get timing information for the data currently output. @@ -2318,6 +2292,45 @@ network protocols (e.g. HLS), this can */ @NoException public static native int av_index_search_timestamp(AVStream st, @Cast("int64_t") long timestamp, int flags); +/** + * Get the index entry count for the given AVStream. + * + * @param st stream + * @return the number of index entries in the stream + */ +@NoException public static native int avformat_index_get_entries_count(@Const AVStream st); + +/** + * Get the AVIndexEntry corresponding to the given index. + * + * @param st Stream containing the requested AVIndexEntry. + * @param idx The desired index. + * @return A pointer to the requested AVIndexEntry if it exists, NULL otherwise. + * + * \note The pointer returned by this function is only guaranteed to be valid + * until any function that takes the stream or the parent AVFormatContext + * as input argument is called. + */ +@NoException public static native @Const AVIndexEntry avformat_index_get_entry(AVStream st, int idx); + +/** + * Get the AVIndexEntry corresponding to the given timestamp. + * + * @param st Stream containing the requested AVIndexEntry. + * @param timestamp Timestamp to retrieve the index entry for. + * @param flags If AVSEEK_FLAG_BACKWARD then the returned entry will correspond + * to the timestamp which is <= the requested one, if backward + * is 0, then it will be >= + * if AVSEEK_FLAG_ANY seek to any frame, only keyframes otherwise. + * @return A pointer to the requested AVIndexEntry if it exists, NULL otherwise. + * + * \note The pointer returned by this function is only guaranteed to be valid + * until any function that takes the stream or the parent AVFormatContext + * as input argument is called. + */ +@NoException public static native @Const AVIndexEntry avformat_index_get_entry_from_timestamp(AVStream st, + @Cast("int64_t") long wanted_timestamp, + int flags); /** * Add an index entry into a sorted list. Update the entry if the list * already contains it. @@ -2583,22 +2596,6 @@ network protocols (e.g. HLS), this can @NoException public static native int avformat_queue_attached_pictures(AVFormatContext s); -// #if FF_API_OLD_BSF -/** - * Apply a list of bitstream filters to a packet. - * - * @param codec AVCodecContext, usually from an AVStream - * @param pkt the packet to apply filters to. If, on success, the returned - * packet has size == 0 and side_data_elems == 0, it indicates that - * the packet should be dropped - * @param bsfc a NULL-terminated list of filters to apply - * @return >=0 on success; - * AVERROR code on failure - */ -@NoException public static native @Deprecated int av_apply_bitstream_filters(AVCodecContext codec, AVPacket pkt, - AVBitStreamFilterContext bsfc); -// #endif - /** enum AVTimebaseSource */ public static final int AVFMT_TBCF_AUTO = -1, @@ -2636,4 +2633,75 @@ network protocols (e.g. HLS), this can // #endif /* AVFORMAT_AVFORMAT_H */ +// Parsed from + +/* + * Version macros. + * + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef AVFORMAT_VERSION_H +// #define AVFORMAT_VERSION_H + +/** + * \file + * \ingroup libavf + * Libavformat version macros + */ + +// #include "libavutil/version.h" + +// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) +// Also please add any ticket numbers that you believe might be affected here +public static final int LIBAVFORMAT_VERSION_MAJOR = 59; +public static final int LIBAVFORMAT_VERSION_MINOR = 16; +public static final int LIBAVFORMAT_VERSION_MICRO = 100; + +public static native @MemberGetter int LIBAVFORMAT_VERSION_INT(); +public static final int LIBAVFORMAT_VERSION_INT = LIBAVFORMAT_VERSION_INT(); +// #define LIBAVFORMAT_VERSION AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, +// LIBAVFORMAT_VERSION_MINOR, +// LIBAVFORMAT_VERSION_MICRO) +public static final int LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT; + +public static native @MemberGetter String LIBAVFORMAT_IDENT(); +public static final String LIBAVFORMAT_IDENT = LIBAVFORMAT_IDENT(); + +/** + * 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. + * + * \note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + * + */ +public static final boolean FF_API_LAVF_PRIV_OPT = (LIBAVFORMAT_VERSION_MAJOR < 60); +public static final boolean FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 60); +public static final boolean FF_API_AVIOCONTEXT_WRITTEN = (LIBAVFORMAT_VERSION_MAJOR < 60); +public static final boolean FF_HLS_TS_OPTIONS = (LIBAVFORMAT_VERSION_MAJOR < 60); +public static final boolean FF_API_AVSTREAM_CLASS = (LIBAVFORMAT_VERSION_MAJOR > 59); +public static final boolean FF_HTTP_CACHE_REDIRECT_DEFAULT = (LIBAVFORMAT_VERSION_MAJOR < 60); + + +public static final int FF_API_R_FRAME_RATE = 1; +// #endif /* AVFORMAT_VERSION_H */ + + } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avutil.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avutil.java index e70c82337a7..28cb554bdf7 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avutil.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/avutil.java @@ -426,6 +426,8 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // #include // #include +// #include "macros.h" + /** * \addtogroup lavu_error * @@ -606,7 +608,6 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // #include // #include "attributes.h" -// #include "error.h" // #include "avutil.h" // #include "version.h" @@ -813,14 +814,14 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * @see av_mallocz() * @see av_malloc_array() */ -@NoException public static native Pointer av_mallocz_array(@Cast("size_t") long nmemb, @Cast("size_t") long size); +@NoException public static native Pointer av_calloc(@Cast("size_t") long nmemb, @Cast("size_t") long size); +// #if FF_API_AV_MALLOCZ_ARRAY /** - * Non-inlined equivalent of av_mallocz_array(). - * - * Created for symmetry with the calloc() C function. + * @deprecated use av_calloc() */ -@NoException public static native Pointer av_calloc(@Cast("size_t") long nmemb, @Cast("size_t") long size); +@NoException public static native @Deprecated Pointer av_mallocz_array(@Cast("size_t") long nmemb, @Cast("size_t") long size); +// #endif /** * Allocate, reallocate, or free a block of memory. @@ -1819,7 +1820,6 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // #include // #include "avutil.h" // #include "attributes.h" -// #include "version.h" /** enum AVClassCategory */ public static final int @@ -2153,8 +2153,6 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // #include // #include - -// #include "version.h" // Targeting ../avutil/AVBuffer.java @@ -2167,19 +2165,13 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * * @return an AVBufferRef of given size or NULL when out of memory */ -// #if FF_API_BUFFER_SIZE_T -@NoException public static native AVBufferRef av_buffer_alloc(int size); -// #else -// #endif +@NoException public static native AVBufferRef av_buffer_alloc(@Cast("size_t") long size); /** * Same as av_buffer_alloc(), except the returned buffer will be initialized * to zero. */ -// #if FF_API_BUFFER_SIZE_T -@NoException public static native AVBufferRef av_buffer_allocz(int size); -// #else -// #endif +@NoException public static native AVBufferRef av_buffer_allocz(@Cast("size_t") long size); /** * Always treat the buffer as read-only, even when it has only one @@ -2189,19 +2181,19 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // Targeting ../avutil/Free_Pointer_BytePointer.java -@NoException public static native AVBufferRef av_buffer_create(@Cast("uint8_t*") BytePointer data, int size, +@NoException public static native AVBufferRef av_buffer_create(@Cast("uint8_t*") BytePointer data, @Cast("size_t") long size, Free_Pointer_BytePointer _free, Pointer opaque, int flags); // Targeting ../avutil/Free_Pointer_ByteBuffer.java -@NoException public static native AVBufferRef av_buffer_create(@Cast("uint8_t*") ByteBuffer data, int size, +@NoException public static native AVBufferRef av_buffer_create(@Cast("uint8_t*") ByteBuffer data, @Cast("size_t") long size, Free_Pointer_ByteBuffer _free, Pointer opaque, int flags); // Targeting ../avutil/Free_Pointer_byte__.java -@NoException public static native AVBufferRef av_buffer_create(@Cast("uint8_t*") byte[] data, int size, +@NoException public static native AVBufferRef av_buffer_create(@Cast("uint8_t*") byte[] data, @Cast("size_t") long size, Free_Pointer_byte__ _free, Pointer opaque, int flags); @@ -2220,7 +2212,7 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * @return a new AVBufferRef referring to the same AVBuffer as buf or NULL on * failure. */ -@NoException public static native AVBufferRef av_buffer_ref(AVBufferRef buf); +@NoException public static native AVBufferRef av_buffer_ref(@Const AVBufferRef buf); /** * Free a given reference and automatically free the buffer if there are no more @@ -2273,11 +2265,8 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * reference to it (i.e. the one passed to this function). In all other cases * a new buffer is allocated and the data is copied. */ -// #if FF_API_BUFFER_SIZE_T -@NoException public static native int av_buffer_realloc(@Cast("AVBufferRef**") PointerPointer buf, int size); -@NoException public static native int av_buffer_realloc(@ByPtrPtr AVBufferRef buf, int size); -// #else -// #endif +@NoException public static native int av_buffer_realloc(@Cast("AVBufferRef**") PointerPointer buf, @Cast("size_t") long size); +@NoException public static native int av_buffer_realloc(@ByPtrPtr AVBufferRef buf, @Cast("size_t") long size); /** * Ensure dst refers to the same data as src. @@ -2293,23 +2282,23 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * @return 0 on success * AVERROR(ENOMEM) on memory allocation failure. */ -@NoException public static native int av_buffer_replace(@Cast("AVBufferRef**") PointerPointer dst, AVBufferRef src); -@NoException public static native int av_buffer_replace(@ByPtrPtr AVBufferRef dst, AVBufferRef src); +@NoException public static native int av_buffer_replace(@Cast("AVBufferRef**") PointerPointer dst, @Const AVBufferRef src); +@NoException public static native int av_buffer_replace(@ByPtrPtr AVBufferRef dst, @Const AVBufferRef src); // Targeting ../avutil/AVBufferPool.java -// Targeting ../avutil/Alloc_int.java +// Targeting ../avutil/Alloc_long.java -@NoException public static native AVBufferPool av_buffer_pool_init(int size, Alloc_int alloc); -// Targeting ../avutil/Alloc_Pointer_int.java +@NoException public static native AVBufferPool av_buffer_pool_init(@Cast("size_t") long size, Alloc_long alloc); +// Targeting ../avutil/Alloc_Pointer_long.java // Targeting ../avutil/Pool_free_Pointer.java -@NoException public static native AVBufferPool av_buffer_pool_init2(int size, Pointer opaque, - Alloc_Pointer_int alloc, +@NoException public static native AVBufferPool av_buffer_pool_init2(@Cast("size_t") long size, Pointer opaque, + Alloc_Pointer_long alloc, Pool_free_Pointer pool_free); /** @@ -2342,7 +2331,7 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * therefore you have to use this function to access the original opaque * parameter of an allocated buffer. */ -@NoException public static native Pointer av_buffer_pool_buffer_get_opaque(AVBufferRef ref); +@NoException public static native Pointer av_buffer_pool_buffer_get_opaque(@Const AVBufferRef ref); /** * \} @@ -2512,45 +2501,37 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { /** packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined */ AV_PIX_FMT_BGR555LE = 43, -// #if FF_API_VAAPI - /** \name Deprecated pixel formats */ - /**\{*/ - /** 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 */ - AV_PIX_FMT_VAAPI_MOCO = 44, - /** HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers */ - AV_PIX_FMT_VAAPI_IDCT = 45, - /** HW decoding through VA API, Picture.data[3] contains a VASurfaceID */ - AV_PIX_FMT_VAAPI_VLD = 46, - /**\}*/ - AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD, -// #else -// #endif + /** + * Hardware acceleration through VA-API, data[3] contains a + * VASurfaceID. + */ + AV_PIX_FMT_VAAPI = 44, /** planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian */ - AV_PIX_FMT_YUV420P16LE = AV_PIX_FMT_VAAPI_VLD + 1, + AV_PIX_FMT_YUV420P16LE = 45, /** planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian */ - AV_PIX_FMT_YUV420P16BE = AV_PIX_FMT_VAAPI_VLD + 2, + AV_PIX_FMT_YUV420P16BE = 46, /** planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian */ - AV_PIX_FMT_YUV422P16LE = AV_PIX_FMT_VAAPI_VLD + 3, + AV_PIX_FMT_YUV422P16LE = 47, /** planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian */ - AV_PIX_FMT_YUV422P16BE = AV_PIX_FMT_VAAPI_VLD + 4, + AV_PIX_FMT_YUV422P16BE = 48, /** planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian */ - AV_PIX_FMT_YUV444P16LE = AV_PIX_FMT_VAAPI_VLD + 5, + AV_PIX_FMT_YUV444P16LE = 49, /** planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian */ - AV_PIX_FMT_YUV444P16BE = AV_PIX_FMT_VAAPI_VLD + 6, + AV_PIX_FMT_YUV444P16BE = 50, /** HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer */ - AV_PIX_FMT_DXVA2_VLD = AV_PIX_FMT_VAAPI_VLD + 7, + AV_PIX_FMT_DXVA2_VLD = 51, /** packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined */ - AV_PIX_FMT_RGB444LE = AV_PIX_FMT_VAAPI_VLD + 8, + AV_PIX_FMT_RGB444LE = 52, /** packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined */ - AV_PIX_FMT_RGB444BE = AV_PIX_FMT_VAAPI_VLD + 9, + AV_PIX_FMT_RGB444BE = 53, /** packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined */ - AV_PIX_FMT_BGR444LE = AV_PIX_FMT_VAAPI_VLD + 10, + AV_PIX_FMT_BGR444LE = 54, /** packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined */ - AV_PIX_FMT_BGR444BE = AV_PIX_FMT_VAAPI_VLD + 11, + AV_PIX_FMT_BGR444BE = 55, /** 8 bits gray, 8 bits alpha */ - AV_PIX_FMT_YA8 = AV_PIX_FMT_VAAPI_VLD + 12, + AV_PIX_FMT_YA8 = 56, /** alias for AV_PIX_FMT_YA8 */ AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, @@ -2904,8 +2885,33 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { AV_PIX_FMT_X2RGB10LE = AV_PIX_FMT_GBRP + 123, /** packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined */ AV_PIX_FMT_X2RGB10BE = AV_PIX_FMT_GBRP + 124, + /** packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), little-endian, X=unused/undefined */ + AV_PIX_FMT_X2BGR10LE = AV_PIX_FMT_GBRP + 125, + /** packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), big-endian, X=unused/undefined */ + AV_PIX_FMT_X2BGR10BE = AV_PIX_FMT_GBRP + 126, + + /** interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, big-endian */ + AV_PIX_FMT_P210BE = AV_PIX_FMT_GBRP + 127, + /** interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, little-endian */ + AV_PIX_FMT_P210LE = AV_PIX_FMT_GBRP + 128, + + /** interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, big-endian */ + AV_PIX_FMT_P410BE = AV_PIX_FMT_GBRP + 129, + /** interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, little-endian */ + AV_PIX_FMT_P410LE = AV_PIX_FMT_GBRP + 130, + + /** interleaved chroma YUV 4:2:2, 32bpp, big-endian */ + AV_PIX_FMT_P216BE = AV_PIX_FMT_GBRP + 131, + /** interleaved chroma YUV 4:2:2, 32bpp, liddle-endian */ + AV_PIX_FMT_P216LE = AV_PIX_FMT_GBRP + 132, + + /** interleaved chroma YUV 4:4:4, 48bpp, big-endian */ + AV_PIX_FMT_P416BE = AV_PIX_FMT_GBRP + 133, + /** interleaved chroma YUV 4:4:4, 48bpp, little-endian */ + AV_PIX_FMT_P416LE = AV_PIX_FMT_GBRP + 134, + /** number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions */ - AV_PIX_FMT_NB = AV_PIX_FMT_GBRP + 125; + AV_PIX_FMT_NB = AV_PIX_FMT_GBRP + 135; // #if AV_HAVE_BIGENDIAN // # define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##be @@ -3066,15 +3072,26 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { public static final int AV_PIX_FMT_Y210 = AV_PIX_FMT_Y210(); public static native @MemberGetter int AV_PIX_FMT_X2RGB10(); public static final int AV_PIX_FMT_X2RGB10 = AV_PIX_FMT_X2RGB10(); +public static native @MemberGetter int AV_PIX_FMT_X2BGR10(); +public static final int AV_PIX_FMT_X2BGR10 = AV_PIX_FMT_X2BGR10(); + +public static native @MemberGetter int AV_PIX_FMT_P210(); +public static final int AV_PIX_FMT_P210 = AV_PIX_FMT_P210(); +public static native @MemberGetter int AV_PIX_FMT_P410(); +public static final int AV_PIX_FMT_P410 = AV_PIX_FMT_P410(); +public static native @MemberGetter int AV_PIX_FMT_P216(); +public static final int AV_PIX_FMT_P216 = AV_PIX_FMT_P216(); +public static native @MemberGetter int AV_PIX_FMT_P416(); +public static final int AV_PIX_FMT_P416 = AV_PIX_FMT_P416(); /** * Chromaticity coordinates of the source primaries. - * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.1. + * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273. */ /** enum AVColorPrimaries */ public static final int AVCOL_PRI_RESERVED0 = 0, - /** also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B */ + /** also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B */ AVCOL_PRI_BT709 = 1, AVCOL_PRI_UNSPECIFIED = 2, AVCOL_PRI_RESERVED = 3, @@ -3085,7 +3102,7 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { AVCOL_PRI_BT470BG = 5, /** also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC */ AVCOL_PRI_SMPTE170M = 6, - /** functionally identical to above */ + /** identical to above, also called "SMPTE C" even though it uses D65 */ AVCOL_PRI_SMPTE240M = 7, /** colour filters using Illuminant C */ AVCOL_PRI_FILM = 8, @@ -3098,7 +3115,7 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { AVCOL_PRI_SMPTE431 = 11, /** SMPTE ST 432-1 (2010) / P3 D65 / Display P3 */ AVCOL_PRI_SMPTE432 = 12, - /** EBU Tech. 3213-E / JEDEC P22 phosphors */ + /** EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors */ AVCOL_PRI_EBU3213 = 22, AVCOL_PRI_JEDEC_P22 = AVCOL_PRI_EBU3213, /** Not part of ABI */ @@ -3106,7 +3123,7 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { /** * Color Transfer Characteristic. - * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.2. + * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.2. */ /** enum AVColorTransferCharacteristic */ public static final int @@ -3151,25 +3168,26 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { /** * YUV colorspace type. - * These values match the ones defined by ISO/IEC 23001-8_2013 § 7.3. + * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.3. */ /** enum AVColorSpace */ public static final int - /** order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB) */ + /** order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1 */ AVCOL_SPC_RGB = 0, - /** also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B */ + /** also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B */ AVCOL_SPC_BT709 = 1, AVCOL_SPC_UNSPECIFIED = 2, + /** reserved for future use by ITU-T and ISO/IEC just like 15-255 are */ AVCOL_SPC_RESERVED = 3, /** FCC Title 47 Code of Federal Regulations 73.682 (a)(20) */ AVCOL_SPC_FCC = 4, /** also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 */ AVCOL_SPC_BT470BG = 5, - /** also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC */ + /** also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above */ AVCOL_SPC_SMPTE170M = 6, - /** functionally identical to above */ + /** derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries */ AVCOL_SPC_SMPTE240M = 7, - /** Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 */ + /** used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 */ AVCOL_SPC_YCGCO = 8, AVCOL_SPC_YCOCG = AVCOL_SPC_YCGCO, /** ITU-R BT2020 non-constant luminance system */ @@ -3198,9 +3216,9 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * recommended, as it also defines the full range representation. * * Common definitions: - * - For RGB and luminance planes such as Y in YCbCr and I in ICtCp, + * - For RGB and luma planes such as Y in YCbCr and I in ICtCp, * 'E' is the original value in range of 0.0 to 1.0. - * - For chrominance planes such as Cb,Cr and Ct,Cp, 'E' is the original + * - For chroma planes such as Cb,Cr and Ct,Cp, 'E' is the original * value in range of -0.5 to 0.5. * - 'n' is the output bit depth. * - For additional definitions such as rounding and clipping to valid n @@ -3213,13 +3231,13 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { /** * Narrow or limited range content. * - * - For luminance planes: + * - For luma planes: * * (219 * E + 16) * 2^(n-8) * * F.ex. the range of 16-235 for 8 bits * - * - For chrominance planes: + * - For chroma planes: * * (224 * E + 128) * 2^(n-8) * @@ -3230,13 +3248,13 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { /** * Full range content. * - * - For RGB and luminance planes: + * - For RGB and luma planes: * * (2^n - 1) * E * * F.ex. the range of 0-255 for 8 bits * - * - For chrominance planes: + * - For chroma planes: * * (2^n - 1) * E + 2^(n - 1) * @@ -3426,48 +3444,31 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { */ AV_FRAME_DATA_ICC_PROFILE = 15, -// #if FF_API_FRAME_QP - /** - * Implementation-specific description of the format of AV_FRAME_QP_TABLE_DATA. - * The contents of this side data are undocumented and internal; use - * av_frame_set_qp_table() and av_frame_get_qp_table() to access this in a - * meaningful way instead. - */ - AV_FRAME_DATA_QP_TABLE_PROPERTIES = 16, - - /** - * Raw QP table data. Its format is described by - * AV_FRAME_DATA_QP_TABLE_PROPERTIES. Use av_frame_set_qp_table() and - * av_frame_get_qp_table() to access this instead. - */ - AV_FRAME_DATA_QP_TABLE_DATA = 17, -// #endif - /** * Timecode which conforms to SMPTE ST 12-1. The data is an array of 4 uint32_t * where the first uint32_t describes how many (1-3) of the other timecodes are used. * The timecode format is described in the documentation of av_timecode_get_smpte_from_framenum() * function in libavutil/timecode.h. */ - AV_FRAME_DATA_S12M_TIMECODE = 18, + AV_FRAME_DATA_S12M_TIMECODE = 16, /** * HDR dynamic metadata associated with a video frame. The payload is * an AVDynamicHDRPlus type and contains information for color * volume transform - application 4 of SMPTE 2094-40:2016 standard. */ - AV_FRAME_DATA_DYNAMIC_HDR_PLUS = 19, + AV_FRAME_DATA_DYNAMIC_HDR_PLUS = 17, /** * Regions Of Interest, the data is an array of AVRegionOfInterest type, the number of * array element is implied by AVFrameSideData.size / AVRegionOfInterest.self_size. */ - AV_FRAME_DATA_REGIONS_OF_INTEREST = 20, + AV_FRAME_DATA_REGIONS_OF_INTEREST = 18, /** * Encoding parameters for a video frame, as described by AVVideoEncParams. */ - AV_FRAME_DATA_VIDEO_ENC_PARAMS = 21, + AV_FRAME_DATA_VIDEO_ENC_PARAMS = 19, /** * User data unregistered metadata associated with a video frame. @@ -3475,13 +3476,33 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * The data is stored as uint8_t in AVFrameSideData.data which is 16 bytes of * uuid_iso_iec_11578 followed by AVFrameSideData.size - 16 bytes of user_data_payload_byte. */ - AV_FRAME_DATA_SEI_UNREGISTERED = 22, + AV_FRAME_DATA_SEI_UNREGISTERED = 20, /** * Film grain parameters for a frame, described by AVFilmGrainParams. * Must be present for every frame which should have film grain applied. */ - AV_FRAME_DATA_FILM_GRAIN_PARAMS = 23; + AV_FRAME_DATA_FILM_GRAIN_PARAMS = 21, + + /** + * Bounding boxes for object detection and classification, + * as described by AVDetectionBBoxHeader. + */ + AV_FRAME_DATA_DETECTION_BBOXES = 22, + + /** + * Dolby Vision RPU raw data, suitable for passing to x265 + * or other libraries. Array of uint8_t, with NAL emulation + * bytes intact. + */ + AV_FRAME_DATA_DOVI_RPU_BUFFER = 23, + + /** + * Parsed Dolby Vision metadata, suitable for passing to a software + * implementation. The payload is the AVDOVIMetadata struct defined in + * libavutil/dovi_meta.h. + */ + AV_FRAME_DATA_DOVI_METADATA = 24; /** enum AVActiveFormatDescription */ public static final int @@ -3502,47 +3523,15 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { -// #if FF_API_FRAME_GET_SET -/** - * Accessors for some AVFrame fields. These used to be provided for ABI - * compatibility, and do not need to be used anymore. - */ -@NoException public static native @Cast("int64_t") @Deprecated long av_frame_get_best_effort_timestamp(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_best_effort_timestamp(AVFrame frame, @Cast("int64_t") long val); -@NoException public static native @Cast("int64_t") @Deprecated long av_frame_get_pkt_duration(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_pkt_duration(AVFrame frame, @Cast("int64_t") long val); -@NoException public static native @Cast("int64_t") @Deprecated long av_frame_get_pkt_pos(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_pkt_pos(AVFrame frame, @Cast("int64_t") long val); -@NoException public static native @Cast("int64_t") @Deprecated long av_frame_get_channel_layout(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_channel_layout(AVFrame frame, @Cast("int64_t") long val); -@NoException public static native @Deprecated int av_frame_get_channels(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_channels(AVFrame frame, int val); -@NoException public static native @Deprecated int av_frame_get_sample_rate(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_sample_rate(AVFrame frame, int val); -@NoException public static native @Deprecated AVDictionary av_frame_get_metadata(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_metadata(AVFrame frame, AVDictionary val); -@NoException public static native @Deprecated int av_frame_get_decode_error_flags(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_decode_error_flags(AVFrame frame, int val); -@NoException public static native @Deprecated int av_frame_get_pkt_size(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_pkt_size(AVFrame frame, int val); -// #if FF_API_FRAME_QP -@NoException public static native @Deprecated BytePointer av_frame_get_qp_table(AVFrame f, IntPointer stride, IntPointer type); -@NoException public static native @Deprecated ByteBuffer av_frame_get_qp_table(AVFrame f, IntBuffer stride, IntBuffer type); -@NoException public static native @Deprecated byte[] av_frame_get_qp_table(AVFrame f, int[] stride, int[] type); -@NoException public static native @Deprecated int av_frame_set_qp_table(AVFrame f, AVBufferRef buf, int stride, int type); -// #endif -@NoException public static native @Cast("AVColorSpace") @Deprecated int av_frame_get_colorspace(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_colorspace(AVFrame frame, @Cast("AVColorSpace") int val); -@NoException public static native @Cast("AVColorRange") @Deprecated int av_frame_get_color_range(@Const AVFrame frame); -@NoException public static native @Deprecated void av_frame_set_color_range(AVFrame frame, @Cast("AVColorRange") int val); -// #endif +// #if FF_API_COLORSPACE_NAME /** * Get the name of a colorspace. * @return a static string identifying the colorspace; can be NULL. + * @deprecated use av_color_space_name() */ -@NoException public static native @Cast("const char*") BytePointer av_get_colorspace_name(@Cast("AVColorSpace") int val); - +@NoException public static native @Deprecated @Cast("const char*") BytePointer av_get_colorspace_name(@Cast("AVColorSpace") int val); +// #endif /** * Allocate an AVFrame and set its fields to default values. The resulting * struct must be freed using av_frame_free(). @@ -3701,9 +3690,7 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { */ @NoException public static native AVFrameSideData av_frame_new_side_data(AVFrame frame, @Cast("AVFrameSideDataType") int type, - int size); -// #else -// #endif + @Cast("size_t") long size); /** * Add a new side data to a frame from an existing AVBufferRef @@ -3998,9 +3985,8 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { * @param nb_samples the number of samples in a single channel * @param sample_fmt the sample format * @param align buffer size alignment (0 = default, 1 = no alignment) - * @return >=0 on success or a negative error code on failure - * \todo return minimum size in bytes required for the buffer in case - * of success at the next bump + * @return minimum size in bytes required for the buffer on success, + * or a negative error code on failure */ @NoException public static native int av_samples_fill_arrays(@Cast("uint8_t**") PointerPointer audio_data, IntPointer linesize, @Cast("const uint8_t*") BytePointer buf, @@ -4395,8 +4381,6 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // #include -// #include "attributes.h" - public static final int AV_CPU_FLAG_FORCE = 0x80000000; /* force usage of selected flags (OR) */ /* lower 16 bits - CPU features */ @@ -4454,6 +4438,8 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { public static final int AV_CPU_FLAG_BMI2 = 0x40000; /** AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used */ public static final int AV_CPU_FLAG_AVX512 = 0x100000; +/** CPU has slow gathers. */ +public static final int AV_CPU_FLAG_SLOW_GATHER = 0x2000000; /** standard */ public static final int AV_CPU_FLAG_ALTIVEC = 0x0001; @@ -4476,6 +4462,10 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { public static final int AV_CPU_FLAG_MMI = (1 << 0); public static final int AV_CPU_FLAG_MSA = (1 << 1); +//Loongarch SIMD extension. +public static final int AV_CPU_FLAG_LSX = (1 << 0); +public static final int AV_CPU_FLAG_LASX = (1 << 1); + /** * Return the flags which specify extensions supported by the CPU. * The returned value is affected by av_force_cpu_flags() if that was used @@ -4490,25 +4480,6 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { */ @NoException public static native void av_force_cpu_flags(int flags); -/** - * Set a mask on flags returned by av_get_cpu_flags(). - * This function is mainly useful for testing. - * Please use av_force_cpu_flags() and av_get_cpu_flags() instead which are more flexible - */ -@NoException public static native @Deprecated void av_set_cpu_flags_mask(int mask); - -/** - * Parse CPU flags from a string. - * - * The returned flags contain the specified flags as well as related unspecified flags. - * - * This function exists only for compatibility with libav. - * Please use av_parse_cpu_caps() when possible. - * @return a combination of AV_CPU_* flags, negative on error. - */ -@NoException public static native @Deprecated int av_parse_cpu_flags(@Cast("const char*") BytePointer s); -@NoException public static native @Deprecated int av_parse_cpu_flags(String s); - /** * Parse CPU caps from a string and update the given AV_CPU_* flags based on that. * @@ -4526,6 +4497,12 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { */ @NoException public static native int av_cpu_count(); +/** + * Overrides cpu count detection and forces the specified count. + * Count < 1 disables forcing of specific count. + */ +@NoException public static native void av_cpu_force_count(int count); + /** * Get the maximum data alignment that may be required by FFmpeg. * @@ -4576,8 +4553,6 @@ public class avutil extends org.bytedeco.ffmpeg.presets.avutil { // #include -// #include "version.h" - /** * \addtogroup lavu_dict AVDictionary * \ingroup lavu_data @@ -4807,7 +4782,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include "log.h" // #include "pixfmt.h" // #include "samplefmt.h" -// #include "version.h" /** * \defgroup avoptions AVOptions @@ -5384,18 +5358,6 @@ allocated with av_malloc() or another memory allocation function. */ */ @NoException public static native Pointer av_opt_child_next(Pointer obj, Pointer prev); -// #if FF_API_CHILD_CLASS_NEXT -/** - * Iterate over potential AVOptions-enabled children of parent. - * - * @param prev result of a previous call to this function or NULL - * @return AVClass corresponding to next potential child or NULL - * - * @deprecated use av_opt_child_class_iterate - */ -@NoException public static native @Const @Deprecated AVClass av_opt_child_class_next(@Const AVClass parent, @Const AVClass prev); -// #endif - /** * Iterate over potential AVOptions-enabled children of parent. * @@ -5599,9 +5561,16 @@ allocated with av_malloc() or another memory allocation function. */ /** * Copy options from src object into dest object. * + * The underlying AVClass of both src and dest must coincide. The guarantee + * below does not apply if this is not fulfilled. + * * Options that require memory allocation (e.g. string or binary) are malloc'ed in dest object. * Original memory allocated for such options is freed unless both src and dest options points to the same memory. * + * Even on error it is guaranteed that allocated options from src and dest + * no longer alias each other afterwards; in particular calling av_opt_free() + * on both src and dest is safe afterwards if dest has been memdup'ed from src. + * * @param dest Object to copy from * @param src Object to copy into * @return 0 on success, negative on error @@ -5722,7 +5691,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include "attributes.h" // #include "pixfmt.h" -// #include "version.h" // Targeting ../avutil/AVComponentDescriptor.java @@ -5755,26 +5723,6 @@ allocated with av_malloc() or another memory allocation function. */ */ public static final int AV_PIX_FMT_FLAG_RGB = (1 << 5); -// #if FF_API_PSEUDOPAL -/** - * The pixel format is "pseudo-paletted". This means that it contains a - * fixed palette in the 2nd plane but the palette is fixed/constant for each - * PIX_FMT. This allows interpreting the data as if it was PAL8, which can - * in some cases be simpler. Or the data can be interpreted purely based on - * the pixel format without using the palette. - * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8 - * - * @deprecated This flag is deprecated, and will be removed. When it is removed, - * the extra palette allocation in AVFrame.data[1] is removed as well. Only - * actual paletted formats (as indicated by AV_PIX_FMT_FLAG_PAL) will have a - * palette. Starting with FFmpeg versions which have this flag deprecated, the - * extra "pseudo" palette is already ignored, and API users are not required to - * allocate a palette for AV_PIX_FMT_FLAG_PSEUDOPAL formats (it was required - * before the deprecation, though). - */ -public static final int AV_PIX_FMT_FLAG_PSEUDOPAL = (1 << 6); -// #endif - /** * The pixel format has an alpha channel. This is set on all formats that * support alpha in some way, including AV_PIX_FMT_PAL8. The alpha is always @@ -6265,6 +6213,30 @@ allocated with av_malloc() or another memory allocation function. */ @Cast("const uint8_t*") byte[] src, int src_linesize, int bytewidth, int height); +/** + * Copy image data located in uncacheable (e.g. GPU mapped) memory. Where + * available, this function will use special functionality for reading from such + * memory, which may result in greatly improved performance compared to plain + * av_image_copy_plane(). + * + * bytewidth must be contained by both absolute values of dst_linesize + * and src_linesize, otherwise the function behavior is undefined. + * + * \note The linesize parameters have the type ptrdiff_t here, while they are + * int for av_image_copy_plane(). + * \note On x86, the linesizes currently need to be aligned to the cacheline + * size (i.e. 64) to get improved performance. + */ +@NoException public static native void av_image_copy_plane_uc_from(@Cast("uint8_t*") BytePointer dst, @Cast("ptrdiff_t") long dst_linesize, + @Cast("const uint8_t*") BytePointer src, @Cast("ptrdiff_t") long src_linesize, + @Cast("ptrdiff_t") long bytewidth, int height); +@NoException public static native void av_image_copy_plane_uc_from(@Cast("uint8_t*") ByteBuffer dst, @Cast("ptrdiff_t") long dst_linesize, + @Cast("const uint8_t*") ByteBuffer src, @Cast("ptrdiff_t") long src_linesize, + @Cast("ptrdiff_t") long bytewidth, int height); +@NoException public static native void av_image_copy_plane_uc_from(@Cast("uint8_t*") byte[] dst, @Cast("ptrdiff_t") long dst_linesize, + @Cast("const uint8_t*") byte[] src, @Cast("ptrdiff_t") long src_linesize, + @Cast("ptrdiff_t") long bytewidth, int height); + /** * Copy image in src_data to dst_data. * @@ -6783,7 +6755,7 @@ allocated with av_malloc() or another memory allocation function. */ /* Automatically generated by version.sh, do not manually edit! */ // #ifndef AVUTIL_FFVERSION_H // #define AVUTIL_FFVERSION_H -public static final String FFMPEG_VERSION = "4.4.1"; +public static final String FFMPEG_VERSION = "5.0"; // #endif /* AVUTIL_FFVERSION_H */ @@ -7612,7 +7584,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_adler32 Adler-32 @@ -7622,10 +7593,6 @@ allocated with av_malloc() or another memory allocation function. */ * \{ */ -// #if FF_API_CRYPTO_SIZE_T -// #else -// #endif - /** * Calculate the Adler32 checksum of a buffer. * @@ -7638,14 +7605,12 @@ allocated with av_malloc() or another memory allocation function. */ * @param len size of input buffer * @return updated checksum */ -@NoException public static native @Cast("AVAdler") long av_adler32_update(@Cast("AVAdler") long adler, @Cast("const uint8_t*") BytePointer buf, - @Cast("unsigned int") int len); -@NoException public static native @Cast("AVAdler") long av_adler32_update(@Cast("AVAdler") long adler, @Cast("const uint8_t*") ByteBuffer buf, - @Cast("unsigned int") int len); -@NoException public static native @Cast("AVAdler") long av_adler32_update(@Cast("AVAdler") long adler, @Cast("const uint8_t*") byte[] buf, - @Cast("unsigned int") int len); -// #else -// #endif +@NoException public static native @Cast("AVAdler") int av_adler32_update(@Cast("AVAdler") int adler, @Cast("const uint8_t*") BytePointer buf, + @Cast("size_t") long len); +@NoException public static native @Cast("AVAdler") int av_adler32_update(@Cast("AVAdler") int adler, @Cast("const uint8_t*") ByteBuffer buf, + @Cast("size_t") long len); +@NoException public static native @Cast("AVAdler") int av_adler32_update(@Cast("AVAdler") int adler, @Cast("const uint8_t*") byte[] buf, + @Cast("size_t") long len); /** * \} @@ -7682,7 +7647,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_aes AES @@ -7757,7 +7721,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include "attributes.h" -// #include "version.h" public static final int AES_CTR_KEY_SIZE = (16); public static final int AES_CTR_IV_SIZE = (8); @@ -8210,7 +8173,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_crc32 CRC @@ -8460,7 +8422,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include -// #include "version.h" /** * \defgroup lavu_hmac HMAC * \ingroup lavu_crypto @@ -8585,7 +8546,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_md5 MD5 @@ -8619,12 +8579,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param src input data to update hash with * @param len input data length */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_md5_update(AVMD5 ctx, @Cast("const uint8_t*") BytePointer src, int len); -@NoException public static native void av_md5_update(AVMD5 ctx, @Cast("const uint8_t*") ByteBuffer src, int len); -@NoException public static native void av_md5_update(AVMD5 ctx, @Cast("const uint8_t*") byte[] src, int len); -// #else -// #endif +@NoException public static native void av_md5_update(AVMD5 ctx, @Cast("const uint8_t*") BytePointer src, @Cast("size_t") long len); +@NoException public static native void av_md5_update(AVMD5 ctx, @Cast("const uint8_t*") ByteBuffer src, @Cast("size_t") long len); +@NoException public static native void av_md5_update(AVMD5 ctx, @Cast("const uint8_t*") byte[] src, @Cast("size_t") long len); /** * Finish hashing and output digest value. @@ -8643,12 +8600,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param src The data to hash * @param len The length of the data, in bytes */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_md5_sum(@Cast("uint8_t*") BytePointer dst, @Cast("const uint8_t*") BytePointer src, int len); -@NoException public static native void av_md5_sum(@Cast("uint8_t*") ByteBuffer dst, @Cast("const uint8_t*") ByteBuffer src, int len); -@NoException public static native void av_md5_sum(@Cast("uint8_t*") byte[] dst, @Cast("const uint8_t*") byte[] src, int len); -// #else -// #endif +@NoException public static native void av_md5_sum(@Cast("uint8_t*") BytePointer dst, @Cast("const uint8_t*") BytePointer src, @Cast("size_t") long len); +@NoException public static native void av_md5_sum(@Cast("uint8_t*") ByteBuffer dst, @Cast("const uint8_t*") ByteBuffer src, @Cast("size_t") long len); +@NoException public static native void av_md5_sum(@Cast("uint8_t*") byte[] dst, @Cast("const uint8_t*") byte[] src, @Cast("size_t") long len); /** * \} @@ -8759,7 +8713,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_ripemd RIPEMD @@ -8795,12 +8748,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param data input data to update hash with * @param len input data length */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_ripemd_update(AVRIPEMD context, @Cast("const uint8_t*") BytePointer data, @Cast("unsigned int") int len); -@NoException public static native void av_ripemd_update(AVRIPEMD context, @Cast("const uint8_t*") ByteBuffer data, @Cast("unsigned int") int len); -@NoException public static native void av_ripemd_update(AVRIPEMD context, @Cast("const uint8_t*") byte[] data, @Cast("unsigned int") int len); -// #else -// #endif +@NoException public static native void av_ripemd_update(AVRIPEMD context, @Cast("const uint8_t*") BytePointer data, @Cast("size_t") long len); +@NoException public static native void av_ripemd_update(AVRIPEMD context, @Cast("const uint8_t*") ByteBuffer data, @Cast("size_t") long len); +@NoException public static native void av_ripemd_update(AVRIPEMD context, @Cast("const uint8_t*") byte[] data, @Cast("size_t") long len); /** * Finish hashing and output digest value. @@ -9015,7 +8965,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_sha SHA @@ -9059,12 +9008,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param data input data to update hash with * @param len input data length */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_sha_update(AVSHA ctx, @Cast("const uint8_t*") BytePointer data, @Cast("unsigned int") int len); -@NoException public static native void av_sha_update(AVSHA ctx, @Cast("const uint8_t*") ByteBuffer data, @Cast("unsigned int") int len); -@NoException public static native void av_sha_update(AVSHA ctx, @Cast("const uint8_t*") byte[] data, @Cast("unsigned int") int len); -// #else -// #endif +@NoException public static native void av_sha_update(AVSHA ctx, @Cast("const uint8_t*") BytePointer data, @Cast("size_t") long len); +@NoException public static native void av_sha_update(AVSHA ctx, @Cast("const uint8_t*") ByteBuffer data, @Cast("size_t") long len); +@NoException public static native void av_sha_update(AVSHA ctx, @Cast("const uint8_t*") byte[] data, @Cast("size_t") long len); /** * Finish hashing and output digest value. @@ -9119,7 +9065,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include "attributes.h" -// #include "version.h" /** * \defgroup lavu_sha512 SHA-512 @@ -9164,12 +9109,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param data input data to update hash with * @param len input data length */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_sha512_update(AVSHA512 context, @Cast("const uint8_t*") BytePointer data, @Cast("unsigned int") int len); -@NoException public static native void av_sha512_update(AVSHA512 context, @Cast("const uint8_t*") ByteBuffer data, @Cast("unsigned int") int len); -@NoException public static native void av_sha512_update(AVSHA512 context, @Cast("const uint8_t*") byte[] data, @Cast("unsigned int") int len); -// #else -// #endif +@NoException public static native void av_sha512_update(AVSHA512 context, @Cast("const uint8_t*") BytePointer data, @Cast("size_t") long len); +@NoException public static native void av_sha512_update(AVSHA512 context, @Cast("const uint8_t*") ByteBuffer data, @Cast("size_t") long len); +@NoException public static native void av_sha512_update(AVSHA512 context, @Cast("const uint8_t*") byte[] data, @Cast("size_t") long len); /** * Finish hashing and output digest value. @@ -10017,13 +9959,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include "attributes.h" // #include "macros.h" // #include "version.h" -// #include "libavutil/avconfig.h" - -// #if AV_HAVE_BIGENDIAN -// # define AV_NE(be, le) (be) -// #else -// # define AV_NE(be, le) (le) -// #endif //rounded division & shift // #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) @@ -10064,25 +9999,6 @@ allocated with av_malloc() or another memory allocation function. */ // #define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a)) // #define FFABS64U(a) ((a) <= 0 ? -(uint64_t)(a) : (uint64_t)(a)) -/** - * Comparator. - * For two numerical expressions x and y, gives 1 if x > y, -1 if x < y, and 0 - * if x == y. This is useful for instance in a qsort comparator callback. - * Furthermore, compilers are able to optimize this to branchless code, and - * there is no risk of overflow with signed types. - * As with many macros, this evaluates its argument multiple times, it thus - * must not have a side-effect. - */ -// #define FFDIFFSIGN(x,y) (((x)>(y)) - ((x)<(y))) - -// #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) -// #define FFMAX3(a,b,c) FFMAX(FFMAX(a,b),c) -// #define FFMIN(a,b) ((a) > (b) ? (b) : (a)) -// #define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c) - -// #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) -// #define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0])) - /* misc math functions */ // #ifdef HAVE_AV_CONFIG_H @@ -10298,6 +10214,8 @@ allocated with av_malloc() or another memory allocation function. */ /** * Clip a float value into the amin-amax range. + * If a is nan or -inf amin will be returned. + * If a is +inf amax will be returned. * @param a value to clip * @param amin minimum value of the clip range * @param amax maximum value of the clip range @@ -10307,6 +10225,8 @@ allocated with av_malloc() or another memory allocation function. */ /** * Clip a double value into the amin-amax range. + * If a is nan or -inf amin will be returned. + * If a is +inf amax will be returned. * @param a value to clip * @param amin minimum value of the clip range * @param amax maximum value of the clip range @@ -10336,9 +10256,6 @@ allocated with av_malloc() or another memory allocation function. */ @NoException public static native @Const int av_parity_c(@Cast("uint32_t") int v); -public static native int MKTAG(@Cast("char") byte a, @Cast("char") byte b, @Cast("char") byte c, @Cast("char") byte d); -public static native int MKBETAG(@Cast("char") byte a, @Cast("char") byte b, @Cast("char") byte c, @Cast("char") byte d); - /** * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form. * @@ -10563,7 +10480,7 @@ allocated with av_malloc() or another memory allocation function. */ @NoException public static native double av_display_rotation_get(@Const int[] matrix); /** - * Initialize a transformation matrix describing a pure counterclockwise + * Initialize a transformation matrix describing a pure clockwise * rotation by the specified angle (in degrees). * * @param matrix an allocated transformation matrix (will be fully overwritten @@ -11045,8 +10962,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include - -// #include "version.h" // Targeting ../avutil/AVHashContext.java @@ -11119,12 +11034,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param src [in] Data to be added to the hash context * @param len [in] Size of the additional data */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_hash_update(AVHashContext ctx, @Cast("const uint8_t*") BytePointer src, int len); -@NoException public static native void av_hash_update(AVHashContext ctx, @Cast("const uint8_t*") ByteBuffer src, int len); -@NoException public static native void av_hash_update(AVHashContext ctx, @Cast("const uint8_t*") byte[] src, int len); -// #else -// #endif +@NoException public static native void av_hash_update(AVHashContext ctx, @Cast("const uint8_t*") BytePointer src, @Cast("size_t") long len); +@NoException public static native void av_hash_update(AVHashContext ctx, @Cast("const uint8_t*") ByteBuffer src, @Cast("size_t") long len); +@NoException public static native void av_hash_update(AVHashContext ctx, @Cast("const uint8_t*") byte[] src, @Cast("size_t") long len); /** * Finalize a hash context and compute the actual hash value. @@ -12078,8 +11990,6 @@ allocated with av_malloc() or another memory allocation function. */ // #include // #include -// #include "version.h" - /** * \defgroup lavu_murmur3 Murmur3 * \ingroup lavu_hash @@ -12148,12 +12058,9 @@ allocated with av_malloc() or another memory allocation function. */ * @param src [in] Input data to update hash with * @param len [in] Number of bytes to read from {@code src} */ -// #if FF_API_CRYPTO_SIZE_T -@NoException public static native void av_murmur3_update(@Cast("AVMurMur3*") Pointer c, @Cast("const uint8_t*") BytePointer src, int len); -@NoException public static native void av_murmur3_update(@Cast("AVMurMur3*") Pointer c, @Cast("const uint8_t*") ByteBuffer src, int len); -@NoException public static native void av_murmur3_update(@Cast("AVMurMur3*") Pointer c, @Cast("const uint8_t*") byte[] src, int len); -// #else -// #endif +@NoException public static native void av_murmur3_update(@Cast("AVMurMur3*") Pointer c, @Cast("const uint8_t*") BytePointer src, @Cast("size_t") long len); +@NoException public static native void av_murmur3_update(@Cast("AVMurMur3*") Pointer c, @Cast("const uint8_t*") ByteBuffer src, @Cast("size_t") long len); +@NoException public static native void av_murmur3_update(@Cast("AVMurMur3*") Pointer c, @Cast("const uint8_t*") byte[] src, @Cast("size_t") long len); /** * Finish hashing and output digest value. @@ -13102,7 +13009,6 @@ allocated with av_malloc() or another memory allocation function. */ // #define AVUTIL_TREE_H // #include "attributes.h" -// #include "version.h" // Targeting ../avutil/AVTreeNode.java @@ -13241,11 +13147,14 @@ allocated with av_malloc() or another memory allocation function. */ * float. Length is the frame size, not the window size (which is 2x frame) * For forward transforms, the stride specifies the spacing between each * sample in the output array in bytes. The input must be a flat array. + * * For inverse transforms, the stride specifies the spacing between each * sample in the input array in bytes. The output will be a flat array. * Stride must be a non-zero multiple of sizeof(float). + * * NOTE: the inverse transform is half-length, meaning the output will not - * contain redundant data. This is what most codecs work with. + * contain redundant data. This is what most codecs work with. To do a full + * inverse transform, set the AV_TX_FULL_IMDCT flag on init. */ AV_TX_FLOAT_MDCT = 1, @@ -13285,7 +13194,21 @@ allocated with av_malloc() or another memory allocation function. */ * of av_tn_fn() MUST match the input. May be unsupported or slower for some * transform types. */ - AV_TX_INPLACE = 1L << 0; + AV_TX_INPLACE = 1L << 0, + + /** + * Relaxes alignment requirement for the in and out arrays of av_tx_fn(). + * May be slower with certain transform types. + */ + AV_TX_UNALIGNED = 1L << 1, + + /** + * Performs a full inverse MDCT rather than leaving out samples that can be + * derived through symmetry. Requires an output array of 'len' floats, + * rather than the usual 'len/2' floats. + * Ignored for all transforms but inverse MDCTs. + */ + AV_TX_FULL_IMDCT = 1L << 2; /** * Initialize a transform context with the given configuration @@ -13315,6 +13238,128 @@ allocated with av_malloc() or another memory allocation function. */ // #endif /* AVUTIL_TX_H */ +// Parsed from + +/* + * copyright (c) 2003 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * \file + * \ingroup lavu + * Libavutil version macros + */ + +// #ifndef AVUTIL_VERSION_H +// #define AVUTIL_VERSION_H + +// #include "macros.h" + +/** + * \addtogroup version_utils + * + * Useful to check and match library version in order to maintain + * backward compatibility. + * + * The FFmpeg libraries follow a versioning sheme very similar to + * Semantic Versioning (http://semver.org/) + * The difference is that the component called PATCH is called MICRO in FFmpeg + * and its value is reset to 100 instead of 0 to keep it above or equal to 100. + * Also we do not increase MICRO for every bugfix or change in git master. + * + * Prior to FFmpeg 3.2 point releases did not change any lib version number to + * avoid aliassing different git master checkouts. + * Starting with FFmpeg 3.2, the released library versions will occupy + * a separate MAJOR.MINOR that is not used on the master development branch. + * That is if we branch a release of master 55.10.123 we will bump to 55.11.100 + * for the release and master will continue at 55.12.100 after it. Each new + * point release will then bump the MICRO improving the usefulness of the lib + * versions. + * + * \{ + */ + +// #define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c)) +// #define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c +// #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) + +/** + * Extract version components from the full ::AV_VERSION_INT int as returned + * by functions like ::avformat_version() and ::avcodec_version() + */ +// #define AV_VERSION_MAJOR(a) ((a) >> 16) +// #define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8) +// #define AV_VERSION_MICRO(a) ((a) & 0xFF) + +/** + * \} + */ + +/** + * \defgroup lavu_ver Version and Build diagnostics + * + * Macros and function useful to check at compiletime and at runtime + * which version of libavutil is in use. + * + * \{ + */ + +public static final int LIBAVUTIL_VERSION_MAJOR = 57; +public static final int LIBAVUTIL_VERSION_MINOR = 17; +public static final int LIBAVUTIL_VERSION_MICRO = 100; + +public static native @MemberGetter int LIBAVUTIL_VERSION_INT(); +public static final int LIBAVUTIL_VERSION_INT = LIBAVUTIL_VERSION_INT(); +// #define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, +// LIBAVUTIL_VERSION_MINOR, +// LIBAVUTIL_VERSION_MICRO) +public static final int LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT; + +public static native @MemberGetter String LIBAVUTIL_IDENT(); +public static final String LIBAVUTIL_IDENT = LIBAVUTIL_IDENT(); + +/** + * \defgroup lavu_depr_guards Deprecation Guards + * 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. + * + * \note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + * + * \{ + */ + +public static final boolean FF_API_D2STR = (LIBAVUTIL_VERSION_MAJOR < 58); +public static final boolean FF_API_DECLARE_ALIGNED = (LIBAVUTIL_VERSION_MAJOR < 58); +public static final boolean FF_API_COLORSPACE_NAME = (LIBAVUTIL_VERSION_MAJOR < 58); +public static final boolean FF_API_AV_MALLOCZ_ARRAY = (LIBAVUTIL_VERSION_MAJOR < 58); + +/** + * \} + * \} + */ + +// #endif /* AVUTIL_VERSION_H */ + + // Parsed from log_callback.h /* diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swresample.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swresample.java index ba50f0a8896..a3caa996ad2 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swresample.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swresample.java @@ -621,4 +621,53 @@ public class swresample extends org.bytedeco.ffmpeg.presets.swresample { // #endif /* SWRESAMPLE_SWRESAMPLE_H */ +// Parsed from + +/* + * Version macros. + * + * This file is part of libswresample + * + * libswresample 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. + * + * libswresample 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 libswresample; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef SWRESAMPLE_VERSION_H +// #define SWRESAMPLE_VERSION_H + +/** + * \file + * Libswresample version macros + */ + +// #include "libavutil/version.h" + +public static final int LIBSWRESAMPLE_VERSION_MAJOR = 4; +public static final int LIBSWRESAMPLE_VERSION_MINOR = 3; +public static final int LIBSWRESAMPLE_VERSION_MICRO = 100; + +public static native @MemberGetter int LIBSWRESAMPLE_VERSION_INT(); +public static final int LIBSWRESAMPLE_VERSION_INT = LIBSWRESAMPLE_VERSION_INT(); +// #define LIBSWRESAMPLE_VERSION AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, +// LIBSWRESAMPLE_VERSION_MINOR, +// LIBSWRESAMPLE_VERSION_MICRO) +public static final int LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT; + +public static native @MemberGetter String LIBSWRESAMPLE_IDENT(); +public static final String LIBSWRESAMPLE_IDENT = LIBSWRESAMPLE_IDENT(); + +// #endif /* SWRESAMPLE_VERSION_H */ + + } diff --git a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swscale.java b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swscale.java index a97f95e07cd..ce0a518c5d0 100644 --- a/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swscale.java +++ b/ffmpeg/src/gen/java/org/bytedeco/ffmpeg/global/swscale.java @@ -49,6 +49,7 @@ public class swscale extends org.bytedeco.ffmpeg.presets.swscale { // #include // #include "libavutil/avutil.h" +// #include "libavutil/frame.h" // #include "libavutil/log.h" // #include "libavutil/pixfmt.h" // #include "version.h" @@ -245,6 +246,97 @@ public class swscale extends org.bytedeco.ffmpeg.presets.swscale { @Const int[] srcStride, int srcSliceY, int srcSliceH, @Cast("uint8_t*const*") @ByPtrPtr byte[] dst, @Const int[] dstStride); +/** + * Scale source data from src and write the output to dst. + * + * This is merely a convenience wrapper around + * - sws_frame_start() + * - sws_send_slice(0, src->height) + * - sws_receive_slice(0, dst->height) + * - sws_frame_end() + * + * @param dst The destination frame. See documentation for sws_frame_start() for + * more details. + * @param src The source frame. + * + * @return 0 on success, a negative AVERROR code on failure + */ +@NoException public static native int sws_scale_frame(SwsContext c, AVFrame dst, @Const AVFrame src); + +/** + * Initialize the scaling process for a given pair of source/destination frames. + * Must be called before any calls to sws_send_slice() and sws_receive_slice(). + * + * This function will retain references to src and dst, so they must both use + * refcounted buffers (if allocated by the caller, in case of dst). + * + * @param dst The destination frame. + * + * The data buffers may either be already allocated by the caller or + * left clear, in which case they will be allocated by the scaler. + * The latter may have performance advantages - e.g. in certain cases + * some output planes may be references to input planes, rather than + * copies. + * + * Output data will be written into this frame in successful + * sws_receive_slice() calls. + * @param src The source frame. The data buffers must be allocated, but the + * frame data does not have to be ready at this point. Data + * availability is then signalled by sws_send_slice(). + * @return 0 on success, a negative AVERROR code on failure + * + * @see sws_frame_end() + */ +@NoException public static native int sws_frame_start(SwsContext c, AVFrame dst, @Const AVFrame src); + +/** + * Finish the scaling process for a pair of source/destination frames previously + * submitted with sws_frame_start(). Must be called after all sws_send_slice() + * and sws_receive_slice() calls are done, before any new sws_frame_start() + * calls. + */ +@NoException public static native void sws_frame_end(SwsContext c); + +/** + * Indicate that a horizontal slice of input data is available in the source + * frame previously provided to sws_frame_start(). The slices may be provided in + * any order, but may not overlap. For vertically subsampled pixel formats, the + * slices must be aligned according to subsampling. + * + * @param slice_start first row of the slice + * @param slice_height number of rows in the slice + * + * @return a non-negative number on success, a negative AVERROR code on failure. + */ +@NoException public static native int sws_send_slice(SwsContext c, @Cast("unsigned int") int slice_start, + @Cast("unsigned int") int slice_height); + +/** + * Request a horizontal slice of the output data to be written into the frame + * previously provided to sws_frame_start(). + * + * @param slice_start first row of the slice; must be a multiple of + * sws_receive_slice_alignment() + * @param slice_height number of rows in the slice; must be a multiple of + * sws_receive_slice_alignment(), except for the last slice + * (i.e. when slice_start+slice_height is equal to output + * frame height) + * + * @return a non-negative number if the data was successfully written into the output + * AVERROR(EAGAIN) if more input data needs to be provided before the + * output can be produced + * another negative AVERROR code on other kinds of scaling failure + */ +@NoException public static native int sws_receive_slice(SwsContext c, @Cast("unsigned int") int slice_start, + @Cast("unsigned int") int slice_height); + +/** + * @return alignment required for output slices requested with sws_receive_slice(). + * Slice offsets and sizes passed to sws_receive_slice() must be + * multiples of the value returned from this function. + */ +@NoException public static native @Cast("unsigned int") int sws_receive_slice_alignment(@Const SwsContext c); + /** * @param dstRange flag indicating the while-black range of the output (1=jpeg / 0=mpeg) * @param srcRange flag indicating the while-black range of the input (1=jpeg / 0=mpeg) @@ -253,7 +345,11 @@ public class swscale extends org.bytedeco.ffmpeg.presets.swscale { * @param brightness 16.16 fixed point brightness correction * @param contrast 16.16 fixed point contrast correction * @param saturation 16.16 fixed point saturation correction +#if LIBSWSCALE_VERSION_MAJOR > 6 + * @return negative error code on error, non negative otherwise +#else * @return -1 if not supported +#endif */ @NoException public static native int sws_setColorspaceDetails(SwsContext c, @Const IntPointer inv_table, int srcRange, @Const IntPointer table, int dstRange, @@ -266,7 +362,11 @@ public class swscale extends org.bytedeco.ffmpeg.presets.swscale { int brightness, int contrast, int saturation); /** +#if LIBSWSCALE_VERSION_MAJOR > 6 + * @return negative error code on error, non negative otherwise +#else * @return -1 if not supported +#endif */ @NoException public static native int sws_getColorspaceDetails(SwsContext c, @Cast("int**") PointerPointer inv_table, IntPointer srcRange, @Cast("int**") PointerPointer table, IntPointer dstRange, @@ -302,17 +402,6 @@ public class swscale extends org.bytedeco.ffmpeg.presets.swscale { */ @NoException public static native void sws_normalizeVec(SwsVector a, double height); -// #if FF_API_SWS_VECTOR -@NoException public static native @Deprecated SwsVector sws_getConstVec(double c, int length); -@NoException public static native @Deprecated SwsVector sws_getIdentityVec(); -@NoException public static native @Deprecated void sws_convVec(SwsVector a, SwsVector b); -@NoException public static native @Deprecated void sws_addVec(SwsVector a, SwsVector b); -@NoException public static native @Deprecated void sws_subVec(SwsVector a, SwsVector b); -@NoException public static native @Deprecated void sws_shiftVec(SwsVector a, int shift); -@NoException public static native @Deprecated SwsVector sws_cloneVec(SwsVector a); -@NoException public static native @Deprecated void sws_printVec2(SwsVector a, AVClass log_ctx, int log_level); -// #endif - @NoException public static native void sws_freeVec(SwsVector a); @NoException public static native SwsFilter sws_getDefaultFilter(float lumaGBlur, float chromaGBlur, @@ -392,4 +481,57 @@ public class swscale extends org.bytedeco.ffmpeg.presets.swscale { // #endif /* SWSCALE_SWSCALE_H */ +// Parsed from + +/* + * This file is part of FFmpeg. + * + * FFmpeg 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. + * + * FFmpeg 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 FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +// #ifndef SWSCALE_VERSION_H +// #define SWSCALE_VERSION_H + +/** + * \file + * swscale version macros + */ + +// #include "libavutil/version.h" + +public static final int LIBSWSCALE_VERSION_MAJOR = 6; +public static final int LIBSWSCALE_VERSION_MINOR = 4; +public static final int LIBSWSCALE_VERSION_MICRO = 100; + +public static native @MemberGetter int LIBSWSCALE_VERSION_INT(); +public static final int LIBSWSCALE_VERSION_INT = LIBSWSCALE_VERSION_INT(); +// #define LIBSWSCALE_VERSION AV_VERSION(LIBSWSCALE_VERSION_MAJOR, +// LIBSWSCALE_VERSION_MINOR, +// LIBSWSCALE_VERSION_MICRO) +public static final int LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT; + +public static native @MemberGetter String LIBSWSCALE_IDENT(); +public static final String LIBSWSCALE_IDENT = LIBSWSCALE_IDENT(); + +/** + * 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. + */ + +// #endif /* SWSCALE_VERSION_H */ + + } diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avcodec.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avcodec.java index 66e5681e73c..de85c0b0f78 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avcodec.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avcodec.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -37,17 +37,22 @@ target = "org.bytedeco.ffmpeg.avcodec", global = "org.bytedeco.ffmpeg.global.avcodec", value = { - @Platform(cinclude = {"", "", "", "", - "", "", "", "", ""}, - link = "avcodec@.58"), + @Platform(cinclude = {"", "", "", "", "", + "", "", "", "", "", ""}, + link = "avcodec@.59"), @Platform(value = "linux-arm", preload = {"asound@.2", "vchiq_arm", "vcos", "vcsm", "bcm_host", "mmal_core", "mmal_util", "mmal_vc_client"}), - @Platform(value = "windows", preload = "avcodec-58") + @Platform(value = "windows", preload = "avcodec-59") } ) public class avcodec implements InfoMapper { public void map(InfoMap infoMap) { infoMap.put(new Info("!FF_API_LOWRES", "!FF_API_DEBUG_MV").define(false)) .put(new Info("CODEC_FLAG_CLOSED_GOP").translate().cppTypes("long")) + .put(new Info("LIBAVCODEC_VERSION").cppTypes()) + .put(new Info("LIBAVCODEC_VERSION_INT", "LIBAVCODEC_IDENT").translate(false)) + .put(new Info("FF_API_OPENH264_SLICE_MODE", "FF_API_OPENH264_CABAC", "FF_API_UNUSED_CODEC_CAPS", "FF_API_THREAD_SAFE_CALLBACKS", + "FF_API_DEBUG_MV", "FF_API_GET_FRAME_CLASS", "FF_API_AUTO_THREADS", "FF_API_INIT_PACKET", "FF_API_AVCTX_TIMEBASE", + "FF_API_MPEGVIDEO_OPTS", "FF_API_FLAG_TRUNCATED", "FF_API_SUB_TEXT_FORMAT").define().translate().cppTypes("bool")) .put(new Info("AVCodecHWConfigInternal").cast().pointerTypes("Pointer")) .put(new Info("AVCodec::hw_configs").skip()) .putFirst(new Info("AVPanScan").pointerTypes("AVPanScan")) diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avdevice.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avdevice.java index 238ca6ef79c..a7bc19b3111 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avdevice.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avdevice.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -37,14 +37,17 @@ target = "org.bytedeco.ffmpeg.avdevice", global = "org.bytedeco.ffmpeg.global.avdevice", value = { - @Platform(cinclude = "", link = "avdevice@.58"), - @Platform(value = "windows", preload = "avdevice-58") + @Platform(cinclude = {"" , ""}, link = "avdevice@.59"), + @Platform(value = "windows", preload = "avdevice-59") } ) public class avdevice implements InfoMapper { public void map(InfoMap infoMap) { infoMap.putFirst(new Info("AVDeviceInfoList").pointerTypes("AVDeviceInfoList")) .putFirst(new Info("AVDeviceCapabilitiesQuery").pointerTypes("AVDeviceCapabilitiesQuery")) + .put(new Info("LIBAVDEVICE_VERSION").cppTypes()) + .put(new Info("LIBAVDEVICE_VERSION_INT", "LIBAVDEVICE_IDENT").translate(false)) + .put(new Info("FF_API_DEVICE_CAPABILITIES").define().translate().cppTypes("bool")) .put(new Info("av_device_capabilities").skip()); } } diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avfilter.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avfilter.java index c18d4eaa5cd..14c900a6ba3 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avfilter.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avfilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -37,13 +37,16 @@ target = "org.bytedeco.ffmpeg.avfilter", global = "org.bytedeco.ffmpeg.global.avfilter", value = { - @Platform(cinclude = {"", "", ""}, link = "avfilter@.7"), - @Platform(value = "windows", preload = "avfilter-7") + @Platform(cinclude = {"", "", "", ""}, link = "avfilter@.8"), + @Platform(value = "windows", preload = "avfilter-8") } ) public class avfilter implements InfoMapper { public void map(InfoMap infoMap) { infoMap.put(new Info("AVFilterPool", "AVFilterCommand", "AVFilterChannelLayouts", "FFFrameQueue").cast().pointerTypes("Pointer")) + .put(new Info("LIBAVFILTER_VERSION").cppTypes()) + .put(new Info("LIBAVFILTER_VERSION_INT", "LIBAVFILTER_IDENT").translate(false)) + .put(new Info("FF_API_SWS_PARAM_OPTION", "FF_API_BUFFERSINK_ALLOC", "FF_API_PAD_COUNT").define().translate().cppTypes("bool")) .put(new Info("AV_HAVE_INCOMPATIBLE_LIBAV_ABI || !FF_API_OLD_GRAPH_PARSE").define(true)) .put(new Info("!FF_API_FOO_COUNT", "FF_INTERNAL_FIELDS").define(false)); } diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avformat.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avformat.java index c3398d79737..dbb864243bf 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avformat.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avformat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -37,15 +37,19 @@ target = "org.bytedeco.ffmpeg.avformat", global = "org.bytedeco.ffmpeg.global.avformat", value = { - @Platform(cinclude = {"", ""}, link = "avformat@.58"), - @Platform(value = "windows", preload = "avformat-58") + @Platform(cinclude = {"", "", ""}, link = "avformat@.59"), + @Platform(value = "windows", preload = "avformat-59") } ) public class avformat implements InfoMapper { public void map(InfoMap infoMap) { infoMap.put(new Info("AVDeviceInfoList", "AVDeviceCapabilitiesQuery", "AVBPrint", "URLContext", "FFFrac").cast().pointerTypes("Pointer")) - .put(new Info("AVPROBE_SCORE_RETRY", "AVPROBE_SCORE_STREAM_RETRY").translate(false)) + .put(new Info("LIBAVFORMAT_VERSION").cppTypes()) + .put(new Info("LIBAVFORMAT_VERSION_INT", "LIBAVFORMAT_IDENT", "AVPROBE_SCORE_RETRY", "AVPROBE_SCORE_STREAM_RETRY").translate(false)) + .put(new Info("FF_API_LAVF_PRIV_OPT", "FF_API_COMPUTE_PKT_FIELDS2", "FF_API_AVIOCONTEXT_WRITTEN", + "FF_HLS_TS_OPTIONS", "FF_HTTP_CACHE_REDIRECT_DEFAULT").define().translate().cppTypes("bool")) .put(new Info("LIBAVFORMAT_VERSION_MAJOR <= 54", "FF_API_ALLOC_OUTPUT_CONTEXT", "FF_API_FORMAT_PARAMETERS", - "FF_API_READ_PACKET", "FF_API_CLOSE_INPUT_FILE", "FF_API_NEW_STREAM", "FF_API_SET_PTS_INFO").define(false)); + "FF_API_READ_PACKET", "FF_API_CLOSE_INPUT_FILE", "FF_API_NEW_STREAM", "FF_API_SET_PTS_INFO", + "FF_API_AVSTREAM_CLASS").define(false).translate().cppTypes("bool")); } } diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java index 73a19b3d651..165c19f6ba7 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/avutil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2021 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -60,12 +60,12 @@ "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "log_callback.h"}, + "", "", "log_callback.h"}, includepath = {"/usr/local/include/ffmpeg/", "/opt/local/include/ffmpeg/", "/usr/include/ffmpeg/"}, - link = "avutil@.56", compiler = {"default", "nodeprecated"}), + link = "avutil@.57", compiler = {"default", "nodeprecated"}), @Platform(value = "linux-x86", preload = {"va@.1", "drm@.2", "va-drm@.1"}, preloadpath = {"/usr/lib32/", "/usr/lib/"}), @Platform(value = "linux-x86_64", preloadpath = {"/usr/lib64/", "/usr/lib/"}), - @Platform(value = "windows", includepath = {"C:/MinGW/local/include/ffmpeg/", "C:/MinGW/include/ffmpeg/"}, preload = "avutil-56"), + @Platform(value = "windows", includepath = {"C:/MinGW/local/include/ffmpeg/", "C:/MinGW/include/ffmpeg/"}, preload = "avutil-57"), @Platform(extension = "-gpl") } ) @@ -79,7 +79,9 @@ public void map(InfoMap infoMap) { "av_ceil_log2", "av_clip", "av_clip64", "av_clip_uint8", "av_clip_int8", "av_clip_uint16", "av_clip_int16", "av_clipl_int32", "av_clip_intp2", "av_clip_uintp2", "av_mod_uintp2", "av_sat_add32", "av_sat_dadd32", "av_sat_sub32", "av_sat_dsub32", "av_clipf", "av_clipd", "av_popcount", "av_popcount64", "av_parity", - "av_sat_add64", "av_sat_sub64").cppTypes().translate()) + "av_sat_add64", "av_sat_sub64", "LIBAVUTIL_VERSION").cppTypes().translate()) + .put(new Info("LIBAVUTIL_VERSION_INT", "LIBAVUTIL_IDENT").translate(false)) + .put(new Info("FF_API_D2STR", "FF_API_DECLARE_ALIGNED", "FF_API_COLORSPACE_NAME", "FF_API_AV_MALLOCZ_ARRAY").define().translate().cppTypes("bool")) .put(new Info("av_const").annotations("@Const")) .put(new Info("FF_CONST_AVUTIL55").annotations()) .put(new Info("av_malloc_attrib", "av_alloc_size", "av_always_inline", "av_warn_unused_result", "av_alias").cppTypes().annotations()) diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/postproc.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/postproc.java index 10089a635b0..bb45d34dc1d 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/postproc.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/postproc.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -38,13 +38,15 @@ global = "org.bytedeco.ffmpeg.global.postproc", value = { // GPL only - @Platform(cinclude = "", link = "postproc@.55", extension = "-gpl"), - @Platform(value = "windows", preload = "postproc-55", extension = "-gpl") + @Platform(cinclude = {"", ""}, link = "postproc@.56", extension = "-gpl"), + @Platform(value = "windows", preload = "postproc-56", extension = "-gpl") } ) public class postproc implements InfoMapper { public void map(InfoMap infoMap) { infoMap.put(new Info("QP_STORE_T").cppTypes().valueTypes("byte").pointerTypes("BytePointer")) + .put(new Info("LIBPOSTPROC_VERSION").cppTypes()) + .put(new Info("LIBPOSTPROC_VERSION_INT", "LIBPOSTPROC_IDENT").translate(false)) .put(new Info("LIBPOSTPROC_VERSION_INT < (52<<16)").define(false)); } } diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swresample.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swresample.java index 829dd10e101..f4592b54184 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swresample.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swresample.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -36,11 +37,13 @@ target = "org.bytedeco.ffmpeg.swresample", global = "org.bytedeco.ffmpeg.global.swresample", value = { - @Platform(cinclude = "", link = "swresample@.3"), - @Platform(value = "windows", preload = "swresample-3") + @Platform(cinclude = {"", ""}, link = "swresample@.4"), + @Platform(value = "windows", preload = "swresample-4") } ) public class swresample implements InfoMapper { public void map(InfoMap infoMap) { + infoMap.put(new Info("LIBSWRESAMPLE_VERSION").cppTypes()) + .put(new Info("LIBSWRESAMPLE_VERSION_INT", "LIBSWRESAMPLE_IDENT").translate(false)); } } diff --git a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swscale.java b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swscale.java index 9168e1ec037..49c642a8d49 100644 --- a/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swscale.java +++ b/ffmpeg/src/main/java/org/bytedeco/ffmpeg/presets/swscale.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Samuel Audet + * Copyright (C) 2013-2022 Samuel Audet * * Licensed either under the Apache License, Version 2.0, or (at your option) * under the terms of the GNU General Public License as published by @@ -24,6 +24,7 @@ import org.bytedeco.javacpp.annotation.Platform; import org.bytedeco.javacpp.annotation.Properties; +import org.bytedeco.javacpp.tools.Info; import org.bytedeco.javacpp.tools.InfoMap; import org.bytedeco.javacpp.tools.InfoMapper; @@ -36,11 +37,13 @@ target = "org.bytedeco.ffmpeg.swscale", global = "org.bytedeco.ffmpeg.global.swscale", value = { - @Platform(cinclude = "", link = "swscale@.5"), - @Platform(value = "windows", preload = "swscale-5") + @Platform(cinclude = {"", ""}, link = "swscale@.6"), + @Platform(value = "windows", preload = "swscale-6") } ) public class swscale implements InfoMapper { public void map(InfoMap infoMap) { + infoMap.put(new Info("LIBSWSCALE_VERSION").cppTypes()) + .put(new Info("LIBSWSCALE_VERSION_INT", "LIBSWSCALE_IDENT").translate(false)); } } diff --git a/platform/pom.xml b/platform/pom.xml index 9b2dbb7c4e1..3d99199f870 100644 --- a/platform/pom.xml +++ b/platform/pom.xml @@ -89,7 +89,7 @@ org.bytedeco ffmpeg-platform - 4.4.1-${project.version} + 5.0-${project.version} org.bytedeco