diff --git a/Directory.Build.props b/Directory.Build.props index 7a2556b6..2a2ae385 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ $(AssemblyName) - 8.1.0.0 + 9.0.1.0 Ruslan Balanukhin Rationale One FFmpeg.AutoGen diff --git a/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs index a5b9e30d..ce9c0ace 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs @@ -244,6 +244,28 @@ public void UpdateFrom(byte[] array) public static implicit operator byte[](byte4 @struct) => @struct.ToArray(); } +public unsafe struct byte4x6 : IFixedArray +{ + public static readonly int ArrayLength = 4; + public int Length => 4; + byte6 _0; byte6 _1; byte6 _2; byte6 _3; + + public byte6 this[uint i] + { + get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (byte6* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (byte6* p0 = &_0) { *(p0 + i) = value; } } + } + public byte6[] ToArray() + { + fixed (byte6* p0 = &_0) { var a = new byte6[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(byte6[] array) + { + fixed (byte6* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 4) return; } } + } + public static implicit operator byte6[](byte4x6 @struct) => @struct.ToArray(); +} + public unsafe struct int4 : IFixedArray { public static readonly int ArrayLength = 4; @@ -332,26 +354,136 @@ public void UpdateFrom(ulong[] array) public static implicit operator ulong[](ulong4 @struct) => @struct.ToArray(); } -public unsafe struct int7 : IFixedArray +public unsafe struct ushort4 : IFixedArray { - public static readonly int ArrayLength = 7; - public int Length => 7; - fixed int _[7]; + public static readonly int ArrayLength = 4; + public int Length => 4; + fixed ushort _[4]; - public int this[uint i] + public ushort this[uint i] { get => _[i]; set => _[i] = value; } - public int[] ToArray() + public ushort[] ToArray() { - var a = new int[7]; for (uint i = 0; i < 7; i++) a[i] = _[i]; return a; + var a = new ushort[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a; } - public void UpdateFrom(int[] array) + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 4) return; } + } + public static implicit operator ushort[](ushort4 @struct) => @struct.ToArray(); +} + +public unsafe struct ushort4x32 : IFixedArray +{ + public static readonly int ArrayLength = 4; + public int Length => 4; + ushort32 _0; ushort32 _1; ushort32 _2; ushort32 _3; + + public ushort32 this[uint i] + { + get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort32* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort32* p0 = &_0) { *(p0 + i) = value; } } + } + public ushort32[] ToArray() + { + fixed (ushort32* p0 = &_0) { var a = new ushort32[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(ushort32[] array) + { + fixed (ushort32* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 4) return; } } + } + public static implicit operator ushort32[](ushort4x32 @struct) => @struct.ToArray(); +} + +public unsafe struct ushort4x6 : IFixedArray +{ + public static readonly int ArrayLength = 4; + public int Length => 4; + ushort6 _0; ushort6 _1; ushort6 _2; ushort6 _3; + + public ushort6 this[uint i] + { + get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort6* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort6* p0 = &_0) { *(p0 + i) = value; } } + } + public ushort6[] ToArray() + { + fixed (ushort6* p0 = &_0) { var a = new ushort6[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(ushort6[] array) + { + fixed (ushort6* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 4) return; } } + } + public static implicit operator ushort6[](ushort4x6 @struct) => @struct.ToArray(); +} + +public unsafe struct byte6 : IFixedArray +{ + public static readonly int ArrayLength = 6; + public int Length => 6; + fixed byte _[6]; + + public byte this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public byte[] ToArray() + { + var a = new byte[6]; for (uint i = 0; i < 6; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(byte[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 6) return; } + } + public static implicit operator byte[](byte6 @struct) => @struct.ToArray(); +} + +public unsafe struct ushort6 : IFixedArray +{ + public static readonly int ArrayLength = 6; + public int Length => 6; + fixed ushort _[6]; + + public ushort this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public ushort[] ToArray() + { + var a = new ushort[6]; for (uint i = 0; i < 6; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 6) return; } + } + public static implicit operator ushort[](ushort6 @struct) => @struct.ToArray(); +} + +public unsafe struct AVCodecID7 : IFixedArray +{ + public static readonly int ArrayLength = 7; + public int Length => 7; + AVCodecID _0; AVCodecID _1; AVCodecID _2; AVCodecID _3; AVCodecID _4; AVCodecID _5; AVCodecID _6; + + public AVCodecID this[uint i] + { + get { if (i >= 7) throw new ArgumentOutOfRangeException(); fixed (AVCodecID* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 7) throw new ArgumentOutOfRangeException(); fixed (AVCodecID* p0 = &_0) { *(p0 + i) = value; } } + } + public AVCodecID[] ToArray() + { + fixed (AVCodecID* p0 = &_0) { var a = new AVCodecID[7]; for (uint i = 0; i < 7; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(AVCodecID[] array) { - uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 7) return; } + fixed (AVCodecID* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 7) return; } } } - public static implicit operator int[](int7 @struct) => @struct.ToArray(); + public static implicit operator AVCodecID[](AVCodecID7 @struct) => @struct.ToArray(); } public unsafe struct AVBufferRef_ptr8 : IFixedArray @@ -464,6 +596,28 @@ public void UpdateFrom(ulong[] array) public static implicit operator ulong[](ulong8 @struct) => @struct.ToArray(); } +public unsafe struct ushort8 : IFixedArray +{ + public static readonly int ArrayLength = 8; + public int Length => 8; + fixed ushort _[8]; + + public ushort this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public ushort[] ToArray() + { + var a = new ushort[8]; for (uint i = 0; i < 8; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 8) return; } + } + public static implicit operator ushort[](ushort8 @struct) => @struct.ToArray(); +} + public unsafe struct int9 : IFixedArray { public static readonly int ArrayLength = 9; @@ -596,3 +750,25 @@ public void UpdateFrom(AVRational25[] array) public static implicit operator AVRational25[](AVRational25x25 @struct) => @struct.ToArray(); } +public unsafe struct ushort32 : IFixedArray +{ + public static readonly int ArrayLength = 32; + public int Length => 32; + fixed ushort _[32]; + + public ushort this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public ushort[] ToArray() + { + var a = new ushort[32]; for (uint i = 0; i < 32; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 32) return; } + } + public static implicit operator ushort[](ushort32 @struct) => @struct.ToArray(); +} + diff --git a/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs index 6c206aa0..0e50de6a 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs @@ -191,38 +191,6 @@ public unsafe struct AVCodecContext_get_format_func public static implicit operator AVCodecContext_get_format_func(AVCodecContext_get_format func) => new AVCodecContext_get_format_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; } -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate void AVCodecParser_parser_close (AVCodecParserContext* @s); -public unsafe struct AVCodecParser_parser_close_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_parser_close_func(AVCodecParser_parser_close func) => new AVCodecParser_parser_close_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVCodecParser_parser_init (AVCodecParserContext* @s); -public unsafe struct AVCodecParser_parser_init_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_parser_init_func(AVCodecParser_parser_init func) => new AVCodecParser_parser_init_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVCodecParser_parser_parse (AVCodecParserContext* @s, AVCodecContext* @avctx, byte** @poutbuf, int* @poutbuf_size, byte* @buf, int @buf_size); -public unsafe struct AVCodecParser_parser_parse_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_parser_parse_func(AVCodecParser_parser_parse func) => new AVCodecParser_parser_parse_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVCodecParser_split (AVCodecContext* @avctx, byte* @buf, int @buf_size); -public unsafe struct AVCodecParser_split_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_split_func(AVCodecParser_split func) => new AVCodecParser_split_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public unsafe delegate void AVD3D11VADeviceContext_lock (void* @lock_ctx); public unsafe struct AVD3D11VADeviceContext_lock_func diff --git a/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs index 4135fd8f..5ea7ecda 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs @@ -417,126 +417,124 @@ public enum AVCodecID : int @AV_CODEC_ID_BMV_VIDEO = 153, @AV_CODEC_ID_VBLE = 154, @AV_CODEC_ID_DXTORY = 155, - @AV_CODEC_ID_V410 = 156, - @AV_CODEC_ID_XWD = 157, - @AV_CODEC_ID_CDXL = 158, - @AV_CODEC_ID_XBM = 159, - @AV_CODEC_ID_ZEROCODEC = 160, - @AV_CODEC_ID_MSS1 = 161, - @AV_CODEC_ID_MSA1 = 162, - @AV_CODEC_ID_TSCC2 = 163, - @AV_CODEC_ID_MTS2 = 164, - @AV_CODEC_ID_CLLC = 165, - @AV_CODEC_ID_MSS2 = 166, - @AV_CODEC_ID_VP9 = 167, - @AV_CODEC_ID_AIC = 168, - @AV_CODEC_ID_ESCAPE130 = 169, - @AV_CODEC_ID_G2M = 170, - @AV_CODEC_ID_WEBP = 171, - @AV_CODEC_ID_HNM4_VIDEO = 172, - @AV_CODEC_ID_HEVC = 173, - @AV_CODEC_ID_FIC = 174, - @AV_CODEC_ID_ALIAS_PIX = 175, - @AV_CODEC_ID_BRENDER_PIX = 176, - @AV_CODEC_ID_PAF_VIDEO = 177, - @AV_CODEC_ID_EXR = 178, - @AV_CODEC_ID_VP7 = 179, - @AV_CODEC_ID_SANM = 180, - @AV_CODEC_ID_SGIRLE = 181, - @AV_CODEC_ID_MVC1 = 182, - @AV_CODEC_ID_MVC2 = 183, - @AV_CODEC_ID_HQX = 184, - @AV_CODEC_ID_TDSC = 185, - @AV_CODEC_ID_HQ_HQA = 186, - @AV_CODEC_ID_HAP = 187, - @AV_CODEC_ID_DDS = 188, - @AV_CODEC_ID_DXV = 189, - @AV_CODEC_ID_SCREENPRESSO = 190, - @AV_CODEC_ID_RSCC = 191, - @AV_CODEC_ID_AVS2 = 192, - @AV_CODEC_ID_PGX = 193, - @AV_CODEC_ID_AVS3 = 194, - @AV_CODEC_ID_MSP2 = 195, - @AV_CODEC_ID_VVC = 196, - @AV_CODEC_ID_Y41P = 197, - @AV_CODEC_ID_AVRP = 198, - @AV_CODEC_ID_012V = 199, - @AV_CODEC_ID_AVUI = 200, - @AV_CODEC_ID_TARGA_Y216 = 201, - @AV_CODEC_ID_V308 = 202, - @AV_CODEC_ID_V408 = 203, - @AV_CODEC_ID_YUV4 = 204, - @AV_CODEC_ID_AVRN = 205, - @AV_CODEC_ID_CPIA = 206, - @AV_CODEC_ID_XFACE = 207, - @AV_CODEC_ID_SNOW = 208, - @AV_CODEC_ID_SMVJPEG = 209, - @AV_CODEC_ID_APNG = 210, - @AV_CODEC_ID_DAALA = 211, - @AV_CODEC_ID_CFHD = 212, - @AV_CODEC_ID_TRUEMOTION2RT = 213, - @AV_CODEC_ID_M101 = 214, - @AV_CODEC_ID_MAGICYUV = 215, - @AV_CODEC_ID_SHEERVIDEO = 216, - @AV_CODEC_ID_YLC = 217, - @AV_CODEC_ID_PSD = 218, - @AV_CODEC_ID_PIXLET = 219, - @AV_CODEC_ID_SPEEDHQ = 220, - @AV_CODEC_ID_FMVC = 221, - @AV_CODEC_ID_SCPR = 222, - @AV_CODEC_ID_CLEARVIDEO = 223, - @AV_CODEC_ID_XPM = 224, - @AV_CODEC_ID_AV1 = 225, - @AV_CODEC_ID_BITPACKED = 226, - @AV_CODEC_ID_MSCC = 227, - @AV_CODEC_ID_SRGC = 228, - @AV_CODEC_ID_SVG = 229, - @AV_CODEC_ID_GDV = 230, - @AV_CODEC_ID_FITS = 231, - @AV_CODEC_ID_IMM4 = 232, - @AV_CODEC_ID_PROSUMER = 233, - @AV_CODEC_ID_MWSC = 234, - @AV_CODEC_ID_WCMV = 235, - @AV_CODEC_ID_RASC = 236, - @AV_CODEC_ID_HYMT = 237, - @AV_CODEC_ID_ARBC = 238, - @AV_CODEC_ID_AGM = 239, - @AV_CODEC_ID_LSCR = 240, - @AV_CODEC_ID_VP4 = 241, - @AV_CODEC_ID_IMM5 = 242, - @AV_CODEC_ID_MVDV = 243, - @AV_CODEC_ID_MVHA = 244, - @AV_CODEC_ID_CDTOONS = 245, - @AV_CODEC_ID_MV30 = 246, - @AV_CODEC_ID_NOTCHLC = 247, - @AV_CODEC_ID_PFM = 248, - @AV_CODEC_ID_MOBICLIP = 249, - @AV_CODEC_ID_PHOTOCD = 250, - @AV_CODEC_ID_IPU = 251, - @AV_CODEC_ID_ARGO = 252, - @AV_CODEC_ID_CRI = 253, - @AV_CODEC_ID_SIMBIOSIS_IMX = 254, - @AV_CODEC_ID_SGA_VIDEO = 255, - @AV_CODEC_ID_GEM = 256, - @AV_CODEC_ID_VBN = 257, - @AV_CODEC_ID_JPEGXL = 258, - @AV_CODEC_ID_QOI = 259, - @AV_CODEC_ID_PHM = 260, - @AV_CODEC_ID_RADIANCE_HDR = 261, - @AV_CODEC_ID_WBMP = 262, - @AV_CODEC_ID_MEDIA100 = 263, - @AV_CODEC_ID_VQC = 264, - @AV_CODEC_ID_PDV = 265, - @AV_CODEC_ID_EVC = 266, - @AV_CODEC_ID_RTV1 = 267, - @AV_CODEC_ID_VMIX = 268, - @AV_CODEC_ID_LEAD = 269, - @AV_CODEC_ID_DNXUC = 270, - @AV_CODEC_ID_RV60 = 271, - @AV_CODEC_ID_JPEGXL_ANIM = 272, - @AV_CODEC_ID_APV = 273, - @AV_CODEC_ID_PRORES_RAW = 274, - @AV_CODEC_ID_JPEGXS = 275, + @AV_CODEC_ID_XWD = 156, + @AV_CODEC_ID_CDXL = 157, + @AV_CODEC_ID_XBM = 158, + @AV_CODEC_ID_ZEROCODEC = 159, + @AV_CODEC_ID_MSS1 = 160, + @AV_CODEC_ID_MSA1 = 161, + @AV_CODEC_ID_TSCC2 = 162, + @AV_CODEC_ID_MTS2 = 163, + @AV_CODEC_ID_CLLC = 164, + @AV_CODEC_ID_MSS2 = 165, + @AV_CODEC_ID_VP9 = 166, + @AV_CODEC_ID_AIC = 167, + @AV_CODEC_ID_ESCAPE130 = 168, + @AV_CODEC_ID_G2M = 169, + @AV_CODEC_ID_WEBP = 170, + @AV_CODEC_ID_HNM4_VIDEO = 171, + @AV_CODEC_ID_HEVC = 172, + @AV_CODEC_ID_FIC = 173, + @AV_CODEC_ID_ALIAS_PIX = 174, + @AV_CODEC_ID_BRENDER_PIX = 175, + @AV_CODEC_ID_PAF_VIDEO = 176, + @AV_CODEC_ID_EXR = 177, + @AV_CODEC_ID_VP7 = 178, + @AV_CODEC_ID_SANM = 179, + @AV_CODEC_ID_SGIRLE = 180, + @AV_CODEC_ID_MVC1 = 181, + @AV_CODEC_ID_MVC2 = 182, + @AV_CODEC_ID_HQX = 183, + @AV_CODEC_ID_TDSC = 184, + @AV_CODEC_ID_HQ_HQA = 185, + @AV_CODEC_ID_HAP = 186, + @AV_CODEC_ID_DDS = 187, + @AV_CODEC_ID_DXV = 188, + @AV_CODEC_ID_SCREENPRESSO = 189, + @AV_CODEC_ID_RSCC = 190, + @AV_CODEC_ID_AVS2 = 191, + @AV_CODEC_ID_PGX = 192, + @AV_CODEC_ID_AVS3 = 193, + @AV_CODEC_ID_MSP2 = 194, + @AV_CODEC_ID_VVC = 195, + @AV_CODEC_ID_Y41P = 196, + @AV_CODEC_ID_AVRP = 197, + @AV_CODEC_ID_012V = 198, + @AV_CODEC_ID_AVUI = 199, + @AV_CODEC_ID_TARGA_Y216 = 200, + @AV_CODEC_ID_YUV4 = 201, + @AV_CODEC_ID_AVRN = 202, + @AV_CODEC_ID_CPIA = 203, + @AV_CODEC_ID_XFACE = 204, + @AV_CODEC_ID_SNOW = 205, + @AV_CODEC_ID_SMVJPEG = 206, + @AV_CODEC_ID_APNG = 207, + @AV_CODEC_ID_DAALA = 208, + @AV_CODEC_ID_CFHD = 209, + @AV_CODEC_ID_TRUEMOTION2RT = 210, + @AV_CODEC_ID_M101 = 211, + @AV_CODEC_ID_MAGICYUV = 212, + @AV_CODEC_ID_SHEERVIDEO = 213, + @AV_CODEC_ID_YLC = 214, + @AV_CODEC_ID_PSD = 215, + @AV_CODEC_ID_PIXLET = 216, + @AV_CODEC_ID_SPEEDHQ = 217, + @AV_CODEC_ID_FMVC = 218, + @AV_CODEC_ID_SCPR = 219, + @AV_CODEC_ID_CLEARVIDEO = 220, + @AV_CODEC_ID_XPM = 221, + @AV_CODEC_ID_AV1 = 222, + @AV_CODEC_ID_BITPACKED = 223, + @AV_CODEC_ID_MSCC = 224, + @AV_CODEC_ID_SRGC = 225, + @AV_CODEC_ID_SVG = 226, + @AV_CODEC_ID_GDV = 227, + @AV_CODEC_ID_FITS = 228, + @AV_CODEC_ID_IMM4 = 229, + @AV_CODEC_ID_PROSUMER = 230, + @AV_CODEC_ID_MWSC = 231, + @AV_CODEC_ID_WCMV = 232, + @AV_CODEC_ID_RASC = 233, + @AV_CODEC_ID_HYMT = 234, + @AV_CODEC_ID_ARBC = 235, + @AV_CODEC_ID_AGM = 236, + @AV_CODEC_ID_LSCR = 237, + @AV_CODEC_ID_VP4 = 238, + @AV_CODEC_ID_IMM5 = 239, + @AV_CODEC_ID_MVDV = 240, + @AV_CODEC_ID_MVHA = 241, + @AV_CODEC_ID_CDTOONS = 242, + @AV_CODEC_ID_MV30 = 243, + @AV_CODEC_ID_NOTCHLC = 244, + @AV_CODEC_ID_PFM = 245, + @AV_CODEC_ID_MOBICLIP = 246, + @AV_CODEC_ID_PHOTOCD = 247, + @AV_CODEC_ID_IPU = 248, + @AV_CODEC_ID_ARGO = 249, + @AV_CODEC_ID_CRI = 250, + @AV_CODEC_ID_SIMBIOSIS_IMX = 251, + @AV_CODEC_ID_SGA_VIDEO = 252, + @AV_CODEC_ID_GEM = 253, + @AV_CODEC_ID_VBN = 254, + @AV_CODEC_ID_JPEGXL = 255, + @AV_CODEC_ID_QOI = 256, + @AV_CODEC_ID_PHM = 257, + @AV_CODEC_ID_RADIANCE_HDR = 258, + @AV_CODEC_ID_WBMP = 259, + @AV_CODEC_ID_MEDIA100 = 260, + @AV_CODEC_ID_VQC = 261, + @AV_CODEC_ID_PDV = 262, + @AV_CODEC_ID_EVC = 263, + @AV_CODEC_ID_RTV1 = 264, + @AV_CODEC_ID_VMIX = 265, + @AV_CODEC_ID_LEAD = 266, + @AV_CODEC_ID_DNXUC = 267, + @AV_CODEC_ID_RV60 = 268, + @AV_CODEC_ID_JPEGXL_ANIM = 269, + @AV_CODEC_ID_APV = 270, + @AV_CODEC_ID_PRORES_RAW = 271, + @AV_CODEC_ID_JPEGXS = 272, + @AV_CODEC_ID_WEBP_ANIM = 273, /// A dummy id pointing at the start of audio codecs @AV_CODEC_ID_FIRST_AUDIO = 65536, @AV_CODEC_ID_PCM_S16LE = 65536, @@ -762,6 +760,7 @@ public enum AVCodecID : int @AV_CODEC_ID_LC3 = 86122, @AV_CODEC_ID_G728 = 86123, @AV_CODEC_ID_AHX = 86124, + @AV_CODEC_ID_APPLE_APAC = 86125, /// A dummy ID pointing at the start of subtitle codecs. @AV_CODEC_ID_FIRST_SUBTITLE = 94208, @AV_CODEC_ID_DVD_SUBTITLE = 94208, @@ -1122,8 +1121,18 @@ public enum AVFrameSideDataType : int @AV_FRAME_DATA_VIEW_ID = 29, /// This side data contains information about the reference display width(s) and reference viewing distance(s) as well as information about the corresponding reference stereo pair(s), i.e., the pair(s) of views to be displayed for the viewer's left and right eyes on the reference display at the reference viewing distance. The payload is the AV3DReferenceDisplaysInfo struct defined in libavutil/tdrdi.h. @AV_FRAME_DATA_3D_REFERENCE_DISPLAYS = 30, - /// Extensible image file format metadata. The payload is a buffer containing EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. + /// Exchangeable image file format metadata. The payload is a buffer containing EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. These four bytes signify the endianness, and occur as the first part of the TIFF header. @AV_FRAME_DATA_EXIF = 31, + /// HDR dynamic metadata associated with a video frame. The payload is an AVDynamicHDRSmpte2094App5 type and contains information for color volume transform as specified in the SMPTE 2094-50 standard. + @AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5 = 32, + /// IAMF Mix Gain Parameter Data associated with the audio frame. This metadata is in the form of the AVIAMFParamDefinition struct and contains information defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and Formats standard. + @AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM = 33, + /// IAMF Demixing Info Parameter Data associated with the audio frame. This metadata is in the form of the AVIAMFParamDefinition struct and contains information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model and Formats standard. + @AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM = 34, + /// IAMF Recon Gain Info Parameter Data associated with the audio frame. This metadata is in the form of the AVIAMFParamDefinition struct and contains information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model and Formats standard. + @AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM = 35, + /// Color information from a RAW camera codecs, needed to correctly process the video data. The payload is an AVRawColorParams struct defined in libavutil/raw_color_params.h. + @AV_FRAME_DATA_RAW_COLOR_PARAMS = 36, } /// Option for overlapping elliptical pixel selectors in an image. @@ -1371,8 +1380,12 @@ public enum AVPacketSideDataType : int @AV_PKT_DATA_RTCP_SR = 39, /// Extensible image file format metadata. The payload is a buffer containing EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. @AV_PKT_DATA_EXIF = 40, + /// HDR dynamic metadata associated with a video frame. The payload is an AVDynamicHDRSmpte2094App5 type and contains information for color volume transform as specified in the SMPTE 2094-50 standard. + @AV_PKT_DATA_DYNAMIC_HDR_SMPTE_2094_APP5 = 41, + /// Dolby Vision enhancement-layer HEVC decoder configuration. Parsed from the hvcE box in ISOM-based containers or the corresponding BlockAdditionMapping in Matroska. The data is a raw HEVCDecoderConfigurationRecord as defined in ISO 14496-15. + @AV_PKT_DATA_HEVC_CONF = 42, /// The number of side data types. This is not part of the public API/ABI in the sense that it may change when new side data types are added. This must stay the last enum value. 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 = 41, + @AV_PKT_DATA_NB = 43, } /// @{ @@ -2031,6 +2044,8 @@ public enum AVStreamGroupParamsType : int @AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION = 2, @AV_STREAM_GROUP_PARAMS_TILE_GRID = 3, @AV_STREAM_GROUP_PARAMS_LCEVC = 4, + @AV_STREAM_GROUP_PARAMS_TREF = 5, + @AV_STREAM_GROUP_PARAMS_DOLBY_VISION = 6, } /// @} @@ -2061,14 +2076,6 @@ public enum AVSubtitleType : int @SUBTITLE_ASS = 3, } -public enum AVTimebaseSource : int -{ - @AVFMT_TBCF_AUTO = -1, - @AVFMT_TBCF_DECODER = 0, - @AVFMT_TBCF_DEMUXER = 1, - @AVFMT_TBCF_R_FRAMERATE = 2, -} - public enum AVTimecodeFlag : int { /// timecode is drop frame @@ -2130,6 +2137,27 @@ public enum SwsAlphaBlend : int @SWS_ALPHA_BLEND_MAX_ENUM = 2147483647, } +public enum SwsBackend : int +{ + /// Legacy bespoke format-specific code + @SWS_BACKEND_LEGACY = 1, + @SWS_BACKEND_STABLE = 1, + /// Template-based C reference implementation + @SWS_BACKEND_C = 2, + /// Fast path using libc memcpy() / memset() + @SWS_BACKEND_MEMCPY = 4, + /// Chained x86 SIMD kernels + @SWS_BACKEND_X86 = 8, + /// Chained AArch64 NEON kernels + @SWS_BACKEND_AARCH64 = 16, + /// Vulkan SPIR-V backend + @SWS_BACKEND_SPIRV = 32, + @SWS_BACKEND_UNSTABLE = 62, + @SWS_BACKEND_ALL = 63, + /// force size to 32 bits, not a valid backend + @SWS_BACKEND_MAX_ENUM = 2147483647, +} + /// **************************** Flags and quality settings * **************************** public enum SwsDither : int { @@ -2145,6 +2173,24 @@ public enum SwsDither : int public enum SwsFlags : int { + /// Return an error on underspecified conversions. Without this flag, unspecified fields are defaulted to sensible values. + @SWS_STRICT = 2048, + /// Emit verbose log of scaling parameters. + @SWS_PRINT_INFO = 4096, + /// Perform full chroma upsampling when upscaling to RGB. + @SWS_FULL_CHR_H_INT = 8192, + /// Perform full chroma interpolation when downscaling RGB sources. + @SWS_FULL_CHR_H_INP = 16384, + /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. + @SWS_ACCURATE_RND = 262144, + /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. + @SWS_BITEXACT = 524288, + /// Allow/prefer using experimental new code paths. This may be faster, slower, or produce different output, with semantics subject to change at any point in time. For testing and debugging purposes only. + @SWS_UNSTABLE = 1048576, + /// This flag has no effect + @SWS_DIRECT_BGR = 32768, + /// Set `SwsContext.dither` instead + @SWS_ERROR_DIFFUSION = 8388608, /// fast bilinear filtering @SWS_FAST_BILINEAR = 1, /// bilinear filtering @@ -2165,26 +2211,8 @@ public enum SwsFlags : int @SWS_SINC = 256, /// 3-tap sinc/sinc @SWS_LANCZOS = 512, - /// cubic Keys spline + /// unwindowed natural cubic spline @SWS_SPLINE = 1024, - /// Return an error on underspecified conversions. Without this flag, unspecified fields are defaulted to sensible values. - @SWS_STRICT = 2048, - /// Emit verbose log of scaling parameters. - @SWS_PRINT_INFO = 4096, - /// Perform full chroma upsampling when upscaling to RGB. - @SWS_FULL_CHR_H_INT = 8192, - /// Perform full chroma interpolation when downscaling RGB sources. - @SWS_FULL_CHR_H_INP = 16384, - /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. - @SWS_ACCURATE_RND = 262144, - /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. - @SWS_BITEXACT = 524288, - /// Allow using experimental new code paths. This may be faster, slower, or produce different output, with semantics subject to change at any point in time. For testing and debugging purposes only. - @SWS_UNSTABLE = 1048576, - /// This flag has no effect - @SWS_DIRECT_BGR = 32768, - /// Set `SwsContext.dither` instead - @SWS_ERROR_DIFFUSION = 8388608, } public enum SwsIntent : int @@ -2201,3 +2229,28 @@ public enum SwsIntent : int @SWS_INTENT_NB = 4, } +public enum SwsScaler : int +{ + @SWS_SCALE_AUTO = 0, + /// bilinear filtering + @SWS_SCALE_BILINEAR = 1, + /// 2-tap cubic BC-spline + @SWS_SCALE_BICUBIC = 2, + /// nearest neighbor (point sampling) + @SWS_SCALE_POINT = 3, + /// area averaging + @SWS_SCALE_AREA = 4, + /// 2-tap gaussian approximation + @SWS_SCALE_GAUSSIAN = 5, + /// unwindowed sinc + @SWS_SCALE_SINC = 6, + /// 3-tap sinc/sinc + @SWS_SCALE_LANCZOS = 7, + /// unwindowned natural cubic spline + @SWS_SCALE_SPLINE = 8, + /// not part of the ABI + @SWS_SCALE_NB = 9, + /// force size to 32 bits, not a valid filter type + @SWS_SCALE_MAX_ENUM = 2147483647, +} + diff --git a/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs index bd78fe60..e3334277 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs @@ -171,23 +171,12 @@ public unsafe partial struct AVCodec public int @capabilities; /// maximum value for lowres supported by the decoder public byte @max_lowres; - [Obsolete("use avcodec_get_supported_config()")] - public AVRational* @supported_framerates; - [Obsolete("use avcodec_get_supported_config()")] - public AVPixelFormat* @pix_fmts; - [Obsolete("use avcodec_get_supported_config()")] - public int* @supported_samplerates; - [Obsolete("use avcodec_get_supported_config()")] - public AVSampleFormat* @sample_fmts; /// AVClass for the private context public AVClass* @priv_class; /// array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN} public AVProfile* @profiles; /// Group name of the codec implementation. This is a short symbolic name of the wrapper backing this codec. A wrapper uses some kind of external implementation for the codec, such as an external library, or a codec implementation provided by the OS or the hardware. If this field is NULL, this is a builtin, libavcodec native codec. If non-NULL, this will be the suffix in AVCodec.name in most cases (usually AVCodec.name will be of the form "<codec_name>_<wrapper_name>"). public byte* @wrapper_name; - /// Array of supported channel layouts, terminated with a zeroed layout. - [Obsolete("use avcodec_get_supported_config()")] - public AVChannelLayout* @ch_layouts; } /// main external API structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user applications. The name string for AVOptions options matches the associated command line parameter name and can be found in libavcodec/options_table.h The AVOption/command line parameter names differ in some cases from the C structure field names for historic reasons or brevity. sizeof(AVCodecContext) must not be used outside libav*. @@ -433,8 +422,6 @@ public unsafe partial struct AVCodecContext public int @profile; /// Encoding level descriptor. - encoding: Set by user, corresponds to a specific level defined by the codec, usually corresponding to the profile level, if not specified it is set to AV_LEVEL_UNKNOWN. - decoding: Set by libavcodec. See AV_LEVEL_* in defs.h. public int @level; - /// Properties of the stream that gets decoded - encoding: unused - decoding: set by libavcodec - public uint @properties; /// Skip loop filtering for selected frames. - encoding: unused - decoding: Set by user. public AVDiscard @skip_loop_filter; /// Skip IDCT/dequantization for selected frames. - encoding: unused - decoding: Set by user. @@ -532,49 +519,50 @@ public unsafe partial struct AVCodecParameters public int @extradata_size; /// Additional data associated with the entire stream. public AVPacketSideData* @coded_side_data; - /// Amount of entries in coded_side_data. + /// Amount of entries in #coded_side_data. public int @nb_coded_side_data; - /// - video: the pixel format, the value corresponds to enum AVPixelFormat. - audio: the sample format, the value corresponds to enum AVSampleFormat. + /// - Video: the pixel format, the value corresponds to enum ::AVPixelFormat. - Audio: the sample format, the value corresponds to enum ::AVSampleFormat. public int @format; /// The average bitrate of the encoded data (in bits per second). public long @bit_rate; /// The number of bits per sample in the codedwords. public int @bits_per_coded_sample; - /// This is the number of valid bits in each output sample. If the sample format has more bits, the least significant bits are additional padding bits, which are always 0. Use right shifts to reduce the sample to its actual size. For example, audio formats with 24 bit samples will have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32. To get the original sample use "(int32_t)sample >> 8"." + /// The number of valid bits in each output sample. public int @bits_per_raw_sample; /// Codec-specific bitstream restrictions that the stream conforms to. public int @profile; public int @level; - /// Video only. The dimensions of the video frame in pixels. + /// The width of the video frame in pixels. public int @width; + /// The height of the video frame in pixels. public int @height; - /// Video only. The aspect ratio (width / height) which a single pixel should have when displayed. + /// The aspect ratio (width/height) which a single pixel should have when displayed. public AVRational @sample_aspect_ratio; - /// Video only. Number of frames per second, for streams with constant frame durations. Should be set to { 0, 1 } when some frames have differing durations or if the value is not known. + /// Number of frames per second, for streams with constant frame durations. Should be set to `{ 0, 1 }` when some frames have differing durations or if the value is not known. public AVRational @framerate; - /// Video only. The order of the fields in interlaced video. + /// The order of the fields in interlaced video. public AVFieldOrder @field_order; - /// Video only. Additional colorspace characteristics. + /// Additional colorspace characteristics. public AVColorRange @color_range; public AVColorPrimaries @color_primaries; public AVColorTransferCharacteristic @color_trc; public AVColorSpace @color_space; public AVChromaLocation @chroma_location; - /// Video only. Number of delayed frames. + /// Number of delayed frames. public int @video_delay; - /// Audio only. The channel layout and number of channels. + /// The channel layout and number of channels. public AVChannelLayout @ch_layout; - /// Audio only. The number of audio samples per second. + /// The number of audio samples per second. public int @sample_rate; - /// Audio only. The number of bytes per coded audio frame, required by some formats. + /// The number of bytes per coded audio frame, required by some formats. public int @block_align; - /// Audio only. Audio frame size, if known. Required by some formats to be static. + /// Audio frame size, if known. Required by some formats to be static. public int @frame_size; - /// Audio only. The amount of padding (in samples) inserted by the encoder at the beginning of the audio. I.e. this number of leading decoded samples must be discarded by the caller to get the original audio without leading padding. + /// Number of padding audio samples at the start. public int @initial_padding; - /// Audio only. The amount of padding (in samples) appended by the encoder to the end of the audio. I.e. this number of decoded samples must be discarded by the caller from the end of the stream to get the original audio without any trailing padding. + /// Number of padding audio samples at the end. public int @trailing_padding; - /// Audio only. Number of samples to skip after a discontinuity. + /// Number of audio samples to skip after a discontinuity. public int @seek_preroll; /// Video with alpha channel only. Alpha channel handling public AVAlphaMode @alpha_mode; @@ -582,13 +570,7 @@ public unsafe partial struct AVCodecParameters public unsafe partial struct AVCodecParser { - public int7 @codec_ids; - /// *************************************************************** All fields below this line are not part of the public API. They may not be used outside of libavcodec and can be changed and removed at will. New public fields should be added right above. **************************************************************** - public int @priv_data_size; - public AVCodecParser_parser_init_func @parser_init; - public AVCodecParser_parser_parse_func @parser_parse; - public AVCodecParser_parser_close_func @parser_close; - public AVCodecParser_split_func @split; + public AVCodecID7 @codec_ids; } public unsafe partial struct AVCodecParserContext @@ -839,6 +821,37 @@ public unsafe partial struct AVDynamicHDRPlus public AVRational25x25 @mastering_display_actual_peak_luminance; } +/// This struct represents dynamic metadata for color volume transform as specified in the SMPTE 2094-50 standard. +public unsafe partial struct AVDynamicHDRSmpte2094App5 +{ + /// Section C.2.1. smpte_st_2094_50_application_info() + public byte @application_version; + public byte @minimum_application_version; + /// Section C.2.2 smpte_st_2094_50_color_volume_transform() + public byte @has_custom_hdr_reference_white_flag; + public byte @has_adaptive_tone_map_flag; + public ushort @hdr_reference_white; + /// Section C.2.3 smpte_st_2094_50_adaptive_tone_map() + public ushort @baseline_hdr_headroom; + public byte @use_reference_white_tone_mapping_flag; + public byte @num_alternate_images; + public byte @gain_application_space_chromaticities_flag; + public byte @has_common_component_mix_params_flag; + public byte @has_common_curve_params_flag; + public ushort8 @gain_application_space_chromaticities; + public ushort4 @alternate_hdr_headrooms; + /// Section C.2.4 smpte_st_2094_50_component_mixing() + public byte4 @component_mixing_type; + public byte4x6 @has_component_mixing_coefficient_flag; + public ushort4x6 @component_mixing_coefficient; + /// Section C.2.5 smpte_st_2094_50_gain_curve() + public byte4 @gain_curve_num_control_points_minus_1; + public byte4 @gain_curve_use_pchip_slope_flag; + public ushort4x32 @gain_curve_control_points_x; + public ushort4x32 @gain_curve_control_points_y; + public ushort4x32 @gain_curve_control_points_theta; +} + /// Filter definition. This defines the pads a filter contains, and all the callback functions used to interact with the filter. public unsafe partial struct AVFilter { @@ -892,20 +905,12 @@ public unsafe partial struct AVFilterContext public int @thread_type; /// Max number of threads allowed in this filter instance. If <= 0, its value is ignored. Overrides global number of threads set per filter graph. public int @nb_threads; - [Obsolete("unused")] - public AVFilterCommand* @command_queue; /// enable expression string public byte* @enable_str; - [Obsolete("unused")] - public void* @enable; - [Obsolete("unused")] - public double* @var_values; /// MUST NOT be accessed from outside avfilter. public int @is_disabled; /// For filters which will create hardware frames, sets the device the filter should create them in. All other filters will ignore this field: in particular, a filter which consumes or processes hardware frames will instead use the hw_frames_ctx field in AVFilterLink to carry the hardware context information. public AVBufferRef* @hw_device_ctx; - [Obsolete("this field should never have been accessed by callers")] - public uint @ready; /// Sets the number of extra hardware frames which the filter will allocate on its output links for use in following filters or by the caller. public int @extra_hw_frames; } @@ -1424,7 +1429,7 @@ public unsafe partial struct AVInputFormat public byte* @name; /// Descriptive name for the format, meant to be more human-readable than name. You should use the NULL_IF_CONFIG_SMALL() macro to define it. public byte* @long_name; - /// Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. + /// Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. public int @flags; /// If extensions are defined, then no probe is done. You should usually not use extension format guessing because it is not reliable enough public byte* @extensions; @@ -1632,7 +1637,7 @@ public unsafe partial struct AVOutputFormat public AVCodecID @video_codec; /// default subtitle codec public AVCodecID @subtitle_codec; - /// can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE + /// can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE, AVFMT_FIXED_FRAMESIZE public int @flags; /// List of supported codec_id-codec_tag pairs, ordered by "better choice first". The arrays are all terminated by AV_CODEC_ID_NONE. public AVCodecTag** @codec_tag; @@ -1669,12 +1674,6 @@ public unsafe partial struct AVPacket public AVRational @time_base; } -public unsafe partial struct AVPacketList -{ - public AVPacket @pkt; - public AVPacketList* @next; -} - /// This structure stores auxiliary information for decoding, presenting, or otherwise processing the coded stream. It is typically exported by demuxers and encoders and can be fed to decoders and muxers either in a per packet basis, or as global side data (applying to the entire coded stream). public unsafe partial struct AVPacketSideData { @@ -1905,21 +1904,35 @@ public unsafe partial struct AVStreamGroup_params [FieldOffset(0)] public AVStreamGroupTileGrid* @tile_grid; [FieldOffset(0)] - public AVStreamGroupLCEVC* @lcevc; + public AVStreamGroupLayeredVideo* @layered_video; + /// deprecated, use layered_video. + [FieldOffset(0)] + public AVStreamGroupLayeredVideo* @lcevc; + [FieldOffset(0)] + public AVStreamGroupTREF* @tref; } -/// AVStreamGroupLCEVC is meant to define the relation between video streams and a data stream containing LCEVC enhancement layer NALUs. -public unsafe partial struct AVStreamGroupLCEVC +/// AVStreamGroupLayeredVideo is meant to define the relation between a base layer video stream and a separate enhancement layer stream that together form a single layered video presentation (for example a video stream and a data stream containing LCEVC enhancement layer NALUs, or Dolby Vision Profile 7 dual-layer encoding). +public unsafe partial struct AVStreamGroupLayeredVideo { public AVClass* @av_class; - /// Index of the LCEVC data stream in AVStreamGroup. - public uint @lcevc_index; + public AVStreamGroupLayeredVideo_union0 @union0; /// Width of the final stream for presentation. public int @width; /// Height of the final image for presentation. public int @height; } +[StructLayout(LayoutKind.Explicit)] +public unsafe partial struct AVStreamGroupLayeredVideo_union0 +{ + [FieldOffset(0)] + public uint @el_index; + /// Alias for el_index, kept for backward compatibility. + [FieldOffset(0)] + public uint @lcevc_index; +} + /// AVStreamGroupTileGrid holds information on how to combine several independent images on a single canvas for presentation. public unsafe partial struct AVStreamGroupTileGrid { @@ -1958,6 +1971,14 @@ public unsafe partial struct AVStreamGroupTileGrid_offsets public int @vertical; } +/// AVStreamGroupTREF is meant to define the relation between video, audio, or subtitle streams, and a data stream containing metadata. +public unsafe partial struct AVStreamGroupTREF +{ + public AVClass* @av_class; + /// Index of the metadata stream in the AVStreamGroup. + public uint @metadata_index; +} + public unsafe partial struct AVSubtitle { public ushort @format; @@ -2440,7 +2461,6 @@ public unsafe partial struct SwsContext public void* @opaque; /// Bitmask of SWS_*. See `SwsFlags` for details. public uint @flags; - /// Extra parameters for fine-tuning certain scalers. public double2 @scaler_params; /// How many threads to use for processing, or 0 for automatic selection. public int @threads; @@ -2476,6 +2496,12 @@ public unsafe partial struct SwsContext public int @dst_h_chr_pos; /// Desired ICC intent for color space conversions. public int @intent; + /// Scaling filter. If set to something other than SWS_SCALE_AUTO, this will override the filter implied by `SwsContext.flags`. + public SwsScaler @scaler; + /// Scaler used specifically for up/downsampling subsampled (chroma) planes. If set to something other than SWS_SCALE_AUTO, this will override the filter implied by `SwsContext.scaler`. Otherwise, the same filter will be used for both main scaling and chroma subsampling. + public SwsScaler @scaler_sub; + /// Bitmask of SWS_BACKEND_*. If non-zero, this will restrict the available backends to the specified set. If left as zero, a default set of backends will be selected automatically (based on SWS_UNSTABLE). + public SwsBackend @backends; } public unsafe partial struct SwsFilter @@ -2550,11 +2576,6 @@ public unsafe partial struct AVFilterChannelLayouts { } -/// This struct is incomplete. -public unsafe partial struct AVFilterCommand -{ -} - /// This struct is incomplete. public unsafe partial struct AVFilterFormats { diff --git a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs index 155e226c..17a74f4e 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs @@ -740,6 +740,29 @@ public static unsafe partial class ffmpeg /// >= 0 on success. Otherwise, returns the appropriate AVERROR. public static int av_dynamic_hdr_plus_to_t35(AVDynamicHDRPlus* @s, byte** @data, ulong* @size) => vectors.av_dynamic_hdr_plus_to_t35(@s, @data, @size); + /// Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to default values. The resulting struct can be freed using av_freep(). + /// An AVDynamicHDRSmpte2094App5 filled with default values or NULL on failure. + public static AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc(ulong* @size) => vectors.av_dynamic_hdr_smpte2094_app5_alloc(@size); + + /// Allocate a complete AVDynamicHDRSmpte2094App5 and add it to the frame. + /// The frame which side data is added to. + /// The AVDynamicHDRSmpte2094App5 structure to be filled by caller or NULL on failure. + public static AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data(AVFrame* @frame) => vectors.av_dynamic_hdr_smpte2094_app5_create_side_data(@frame); + + /// Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5. + /// A pointer containing the decoded AVDynamicHDRSmpte2094App5 structure. + /// The byte array containing the raw ITU-T T.35 data. + /// Size of the data array in bytes. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + public static int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size) => vectors.av_dynamic_hdr_smpte2094_app5_from_t35(@s, @data, @size); + + /// Serialize dynamic SMPTE-2094-50 metadata to a ITU-T T.35 message. Excluding the country_code, provider_code and provider_oriented_code. + /// A pointer containing the AVDynamicHDRSmpte2094App5 data. + /// A pointer to pointer to a byte buffer to be filled with the serialized metadata. If *data is NULL, a buffer be will be allocated and a pointer to it stored in its place. The caller assumes ownership of the buffer. May be NULL, in which case the function will only store the required buffer size in *size. + /// A pointer to a size to be set to the returned buffer's size. If *data is not NULL, *size must contain the size of the input buffer. May be NULL only if *data is NULL. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + public static int av_dynamic_hdr_smpte2094_app5_to_t35(AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size) => vectors.av_dynamic_hdr_smpte2094_app5_to_t35(@s, @data, @size); + /// Add the pointer to an element to a dynamic array. /// Pointer to the array to grow /// Pointer to the number of elements in the array @@ -1008,7 +1031,7 @@ public static unsafe partial class ffmpeg /// frame duration, in samples, if known. 0 if not able to determine. public static int av_get_audio_frame_duration(AVCodecContext* @avctx, int @frame_bytes) => vectors.av_get_audio_frame_duration(@avctx, @frame_bytes); - /// This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters instead of an AVCodecContext. + /// This function is the same as ::av_get_audio_frame_duration(), except it works with ::AVCodecParameters instead of an ::AVCodecContext. public static int av_get_audio_frame_duration2(AVCodecParameters* @par, int @frame_bytes) => vectors.av_get_audio_frame_duration2(@par, @frame_bytes); /// Return the number of bits per pixel used by the pixel format described by pixdesc. Note that this is not the same as the number of bits per sample. @@ -1116,7 +1139,7 @@ public static unsafe partial class ffmpeg /// the buffer where to write the string /// the size of buf /// the number of the sample format to print the corresponding info string, or a negative value to print the corresponding header. - /// the pointer to the filled buffer or NULL if sample_fmt is unknown or in case of other errors + /// the pointer to the filled buffer or NULL in case of other errors public static byte* av_get_sample_fmt_string(byte* @buf, int @buf_size, AVSampleFormat @sample_fmt) => vectors.av_get_sample_fmt_string(@buf, @buf_size, @sample_fmt); /// Return the fractional representation of the internal time base. @@ -1449,14 +1472,6 @@ public static unsafe partial class ffmpeg /// Video input devices iterator. public static AVInputFormat* av_input_video_device_next(AVInputFormat* @d) => vectors.av_input_video_device_next(@d); - /// Compute the length of an integer list. - /// size in bytes of each list element (only 1, 2, 4 or 8) - /// pointer to the list - /// list terminator (usually 0 or -1) - /// length of the list, in elements, not counting the terminator - [Obsolete()] - public static uint av_int_list_length_for_size(uint @elsize, void* @list, ulong @term) => vectors.av_int_list_length_for_size(@elsize, @list, @term); - /// Write a packet to an output media file ensuring correct interleaving. /// media file handle /// The packet containing the data to be written. If the packet is reference-counted, this function will take ownership of this reference and unreference it later when it sees 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. Packet's "stream_index" field must be set to the index of the corresponding stream in "s->streams". The timestamps ( "pts", "dts") must be set to correct values in the stream's timebase (unless the output format is flagged with the AVFMT_NOTIMESTAMPS flag, then they can be set to AV_NOPTS_VALUE). 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). "duration" should also be set if known. @@ -1737,10 +1752,6 @@ public static unsafe partial class ffmpeg /// next AVOption or NULL public static AVOption* av_opt_next(void* @obj, AVOption* @prev) => vectors.av_opt_next(@obj, @prev); - /// Gets a pointer to the requested field in a struct. This function allows accessing a struct even when its fields are moved or renamed since the application making the access has been compiled, - [Obsolete("direct access to AVOption-exported fields is not supported")] - public static void* av_opt_ptr(AVClass* @avclass, void* @obj, string @name) => vectors.av_opt_ptr(@avclass, @obj, @name); - /// Get a list of allowed ranges for the given option. /// is a bitmask of flags, undefined flags should not be set and should be ignored AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, /// number of components returned on success, a negative error code otherwise @@ -1993,7 +2004,7 @@ public static unsafe partial class ffmpeg public static void av_parser_close(AVCodecParserContext* @s) => vectors.av_parser_close(@s); - public static AVCodecParserContext* av_parser_init(int @codec_id) => vectors.av_parser_init(@codec_id); + public static AVCodecParserContext* av_parser_init(AVCodecID @codec_id) => vectors.av_parser_init(@codec_id); /// Iterate over all registered codec parsers. /// a pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration. @@ -2088,6 +2099,21 @@ public static unsafe partial class ffmpeg public static void av_program_add_stream_index(AVFormatContext* @ac, int @progid, uint @idx) => vectors.av_program_add_stream_index(@ac, @progid, @idx); + /// Add the supplied index of a stream to the AVProgram with matching id. + /// the format context which contains the target AVProgram + /// the ID of the AVProgram whose stream index is to be updated + /// the index of the stream to be added + /// >=0 upon successful addition or if index was already present, AVERROR if no matching program is found or stream index is invalid or the stream index array reallocation failed. + public static int av_program_add_stream_index2(AVFormatContext* @ac, int @progid, uint @idx) => vectors.av_program_add_stream_index2(@ac, @progid, @idx); + + /// Copy an AVProgram from one AVFormatContext to another. + /// pointer to the target muxer context + /// pointer to the source muxer context + /// ID of the program to be copied + /// combination of flags which determine how streams are matched and whether pre-existing AVProgram in target is overwritten. If no match condition is set, streams will be matched by ids if all source stream ids are non-zero and unique, else by index. + /// >= 0 in case of success, Error EEXIST if target already has program with same ID and overwrite flag isn't set, else a negative AVERROR code in case of other failures. + public static int av_program_copy(AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags) => vectors.av_program_copy(@dst, @src, @progid, @flags); + /// Convert an AVRational to a IEEE 32-bit `float` expressed in fixed-point format. /// Rational to be converted /// Equivalent floating-point value, expressed as an unsigned 32-bit integer. @@ -2275,9 +2301,6 @@ public static unsafe partial class ffmpeg /// Get the AVClass for AVStream. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. public static AVClass* av_stream_get_class() => vectors.av_stream_get_class(); - [Obsolete("do not call this function")] - public static AVRational av_stream_get_codec_timebase(AVStream* @st) => vectors.av_stream_get_codec_timebase(@st); - public static AVCodecParserContext* av_stream_get_parser(AVStream* @s) => vectors.av_stream_get_parser(@s); /// Get the AVClass for AVStreamGroup. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. @@ -2615,14 +2638,14 @@ public static unsafe partial class ffmpeg /// zero on success, a negative value on error public static int avcodec_open2(AVCodecContext* @avctx, AVCodec* @codec, AVDictionary** @options) => vectors.avcodec_open2(@avctx, @codec, @options); - /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with avcodec_parameters_free(). + /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with ::avcodec_parameters_free(). public static AVCodecParameters* avcodec_parameters_alloc() => vectors.avcodec_parameters_alloc(); /// Copy the contents of src to dst. Any allocated fields in dst are freed and replaced with newly allocated duplicates of the corresponding fields in src. /// >= 0 on success, a negative AVERROR code on failure. public static int avcodec_parameters_copy(AVCodecParameters* @dst, AVCodecParameters* @src) => vectors.avcodec_parameters_copy(@dst, @src); - /// Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied pointer. + /// Free an AVCodecParameters instance and everything associated with it and write `NULL` to the supplied pointer. public static void avcodec_parameters_free(AVCodecParameters** @par) => vectors.avcodec_parameters_free(@par); /// Fill the parameters struct based on the values from the supplied codec context. Any allocated fields in par are freed and replaced with duplicates of the corresponding fields in codec. @@ -3072,9 +3095,6 @@ public static unsafe partial class ffmpeg /// a string identifying the stream group type, or NULL if unknown public static string avformat_stream_group_name(AVStreamGroupParamsType @type) => vectors.avformat_stream_group_name(@type); - [Obsolete("do not call this function")] - public static int avformat_transfer_internal_stream_timing_info(AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb) => vectors.avformat_transfer_internal_stream_timing_info(@ofmt, @ost, @ist, @copy_tb); - /// Return the LIBAVFORMAT_VERSION_INT constant. public static uint avformat_version() => vectors.avformat_version(); @@ -3615,7 +3635,7 @@ public static unsafe partial class ffmpeg /// A positive integer if supported, 0 otherwise. public static int sws_test_colorspace(AVColorSpace @colorspace, int @output) => vectors.sws_test_colorspace(@colorspace, @output); - /// Test if a given (software) pixel format is supported. + /// Test if a given (software) pixel format is supported by any backend, excluding unstable backends. /// The format to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. @@ -3624,7 +3644,7 @@ public static unsafe partial class ffmpeg /// Helper function to run all sws_test_* against a frame, as well as testing the basic frame properties for sanity. Ignores irrelevant properties - for example, AVColorSpace is not checked for RGB frames. public static int sws_test_frame(AVFrame* @frame, int @output) => vectors.sws_test_frame(@frame, @output); - /// Test if a given hardware pixel format is supported. + /// Test if a given hardware pixel format is supported by any backend, excluding unstable backends. /// The hardware format to check, or AV_PIX_FMT_NONE. /// A positive integer if supported or AV_PIX_FMT_NONE, 0 otherwise. public static int sws_test_hw_format(AVPixelFormat @format) => vectors.sws_test_hw_format(@format); diff --git a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.inline.g.cs b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.inline.g.cs index 81411b27..ba959444 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.inline.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.inline.g.cs @@ -243,13 +243,6 @@ public static AVRational av_make_q(int @num, int @den) } // original body hash: IAPYNNcg3GX0PGxINeLQhb41dH921lPVKcnqxCk7ERA= - [Obsolete()] - public static uint av_mod_uintp2_c(uint @a, uint @p) -{ - return av_zero_extend_c(a, p); -} - // original body hash: MfDd5KRKGNiwvccdrrbME05wNKCRzGTF1T24OggAyp0= - public static int av_parity_c(uint @v) { return av_popcount_c(v) & 1; diff --git a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs index d2ff644b..2f563a74 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs @@ -319,6 +319,8 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_FLAG2_EXPORT_MVS = 0x1 << 0x1c; /// AV_CODEC_FLAG2_FAST = 0x1 << 0x0 public const int AV_CODEC_FLAG2_FAST = 0x1 << 0x0; + /// AV_CODEC_FLAG2_FIXED_FRAME_SIZE = 0x1 << 0x11 + public const int AV_CODEC_FLAG2_FIXED_FRAME_SIZE = 0x1 << 0x11; /// AV_CODEC_FLAG2_ICC_PROFILES = 0x1U << 0x1f public const uint AV_CODEC_FLAG2_ICC_PROFILES = 0x1U << 0x1f; /// AV_CODEC_FLAG2_IGNORE_CROP = 0x1 << 0x10 @@ -334,9 +336,9 @@ public static unsafe partial class ffmpeg /// AV_CODEC_FLAG2_SKIP_MANUAL = 0x1 << 0x1d public const int AV_CODEC_FLAG2_SKIP_MANUAL = 0x1 << 0x1d; /// AV_CODEC_ID_H265 = AV_CODEC_ID_HEVC - public static readonly int AV_CODEC_ID_H265 = 173; + public static readonly int AV_CODEC_ID_H265 = 172; /// AV_CODEC_ID_H266 = AV_CODEC_ID_VVC - public static readonly int AV_CODEC_ID_H266 = 196; + public static readonly int AV_CODEC_ID_H266 = 195; /// AV_CODEC_ID_IFF_BYTERUN1 = AV_CODEC_ID_IFF_ILBM public static readonly int AV_CODEC_ID_IFF_BYTERUN1 = 136; /// AV_CODEC_PROP_BITMAP_SUB = 0x1 << 0x10 @@ -399,6 +401,8 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_CMOV = 0x1000; /// AV_CPU_FLAG_DOTPROD = 0x1 << 0x8 public const int AV_CPU_FLAG_DOTPROD = 0x1 << 0x8; + /// AV_CPU_FLAG_EOR3 = 0x1 << 0x12 + public const int AV_CPU_FLAG_EOR3 = 0x1 << 0x12; /// AV_CPU_FLAG_FMA3 = 0x10000 public const int AV_CPU_FLAG_FMA3 = 0x10000; /// AV_CPU_FLAG_FMA4 = 0x800 @@ -423,6 +427,8 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_MSA = 0x1 << 0x1; /// AV_CPU_FLAG_NEON = 0x1 << 0x5 public const int AV_CPU_FLAG_NEON = 0x1 << 0x5; + /// AV_CPU_FLAG_PMULL = 0x1 << 0x11 + public const int AV_CPU_FLAG_PMULL = 0x1 << 0x11; /// AV_CPU_FLAG_POWER8 = 0x4 public const int AV_CPU_FLAG_POWER8 = 0x4; /// AV_CPU_FLAG_RV_MISALIGNED = 0x1 << 0xa @@ -431,14 +437,8 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_RV_ZVBB = 0x1 << 0x9; /// AV_CPU_FLAG_RVB = 0x1 << 0xb public const int AV_CPU_FLAG_RVB = 0x1 << 0xb; - /// AV_CPU_FLAG_RVB_ADDR = 0x1 << 0x8 - public const int AV_CPU_FLAG_RVB_ADDR = 0x1 << 0x8; /// AV_CPU_FLAG_RVB_BASIC = 0x1 << 0x7 public const int AV_CPU_FLAG_RVB_BASIC = 0x1 << 0x7; - /// AV_CPU_FLAG_RVD = 0x1 << 0x2 - public const int AV_CPU_FLAG_RVD = 0x1 << 0x2; - /// AV_CPU_FLAG_RVF = 0x1 << 0x1 - public const int AV_CPU_FLAG_RVF = 0x1 << 0x1; /// AV_CPU_FLAG_RVI = 0x1 << 0x0 public const int AV_CPU_FLAG_RVI = 0x1 << 0x0; /// AV_CPU_FLAG_RVV_F32 = 0x1 << 0x4 @@ -567,6 +567,12 @@ public static unsafe partial class ffmpeg /// AV_ERROR_MAX_STRING_SIZE = 64 public const int AV_ERROR_MAX_STRING_SIZE = 0x40; // public static av_extern_inline = inline; + // public static av_fallthrough = __attribute__((fallthrough)); + /// AV_FDEBUG_ID3V2 = 0x0002 + public const int AV_FDEBUG_ID3V2 = 0x2; + /// AV_FDEBUG_TS = 0x0001 + public const int AV_FDEBUG_TS = 0x1; + // public static av_flatten = __attribute__((flatten)); /// AV_FOURCC_MAX_STRING_SIZE = 32 public const int AV_FOURCC_MAX_STRING_SIZE = 0x20; // public static av_fourcc2str = (fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc); @@ -620,7 +626,6 @@ public static unsafe partial class ffmpeg public const int AV_HWACCEL_FLAG_UNSAFE_OUTPUT = 0x1 << 0x3; /// AV_INPUT_BUFFER_PADDING_SIZE = 64 public const int AV_INPUT_BUFFER_PADDING_SIZE = 0x40; - // public static av_int_list_length = list; // public static AV_IS_INPUT_DEVICE = (category)((category)(==41) || (category)(==43) || (category)(==45)); // public static AV_IS_OUTPUT_DEVICE = (category)((category)(==40) || (category)(==42) || (category)(==44)); // public static AV_JOIN = a; @@ -655,7 +660,6 @@ public static unsafe partial class ffmpeg public const int AV_LOG_VERBOSE = 0x28; /// AV_LOG_WARNING = 24 public const int AV_LOG_WARNING = 0x18; - // public static av_mod_uintp2 = av_mod_uintp2_c; // public static AV_NE = be; // public static av_noinline = __attribute__((noinline)); /// AV_NOPTS_VALUE = ((int64_t)UINT64_C(0x8000000000000000)) @@ -704,7 +708,6 @@ public static unsafe partial class ffmpeg public const int AV_OPT_SERIALIZE_SEARCH_CHILDREN = 0x4; /// AV_OPT_SERIALIZE_SKIP_DEFAULTS = 0x00000001 public const int AV_OPT_SERIALIZE_SKIP_DEFAULTS = 0x1; - // public static av_opt_set_int_list = (obj, name, val, term, flags) (av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? AVERROR(EINVAL) : av_opt_set_bin(obj, name, (const uint8_t *)(val), av_int_list_length(val, term) * sizeof(*(val)), flags)); // public static av_parity = av_parity_c; /// AV_PARSER_PTS_NB = 0x4 public const int AV_PARSER_PTS_NB = 0x4; @@ -1320,6 +1323,8 @@ public static unsafe partial class ffmpeg public const int AVFMT_EVENT_FLAG_METADATA_UPDATED = 0x1; /// AVFMT_EXPERIMENTAL = 0x0004 public const int AVFMT_EXPERIMENTAL = 0x4; + /// AVFMT_FIXED_FRAMESIZE = 0x80000 + public const int AVFMT_FIXED_FRAMESIZE = 0x80000; /// AVFMT_FLAG_AUTO_BSF = 0x200000 public const int AVFMT_FLAG_AUTO_BSF = 0x200000; /// AVFMT_FLAG_BITEXACT = 0x0400 @@ -1368,6 +1373,12 @@ public static unsafe partial class ffmpeg public const int AVFMT_NOSTREAMS = 0x1000; /// AVFMT_NOTIMESTAMPS = 0x0080 public const int AVFMT_NOTIMESTAMPS = 0x80; + /// AVFMT_PROGCOPY_MATCH_BY_ID = (1 << 0) + public const int AVFMT_PROGCOPY_MATCH_BY_ID = 0x1 << 0x0; + /// AVFMT_PROGCOPY_MATCH_BY_INDEX = (1 << 1) + public const int AVFMT_PROGCOPY_MATCH_BY_INDEX = 0x1 << 0x1; + /// AVFMT_PROGCOPY_OVERWRITE = (1 << 8) + public const int AVFMT_PROGCOPY_OVERWRITE = 0x1 << 0x8; /// AVFMT_SEEK_TO_PTS = 0x4000000 public const int AVFMT_SEEK_TO_PTS = 0x4000000; /// AVFMT_SHOW_IDS = 0x0008 @@ -1439,55 +1450,28 @@ public static unsafe partial class ffmpeg public const int AVSTREAM_INIT_IN_INIT_OUTPUT = 0x1; /// AVSTREAM_INIT_IN_WRITE_HEADER = 0 public const int AVSTREAM_INIT_IN_WRITE_HEADER = 0x0; + // public static AVStreamGroupLCEVC = AVStreamGroupLayeredVideo; // public static AVUNERROR = (e) (-(e)); - /// FF_API_ALSA_CHANNELS = (LIBAVDEVICE_VERSION_MAJOR < 63) - public const bool FF_API_ALSA_CHANNELS = LIBAVDEVICE_VERSION_MAJOR < 0x3f; - /// FF_API_ASSERT_FPU = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_ASSERT_FPU = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_BUFFERSINK_OPTS = LIBAVFILTER_VERSION_MAJOR < 0xc - public const bool FF_API_BUFFERSINK_OPTS = LIBAVFILTER_VERSION_MAJOR < 0xc; - /// FF_API_CODEC_PROPS = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_CODEC_PROPS = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 63) - public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x3f; - /// FF_API_CONTEXT_PUBLIC = LIBAVFILTER_VERSION_MAJOR < 0xc - public const bool FF_API_CONTEXT_PUBLIC = LIBAVFILTER_VERSION_MAJOR < 0xc; - /// FF_API_CPU_FLAG_FORCE = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_CPU_FLAG_FORCE = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_DOVI_L11_INVALID_PROPS = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_DOVI_L11_INVALID_PROPS = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_EXR_GAMMA = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_EXR_GAMMA = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_INTERNAL_TIMING = (LIBAVFORMAT_VERSION_MAJOR < 63) - public const bool FF_API_INTERNAL_TIMING = LIBAVFORMAT_VERSION_MAJOR < 0x3f; - /// FF_API_INTRA_DC_PRECISION = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_INTRA_DC_PRECISION = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_LIBNPP_SUPPORT = LIBAVFILTER_VERSION_MAJOR < 0xc - public const bool FF_API_LIBNPP_SUPPORT = LIBAVFILTER_VERSION_MAJOR < 0xc; - /// FF_API_MOD_UINTP2 = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_MOD_UINTP2 = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_NO_DEFAULT_TLS_VERIFY = (LIBAVFORMAT_VERSION_MAJOR < 63) - public const bool FF_API_NO_DEFAULT_TLS_VERIFY = LIBAVFORMAT_VERSION_MAJOR < 0x3f; - /// FF_API_NVDEC_OLD_PIX_FMTS = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_NVDEC_OLD_PIX_FMTS = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_OPT_INT_LIST = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_OPT_INT_LIST = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_OPT_PTR = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_OPT_PTR = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_PARSER_CODECID = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_PARSER_CODECID = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_PARSER_PRIVATE = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_PARSER_PRIVATE = LIBAVCODEC_VERSION_MAJOR < 0x3f; + /// FF_API_ASSERT_FPU = (LIBAVUTIL_VERSION_MAJOR < 62) + public const bool FF_API_ASSERT_FPU = LIBAVUTIL_VERSION_MAJOR < 0x3e; + /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 64) + public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x40; + /// FF_API_CPU_FLAG_FORCE = (LIBAVUTIL_VERSION_MAJOR < 62) + public const bool FF_API_CPU_FLAG_FORCE = LIBAVUTIL_VERSION_MAJOR < 0x3e; + /// FF_API_DOVI_L11_INVALID_PROPS = (LIBAVUTIL_VERSION_MAJOR < 62) + public const bool FF_API_DOVI_L11_INVALID_PROPS = LIBAVUTIL_VERSION_MAJOR < 0x3e; + /// FF_API_FDEBUG_TS = (LIBAVFORMAT_VERSION_MAJOR < 64) + public const bool FF_API_FDEBUG_TS = LIBAVFORMAT_VERSION_MAJOR < 0x40; + /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 64) + public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x40; + /// FF_API_INTRA_DC_PRECISION = (LIBAVCODEC_VERSION_MAJOR < 64) + public const bool FF_API_INTRA_DC_PRECISION = LIBAVCODEC_VERSION_MAJOR < 0x40; + /// FF_API_LCEVC_STRUCT = (LIBAVFORMAT_VERSION_MAJOR < 64) + public const bool FF_API_LCEVC_STRUCT = LIBAVFORMAT_VERSION_MAJOR < 0x40; + /// FF_API_MJPEG_EXTERN_HUFF = (LIBAVCODEC_VERSION_MAJOR < 64) + public const bool FF_API_MJPEG_EXTERN_HUFF = LIBAVCODEC_VERSION_MAJOR < 0x40; /// FF_API_R_FRAME_RATE = 1 public const int FF_API_R_FRAME_RATE = 0x1; - /// FF_API_RISCV_FD_ZBA = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_RISCV_FD_ZBA = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_V408_CODECID = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_V408_CODECID = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_VULKAN_FIXED_QUEUES = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_VULKAN_FIXED_QUEUES = LIBAVUTIL_VERSION_MAJOR < 0x3d; /// FF_API_VULKAN_SYNC_QUEUES = (LIBAVUTIL_VERSION_MAJOR < 62) public const bool FF_API_VULKAN_SYNC_QUEUES = LIBAVUTIL_VERSION_MAJOR < 0x3e; // public static FF_ARRAY_ELEMS = (a) (sizeof(a) / sizeof((a)[0])); @@ -1556,18 +1540,6 @@ public static unsafe partial class ffmpeg public const int FF_CMP_W97 = 0xc; /// FF_CMP_ZERO = 0x7 public const int FF_CMP_ZERO = 0x7; - /// FF_CODEC_OMX = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_CODEC_OMX = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_CODEC_PROPERTY_CLOSED_CAPTIONS = 0x2 - public const int FF_CODEC_PROPERTY_CLOSED_CAPTIONS = 0x2; - /// FF_CODEC_PROPERTY_FILM_GRAIN = 0x4 - public const int FF_CODEC_PROPERTY_FILM_GRAIN = 0x4; - /// FF_CODEC_PROPERTY_LOSSLESS = 0x1 - public const int FF_CODEC_PROPERTY_LOSSLESS = 0x1; - /// FF_CODEC_SONIC_DEC = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_CODEC_SONIC_DEC = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_CODEC_SONIC_ENC = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_CODEC_SONIC_ENC = LIBAVCODEC_VERSION_MAJOR < 0x3f; /// FF_COMPLIANCE_EXPERIMENTAL = -2 public const int FF_COMPLIANCE_EXPERIMENTAL = -0x2; /// FF_COMPLIANCE_NORMAL = 0 @@ -1638,8 +1610,8 @@ public static unsafe partial class ffmpeg public const int FF_EC_FAVOR_INTER = 0x100; /// FF_EC_GUESS_MVS = 0x1 public const int FF_EC_GUESS_MVS = 0x1; - /// FF_FDEBUG_TS = 0x0001 - public const int FF_FDEBUG_TS = 0x1; + /// FF_FDEBUG_TS = AV_FDEBUG_TS + public const int FF_FDEBUG_TS = AV_FDEBUG_TS; /// FF_IDCT_ALTIVEC = 0x8 public const int FF_IDCT_ALTIVEC = 0x8; /// FF_IDCT_ARM = 0x7 @@ -1735,12 +1707,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVCODEC_VERSION = AV_VERSION(LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO); /// LIBAVCODEC_VERSION_INT = AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) public static readonly int LIBAVCODEC_VERSION_INT = AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO); - /// LIBAVCODEC_VERSION_MAJOR = 62 - public const int LIBAVCODEC_VERSION_MAJOR = 0x3e; - /// LIBAVCODEC_VERSION_MICRO = 0x64 - public const int LIBAVCODEC_VERSION_MICRO = 0x64; - /// LIBAVCODEC_VERSION_MINOR = 0x1c - public const int LIBAVCODEC_VERSION_MINOR = 0x1c; + /// LIBAVCODEC_VERSION_MAJOR = 63 + public const int LIBAVCODEC_VERSION_MAJOR = 0x3f; + /// LIBAVCODEC_VERSION_MICRO = 0x65 + public const int LIBAVCODEC_VERSION_MICRO = 0x65; + /// LIBAVCODEC_VERSION_MINOR = 0x1 + public const int LIBAVCODEC_VERSION_MINOR = 0x1; /// LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT public static readonly int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT; /// LIBAVDEVICE_IDENT = "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) @@ -1749,12 +1721,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVDEVICE_VERSION = AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO); /// LIBAVDEVICE_VERSION_INT = AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO) public static readonly int LIBAVDEVICE_VERSION_INT = AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO); - /// LIBAVDEVICE_VERSION_MAJOR = 62 - public const int LIBAVDEVICE_VERSION_MAJOR = 0x3e; - /// LIBAVDEVICE_VERSION_MICRO = 100 - public const int LIBAVDEVICE_VERSION_MICRO = 0x64; - /// LIBAVDEVICE_VERSION_MINOR = 3 - public const int LIBAVDEVICE_VERSION_MINOR = 0x3; + /// LIBAVDEVICE_VERSION_MAJOR = 63 + public const int LIBAVDEVICE_VERSION_MAJOR = 0x3f; + /// LIBAVDEVICE_VERSION_MICRO = 101 + public const int LIBAVDEVICE_VERSION_MICRO = 0x65; + /// LIBAVDEVICE_VERSION_MINOR = 1 + public const int LIBAVDEVICE_VERSION_MINOR = 0x1; /// LIBAVFILTER_BUILD = LIBAVFILTER_VERSION_INT public static readonly int LIBAVFILTER_BUILD = LIBAVFILTER_VERSION_INT; /// LIBAVFILTER_IDENT = "Lavfi" @@ -1763,12 +1735,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVFILTER_VERSION = AV_VERSION(LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO); /// LIBAVFILTER_VERSION_INT = AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO) public static readonly int LIBAVFILTER_VERSION_INT = AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO); - /// LIBAVFILTER_VERSION_MAJOR = 0xb - public const int LIBAVFILTER_VERSION_MAJOR = 0xb; - /// LIBAVFILTER_VERSION_MICRO = 0x64 - public const int LIBAVFILTER_VERSION_MICRO = 0x64; - /// LIBAVFILTER_VERSION_MINOR = 0xe - public const int LIBAVFILTER_VERSION_MINOR = 0xe; + /// LIBAVFILTER_VERSION_MAJOR = 0xc + public const int LIBAVFILTER_VERSION_MAJOR = 0xc; + /// LIBAVFILTER_VERSION_MICRO = 0x65 + public const int LIBAVFILTER_VERSION_MICRO = 0x65; + /// LIBAVFILTER_VERSION_MINOR = 0x1 + public const int LIBAVFILTER_VERSION_MINOR = 0x1; /// LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT public static readonly int LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT; /// LIBAVFORMAT_IDENT = "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -1777,12 +1749,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVFORMAT_VERSION = AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO); /// LIBAVFORMAT_VERSION_INT = AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO) public static readonly int LIBAVFORMAT_VERSION_INT = AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO); - /// LIBAVFORMAT_VERSION_MAJOR = 62 - public const int LIBAVFORMAT_VERSION_MAJOR = 0x3e; - /// LIBAVFORMAT_VERSION_MICRO = 100 - public const int LIBAVFORMAT_VERSION_MICRO = 0x64; - /// LIBAVFORMAT_VERSION_MINOR = 12 - public const int LIBAVFORMAT_VERSION_MINOR = 0xc; + /// LIBAVFORMAT_VERSION_MAJOR = 63 + public const int LIBAVFORMAT_VERSION_MAJOR = 0x3f; + /// LIBAVFORMAT_VERSION_MICRO = 101 + public const int LIBAVFORMAT_VERSION_MICRO = 0x65; + /// LIBAVFORMAT_VERSION_MINOR = 1 + public const int LIBAVFORMAT_VERSION_MINOR = 0x1; /// LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT public static readonly int LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT; /// LIBAVUTIL_IDENT = "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) @@ -1791,12 +1763,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVUTIL_VERSION = AV_VERSION(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO); /// LIBAVUTIL_VERSION_INT = AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO) public static readonly int LIBAVUTIL_VERSION_INT = AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO); - /// LIBAVUTIL_VERSION_MAJOR = 60 - public const int LIBAVUTIL_VERSION_MAJOR = 0x3c; - /// LIBAVUTIL_VERSION_MICRO = 100 - public const int LIBAVUTIL_VERSION_MICRO = 0x64; - /// LIBAVUTIL_VERSION_MINOR = 26 - public const int LIBAVUTIL_VERSION_MINOR = 0x1a; + /// LIBAVUTIL_VERSION_MAJOR = 61 + public const int LIBAVUTIL_VERSION_MAJOR = 0x3d; + /// LIBAVUTIL_VERSION_MICRO = 101 + public const int LIBAVUTIL_VERSION_MICRO = 0x65; + /// LIBAVUTIL_VERSION_MINOR = 1 + public const int LIBAVUTIL_VERSION_MINOR = 0x1; /// LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT public static readonly int LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT; /// LIBSWRESAMPLE_IDENT = "SwR" @@ -1805,12 +1777,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBSWRESAMPLE_VERSION = AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO); /// LIBSWRESAMPLE_VERSION_INT = AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO) public static readonly int LIBSWRESAMPLE_VERSION_INT = AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO); - /// LIBSWRESAMPLE_VERSION_MAJOR = 0x6 - public const int LIBSWRESAMPLE_VERSION_MAJOR = 0x6; - /// LIBSWRESAMPLE_VERSION_MICRO = 0x64 - public const int LIBSWRESAMPLE_VERSION_MICRO = 0x64; - /// LIBSWRESAMPLE_VERSION_MINOR = 0x3 - public const int LIBSWRESAMPLE_VERSION_MINOR = 0x3; + /// LIBSWRESAMPLE_VERSION_MAJOR = 0x7 + public const int LIBSWRESAMPLE_VERSION_MAJOR = 0x7; + /// LIBSWRESAMPLE_VERSION_MICRO = 0x65 + public const int LIBSWRESAMPLE_VERSION_MICRO = 0x65; + /// LIBSWRESAMPLE_VERSION_MINOR = 0x1 + public const int LIBSWRESAMPLE_VERSION_MINOR = 0x1; /// LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT public static readonly int LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT; /// LIBSWSCALE_IDENT = "SwS" @@ -1819,12 +1791,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBSWSCALE_VERSION = AV_VERSION(LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO); /// LIBSWSCALE_VERSION_INT = AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO) public static readonly int LIBSWSCALE_VERSION_INT = AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO); - /// LIBSWSCALE_VERSION_MAJOR = 0x9 - public const int LIBSWSCALE_VERSION_MAJOR = 0x9; - /// LIBSWSCALE_VERSION_MICRO = 0x64 - public const int LIBSWSCALE_VERSION_MICRO = 0x64; - /// LIBSWSCALE_VERSION_MINOR = 0x5 - public const int LIBSWSCALE_VERSION_MINOR = 0x5; + /// LIBSWSCALE_VERSION_MAJOR = 0xa + public const int LIBSWSCALE_VERSION_MAJOR = 0xa; + /// LIBSWSCALE_VERSION_MICRO = 0x65 + public const int LIBSWSCALE_VERSION_MICRO = 0x65; + /// LIBSWSCALE_VERSION_MINOR = 0x1 + public const int LIBSWSCALE_VERSION_MINOR = 0x1; /// M_1_PI = 0.31830988618379067154 public const double M_1_PI = 0.3183098861837907D; /// M_1_PIf = 0.31830988618379067154f @@ -1917,6 +1889,8 @@ public static unsafe partial class ffmpeg public const int SWS_CS_SMPTE240M = 0x7; /// SWS_MAX_REDUCE_CUTOFF = 0.002D public const double SWS_MAX_REDUCE_CUTOFF = 0.002D; + /// SWS_NUM_SCALER_PARAMS = 0x2 + public const int SWS_NUM_SCALER_PARAMS = 0x2; /// SWS_PARAM_DEFAULT = 0x1e240 public const int SWS_PARAM_DEFAULT = 0x1e240; /// SWS_SRC_V_CHR_DROP_MASK = 0x30000 diff --git a/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs b/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs index 85e228d6..5721dd02 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs @@ -761,6 +761,22 @@ public delegate void av_dump_format_delegate(AVFormatContext* @ic, int @index, public delegate int av_dynamic_hdr_plus_to_t35_delegate(AVDynamicHDRPlus* @s, byte** @data, ulong* @size); public static av_dynamic_hdr_plus_to_t35_delegate av_dynamic_hdr_plus_to_t35; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc_delegate(ulong* @size); + public static av_dynamic_hdr_smpte2094_app5_alloc_delegate av_dynamic_hdr_smpte2094_app5_alloc; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data_delegate(AVFrame* @frame); + public static av_dynamic_hdr_smpte2094_app5_create_side_data_delegate av_dynamic_hdr_smpte2094_app5_create_side_data; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_dynamic_hdr_smpte2094_app5_from_t35_delegate(AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size); + public static av_dynamic_hdr_smpte2094_app5_from_t35_delegate av_dynamic_hdr_smpte2094_app5_from_t35; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_dynamic_hdr_smpte2094_app5_to_t35_delegate(AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size); + public static av_dynamic_hdr_smpte2094_app5_to_t35_delegate av_dynamic_hdr_smpte2094_app5_to_t35; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void av_dynarray_add_delegate(void* @tab_ptr, int* @nb_ptr, void* @elem); public static av_dynarray_add_delegate av_dynarray_add; @@ -1369,10 +1385,6 @@ public delegate AVHWDeviceType av_hwdevice_find_type_by_name_delegate( public delegate AVInputFormat* av_input_video_device_next_delegate(AVInputFormat* @d); public static av_input_video_device_next_delegate av_input_video_device_next; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate uint av_int_list_length_for_size_delegate(uint @elsize, void* @list, ulong @term); - public static av_int_list_length_for_size_delegate av_int_list_length_for_size; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_interleaved_write_frame_delegate(AVFormatContext* @s, AVPacket* @pkt); public static av_interleaved_write_frame_delegate av_interleaved_write_frame; @@ -1827,16 +1839,6 @@ public delegate int av_opt_is_set_to_default_by_name_delegate(void* @obj, public delegate AVOption* av_opt_next_delegate(void* @obj, AVOption* @prev); public static av_opt_next_delegate av_opt_next; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void* av_opt_ptr_delegate(AVClass* @avclass, void* @obj, - #if NETSTANDARD2_1_OR_GREATER - [MarshalAs(UnmanagedType.LPUTF8Str)] - #else - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] - #endif - string @name); - public static av_opt_ptr_delegate av_opt_ptr; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_opt_query_ranges_delegate(AVOptionRanges** @p0, void* @obj, #if NETSTANDARD2_1_OR_GREATER @@ -2157,7 +2159,7 @@ public delegate int av_parse_cpu_caps_delegate(uint* @flags, public static av_parser_close_delegate av_parser_close; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVCodecParserContext* av_parser_init_delegate(int @codec_id); + public delegate AVCodecParserContext* av_parser_init_delegate(AVCodecID @codec_id); public static av_parser_init_delegate av_parser_init; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] @@ -2236,6 +2238,14 @@ public delegate int av_probe_input_buffer2_delegate(AVIOContext* @pb, AVInputFor public delegate void av_program_add_stream_index_delegate(AVFormatContext* @ac, int @progid, uint @idx); public static av_program_add_stream_index_delegate av_program_add_stream_index; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_program_add_stream_index2_delegate(AVFormatContext* @ac, int @progid, uint @idx); + public static av_program_add_stream_index2_delegate av_program_add_stream_index2; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_program_copy_delegate(AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags); + public static av_program_copy_delegate av_program_copy; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate uint av_q2intfloat_delegate(AVRational @q); public static av_q2intfloat_delegate av_q2intfloat; @@ -2384,10 +2394,6 @@ public delegate int av_set_options_string_delegate(void* @ctx, public delegate AVClass* av_stream_get_class_delegate(); public static av_stream_get_class_delegate av_stream_get_class; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVRational av_stream_get_codec_timebase_delegate(AVStream* @st); - public static av_stream_get_codec_timebase_delegate av_stream_get_codec_timebase; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVCodecParserContext* av_stream_get_parser_delegate(AVStream* @s); public static av_stream_get_parser_delegate av_stream_get_parser; @@ -3217,10 +3223,6 @@ public delegate int avformat_open_input_delegate(AVFormatContext** @ps, public delegate string avformat_stream_group_name_delegate(AVStreamGroupParamsType @type); public static avformat_stream_group_name_delegate avformat_stream_group_name; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int avformat_transfer_internal_stream_timing_info_delegate(AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb); - public static avformat_transfer_internal_stream_timing_info_delegate avformat_transfer_internal_stream_timing_info; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate uint avformat_version_delegate(); public static avformat_version_delegate avformat_version; diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs index 42d19c07..309829b1 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs @@ -8,14 +8,14 @@ public static unsafe partial class DynamicallyLinkedBindings { /// Add an index entry into a sorted list. Update the entry if the list already contains it. /// timestamp in the time base of the given stream - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_add_index_entry(AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags); /// Add two rationals. /// First rational /// Second rational /// b+c - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_add_q(AVRational @b, AVRational @c); /// Add a value to a timestamp. @@ -23,12 +23,12 @@ public static unsafe partial class DynamicallyLinkedBindings /// Input timestamp /// Time base of `inc` /// Value to be added - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_add_stable(AVRational @ts_tb, long @ts, AVRational @inc_tb, long @inc); /// Returns the AVAlphaMode value for name or an AVError if not found. /// the AVAlphaMode value for name or an AVError if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVAlphaMode av_alpha_mode_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -39,7 +39,7 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// Returns the name for provided alpha mode or NULL if unknown. /// the name for provided alpha mode or NULL if unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_alpha_mode_name(AVAlphaMode @mode); @@ -48,7 +48,7 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// packet /// amount of data to read /// >0 (read size) if OK, AVERROR_xxx otherwise, previous data will not be lost even if an error occurs. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_append_packet(AVIOContext* @s, AVPacket* @pkt, int @size); /// Allocate an AVAudioFifo. @@ -56,19 +56,19 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// number of channels /// initial allocation size, in samples /// newly allocated AVAudioFifo, or NULL on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVAudioFifo* av_audio_fifo_alloc(AVSampleFormat @sample_fmt, int @channels, int @nb_samples); /// Drain data from an AVAudioFifo. /// AVAudioFifo to drain /// number of samples to drain /// 0 if OK, or negative AVERROR code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_drain(AVAudioFifo* @af, int @nb_samples); /// Free an AVAudioFifo. /// AVAudioFifo to free - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_audio_fifo_free(AVAudioFifo* @af); /// Peek data from an AVAudioFifo. @@ -76,7 +76,7 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// audio data plane pointers /// number of samples to peek /// number of samples actually peek, or negative AVERROR code on failure. The number of samples actually peek will not be greater than nb_samples, and will only be less than nb_samples if av_audio_fifo_size is less than nb_samples. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_peek(AVAudioFifo* @af, void** @data, int @nb_samples); /// Peek data from an AVAudioFifo. @@ -85,7 +85,7 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// number of samples to peek /// offset from current read position /// number of samples actually peek, or negative AVERROR code on failure. The number of samples actually peek will not be greater than nb_samples, and will only be less than nb_samples if av_audio_fifo_size is less than nb_samples. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_peek_at(AVAudioFifo* @af, void** @data, int @nb_samples, int @offset); /// Read data from an AVAudioFifo. @@ -93,31 +93,31 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// audio data plane pointers /// number of samples to read /// number of samples actually read, or negative AVERROR code on failure. The number of samples actually read will not be greater than nb_samples, and will only be less than nb_samples if av_audio_fifo_size is less than nb_samples. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_read(AVAudioFifo* @af, void** @data, int @nb_samples); /// Reallocate an AVAudioFifo. /// AVAudioFifo to reallocate /// new allocation size, in samples /// 0 if OK, or negative AVERROR code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_realloc(AVAudioFifo* @af, int @nb_samples); /// Reset the AVAudioFifo buffer. /// AVAudioFifo to reset - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_audio_fifo_reset(AVAudioFifo* @af); /// Get the current number of samples in the AVAudioFifo available for reading. /// the AVAudioFifo to query /// number of samples available for reading - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_size(AVAudioFifo* @af); /// Get the current number of samples in the AVAudioFifo available for writing. /// the AVAudioFifo to query /// number of samples available for writing - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_space(AVAudioFifo* @af); /// Write data to an AVAudioFifo. @@ -125,31 +125,31 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// audio data plane pointers /// number of samples to write /// number of samples actually written, or negative AVERROR code on failure. If successful, the number of samples actually written will always be nb_samples. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_write(AVAudioFifo* @af, void** @data, int @nb_samples); /// 0th order modified bessel function of the first kind. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern double av_bessel_i0(double @x); /// Allocate a context for a given bitstream filter. The caller must fill in the context parameters as described in the documentation and then call av_bsf_init() before sending any data to the filter. /// the filter for which to allocate an instance. /// a pointer into which the pointer to the newly-allocated context will be written. It must be freed with av_bsf_free() after the filtering is done. /// 0 on success, a negative AVERROR code on failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_alloc(AVBitStreamFilter* @filter, AVBSFContext** @ctx); /// Reset the internal bitstream filter state. Should be called e.g. when seeking. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_bsf_flush(AVBSFContext* @ctx); /// Free a bitstream filter context and everything associated with it; write NULL into the supplied pointer. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_bsf_free(AVBSFContext** @ctx); /// Returns a bitstream filter with the specified name or NULL if no such bitstream filter exists. /// a bitstream filter with the specified name or NULL if no such bitstream filter exists. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVBitStreamFilter* av_bsf_get_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -159,35 +159,35 @@ public static extern AVAlphaMode av_alpha_mode_from_name( string @name); /// Get the AVClass for AVBSFContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* av_bsf_get_class(); /// Get null/pass-through bitstream filter. /// Pointer to be set to new instance of pass-through bitstream filter - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_get_null_filter(AVBSFContext** @bsf); /// Prepare the filter for use, after all the parameters and options have been set. /// a AVBSFContext previously allocated with av_bsf_alloc() - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_init(AVBSFContext* @ctx); /// Iterate over all registered bitstream filters. /// a pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration. /// the next registered bitstream filter or NULL when the iteration is finished - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVBitStreamFilter* av_bsf_iterate(void** @opaque); /// Allocate empty list of bitstream filters. The list must be later freed by av_bsf_list_free() or finalized by av_bsf_list_finalize(). /// Pointer to on success, NULL in case of failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVBSFList* av_bsf_list_alloc(); /// Append bitstream filter to the list of bitstream filters. /// List to append to /// Filter context to be appended /// >=0 on success, negative AVERROR in case of failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_list_append(AVBSFList* @lst, AVBSFContext* @bsf); /// Construct new bitstream filter context given it's name and options and append it to the list of bitstream filters. @@ -195,7 +195,7 @@ public static extern AVAlphaMode av_alpha_mode_from_name( /// Name of the bitstream filter /// Options for the bitstream filter, can be set to NULL /// >=0 on success, negative AVERROR in case of failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_list_append2(AVBSFList* @lst, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -208,19 +208,19 @@ public static extern int av_bsf_list_append2(AVBSFList* @lst, /// Filter list structure to be transformed /// Pointer to be set to newly created structure representing the chain of bitstream filters /// >=0 on success, negative AVERROR in case of failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_list_finalize(AVBSFList** @lst, AVBSFContext** @bsf); /// Free list of bitstream filters. /// Pointer to pointer returned by av_bsf_list_alloc() - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_bsf_list_free(AVBSFList** @lst); /// Parse string describing list of bitstream filters and create single AVBSFContext describing the whole chain of bitstream filters. Resulting AVBSFContext can be treated as any other AVBSFContext freshly allocated by av_bsf_alloc(). /// String describing chain of bitstream filters in format `bsf1[=opt1=val1:opt2=val2][,bsf2]` /// Pointer to be set to newly created structure representing the chain of bitstream filters /// >=0 on success, negative AVERROR in case of failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_list_parse_str( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -233,23 +233,23 @@ public static extern int av_bsf_list_parse_str( /// an initialized AVBSFContext /// this struct will be filled with the contents of the filtered packet. It is owned by the caller and must be freed using av_packet_unref() when it is no longer needed. This parameter should be "clean" (i.e. freshly allocated with av_packet_alloc() or unreffed with av_packet_unref()) when this function is called. If this function returns successfully, the contents of pkt will be completely overwritten by the returned data. On failure, pkt is not touched. /// - 0 on success. - AVERROR(EAGAIN) if more packets need to be sent to the filter (using av_bsf_send_packet()) to get more output. - AVERROR_EOF if there will be no further output from the filter. - Another negative AVERROR value if an error occurs. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_receive_packet(AVBSFContext* @ctx, AVPacket* @pkt); /// Submit a packet for filtering. /// an initialized AVBSFContext /// the packet to filter. The bitstream filter will take ownership of the packet and reset the contents of pkt. pkt is not touched if an error occurs. If pkt is empty (i.e. NULL, or pkt->data is NULL and pkt->side_data_elems zero), it signals the end of the stream (i.e. no more non-empty packets will be sent; sending more empty packets does nothing) and will cause the filter to output any packets it may have buffered internally. /// - 0 on success. - AVERROR(EAGAIN) if packets need to be retrieved from the filter (using av_bsf_receive_packet()) before new input can be consumed. - Another negative AVERROR value if an error occurs. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_send_packet(AVBSFContext* @ctx, AVPacket* @pkt); /// Allocate an AVBuffer of the given size using av_malloc(). /// an AVBufferRef of given size or NULL when out of memory - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffer_alloc(ulong @size); /// Same as av_buffer_alloc(), except the returned buffer will be initialized to zero. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffer_allocz(ulong @size); /// Create an AVBuffer from an existing array. @@ -259,48 +259,48 @@ public static extern int av_bsf_list_parse_str( /// parameter to be got for processing or passed to free /// a combination of AV_BUFFER_FLAG_* /// an AVBufferRef referring to data on success, NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffer_create(byte* @data, ulong @size, av_buffer_create_free_func @free, void* @opaque, int @flags); /// Default free callback, which calls av_free() on the buffer data. This function is meant to be passed to av_buffer_create(), not called directly. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_buffer_default_free(void* @opaque, byte* @data); /// Returns the opaque parameter set by av_buffer_create. /// the opaque parameter set by av_buffer_create. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_buffer_get_opaque(AVBufferRef* @buf); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffer_get_ref_count(AVBufferRef* @buf); /// Returns 1 if the caller may write to the data referred to by buf (which is true if and only if buf is the only reference to the underlying AVBuffer). Return 0 otherwise. A positive answer is valid until av_buffer_ref() is called on buf. /// 1 if the caller may write to the data referred to by buf (which is true if and only if buf is the only reference to the underlying AVBuffer). Return 0 otherwise. A positive answer is valid until av_buffer_ref() is called on buf. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffer_is_writable(AVBufferRef* @buf); /// Create a writable reference from a given buffer reference, avoiding data copy if possible. /// buffer reference to make writable. On success, buf is either left untouched, or it is unreferenced and a new writable AVBufferRef is written in its place. On failure, buf is left untouched. /// 0 on success, a negative AVERROR on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffer_make_writable(AVBufferRef** @buf); /// Query the original opaque parameter of an allocated buffer in the pool. /// a buffer reference to a buffer returned by av_buffer_pool_get. /// the opaque parameter set by the buffer allocator function of the buffer pool. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_buffer_pool_buffer_get_opaque(AVBufferRef* @ref); /// Allocate a new AVBuffer, reusing an old buffer from the pool when available. This function may be called simultaneously from multiple threads. /// a reference to the new buffer on success, NULL on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffer_pool_get(AVBufferPool* @pool); /// Allocate and initialize a buffer pool. /// size of each buffer in this pool /// a function that will be used to allocate new buffers when the pool is empty. May be NULL, then the default allocator will be used (av_buffer_alloc()). /// newly created buffer pool on success, NULL on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferPool* av_buffer_pool_init(ulong @size, av_buffer_pool_init_alloc_func @alloc); /// Allocate and initialize a buffer pool with a more complex allocator. @@ -309,61 +309,61 @@ public static extern int av_bsf_list_parse_str( /// a function that will be used to allocate new buffers when the pool is empty. May be NULL, then the default allocator will be used (av_buffer_alloc()). /// a function that will be called immediately before the pool is freed. I.e. after av_buffer_pool_uninit() is called by the caller and all the frames are returned to the pool and freed. It is intended to uninitialize the user opaque data. May be NULL. /// newly created buffer pool on success, NULL on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferPool* av_buffer_pool_init2(ulong @size, void* @opaque, av_buffer_pool_init2_alloc_func @alloc, av_buffer_pool_init2_pool_free_func @pool_free); /// Mark the pool as being available for freeing. It will actually be freed only once all the allocated buffers associated with the pool are released. Thus it is safe to call this function while some of the allocated buffers are still in use. /// pointer to the pool to be freed. It will be set to NULL. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_buffer_pool_uninit(AVBufferPool** @pool); /// Reallocate a given buffer. /// a buffer reference to reallocate. On success, buf will be unreferenced and a new reference with the required size will be written in its place. On failure buf will be left untouched. *buf may be NULL, then a new buffer is allocated. /// required new buffer size. /// 0 on success, a negative AVERROR on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffer_realloc(AVBufferRef** @buf, ulong @size); /// Create a new reference to an AVBuffer. /// a new AVBufferRef referring to the same AVBuffer as buf or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffer_ref(AVBufferRef* @buf); /// Ensure dst refers to the same data as src. /// Pointer to either a valid buffer reference or NULL. On success, this will point to a buffer reference equivalent to src. On failure, dst will be left untouched. /// A buffer reference to replace dst with. May be NULL, then this function is equivalent to av_buffer_unref(dst). /// 0 on success AVERROR(ENOMEM) on memory allocation failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffer_replace(AVBufferRef** @dst, AVBufferRef* @src); /// Free a given reference and automatically free the buffer if there are no more references to it. /// the reference to be freed. The pointer is set to NULL on return. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_buffer_unref(AVBufferRef** @buf); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVAlphaMode av_buffersink_get_alpha_mode(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_ch_layout(AVFilterContext* @ctx, AVChannelLayout* @ch_layout); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_channels(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVColorRange av_buffersink_get_color_range(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVColorSpace av_buffersink_get_colorspace(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_format(AVFilterContext* @ctx); /// Get a frame with filtered data from sink and put it in frame. /// pointer to a context of a buffersink or abuffersink AVFilter. /// pointer to an allocated frame that will be filled with data. The data must be freed using av_frame_unref() / av_frame_free() /// - >= 0 if a frame was successfully returned. - AVERROR(EAGAIN) if no frames are available at this point; more input frames must be added to the filtergraph to get more output. - AVERROR_EOF if there will be no more output frames on this sink. - A different negative AVERROR code in other failure cases. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_frame(AVFilterContext* @ctx, AVFrame* @frame); /// Get a frame with filtered data from sink and put it in frame. @@ -371,53 +371,53 @@ public static extern int av_bsf_list_parse_str( /// pointer to an allocated frame that will be filled with data. The data must be freed using av_frame_unref() / av_frame_free() /// a combination of AV_BUFFERSINK_FLAG_* flags /// >= 0 in for success, a negative AVERROR code for failure. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_frame_flags(AVFilterContext* @ctx, AVFrame* @frame, int @flags); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_buffersink_get_frame_rate(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_h(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffersink_get_hw_frames_ctx(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_buffersink_get_sample_aspect_ratio(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_sample_rate(AVFilterContext* @ctx); /// Same as av_buffersink_get_frame(), but with the ability to specify the number of samples read. This function is less efficient than av_buffersink_get_frame(), because it copies the data around. /// pointer to a context of the abuffersink AVFilter. /// pointer to an allocated frame that will be filled with data. The data must be freed using av_frame_unref() / av_frame_free() frame will contain exactly nb_samples audio samples, except at the end of stream, when it can contain less than nb_samples. /// The return codes have the same meaning as for av_buffersink_get_frame(). - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_samples(AVFilterContext* @ctx, AVFrame* @frame, int @nb_samples); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData** av_buffersink_get_side_data(AVFilterContext* @ctx, int* @nb_side_data); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_buffersink_get_time_base(AVFilterContext* @ctx); /// Get the properties of the stream @{ - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVMediaType av_buffersink_get_type(AVFilterContext* @ctx); - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_w(AVFilterContext* @ctx); /// Set the frame size for an audio buffer sink. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern void av_buffersink_set_frame_size(AVFilterContext* @ctx, uint @frame_size); /// Add a frame to the buffer source. /// an instance of the buffersrc filter /// frame to be added. If the frame is reference counted, this function will take ownership of the reference(s) and reset the frame. Otherwise the frame data will be copied. If this function returns an error, the input frame is not touched. /// 0 on success, a negative AVERROR on error. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_add_frame(AVFilterContext* @ctx, AVFrame* @frame); /// Add a frame to the buffer source. @@ -425,44 +425,44 @@ public static extern int av_bsf_list_parse_str( /// a frame, or NULL to mark EOF /// a combination of AV_BUFFERSRC_FLAG_* /// >= 0 in case of success, a negative AVERROR code in case of failure - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_add_frame_flags(AVFilterContext* @buffer_src, AVFrame* @frame, int @flags); /// Close the buffer source after EOF. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_close(AVFilterContext* @ctx, long @pts, uint @flags); /// Get the number of failed requests. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_buffersrc_get_nb_failed_requests(AVFilterContext* @buffer_src); /// Returns 0 or a negative AVERROR code. Currently, this will only ever return AVERROR(EOF), to indicate that the buffer source has been closed, either as a result of av_buffersrc_close(), or because the downstream filter is no longer accepting new data. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_get_status(AVFilterContext* @ctx); /// Allocate a new AVBufferSrcParameters instance. It should be freed by the caller with av_free(). - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferSrcParameters* av_buffersrc_parameters_alloc(); /// Initialize the buffersrc or abuffersrc filter with the provided parameters. This function may be called multiple times, the later calls override the previous ones. Some of the parameters may also be set through AVOptions, then whatever method is used last takes precedence. /// an instance of the buffersrc or abuffersrc filter /// the stream parameters. The frames later passed to this filter must conform to those parameters. All the allocated fields in param remain owned by the caller, libavfilter will make internal copies or references when necessary. /// 0 on success, a negative AVERROR code on failure. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_parameters_set(AVFilterContext* @ctx, AVBufferSrcParameters* @param); /// Add a frame to the buffer source. /// an instance of the buffersrc filter /// frame to be added. If the frame is reference counted, this function will make a new reference to it. Otherwise the frame data will be copied. /// 0 on success, a negative AVERROR on error - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_write_frame(AVFilterContext* @ctx, AVFrame* @frame); /// Allocate a memory block for an array with av_mallocz(). /// Number of elements /// Size of the single element /// Pointer to the allocated block, or `NULL` if the block cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_calloc(ulong @nmemb, ulong @size); /// Get a human readable string describing a given channel. @@ -470,16 +470,16 @@ public static extern int av_bsf_list_parse_str( /// size in bytes of the buffer. /// the AVChannel whose description to get /// amount of bytes needed to hold the output string, or a negative AVERROR on failure. If the returned value is bigger than buf_size, then the string was truncated. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_description(byte* @buf, ulong @buf_size, AVChannel @channel); /// bprint variant of av_channel_description(). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_channel_description_bprint(AVBPrint* @bp, AVChannel @channel_id); /// This is the inverse function of av_channel_name(). /// the channel with the given name AV_CHAN_NONE when name does not identify a known channel - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannel av_channel_from_string( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -491,21 +491,21 @@ public static extern AVChannel av_channel_from_string( /// Return the order if the layout is n-th order standard-order ambisonic. The presence of optional extra non-diegetic channels at the end is not taken into account. /// input channel layout /// the order of the layout, a negative error code otherwise. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_ambisonic_order(AVChannelLayout* @channel_layout); /// Get the channel with the given index in a channel layout. /// input channel layout /// index of the channel /// channel with the index idx in channel_layout on success or AV_CHAN_NONE on failure (if idx is not valid or the channel order is unspecified) - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannel av_channel_layout_channel_from_index(AVChannelLayout* @channel_layout, uint @idx); /// Get a channel described by the given string. /// input channel layout /// string describing the channel to obtain /// a channel described by the given string in channel_layout on success or AV_CHAN_NONE on failure (if the string is not valid or the channel order is unspecified) - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannel av_channel_layout_channel_from_string(AVChannelLayout* @channel_layout, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -517,34 +517,34 @@ public static extern AVChannel av_channel_layout_channel_from_string(AVChannelLa /// Check whether a channel layout is valid, i.e. can possibly describe audio data. /// input channel layout /// 1 if channel_layout is valid, 0 otherwise. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_check(AVChannelLayout* @channel_layout); /// Check whether two channel layouts are semantically the same, i.e. the same channels are present on the same positions in both. /// input channel layout /// input channel layout /// 0 if chl and chl1 are equal, 1 if they are not equal. A negative AVERROR code if one or both are invalid. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_compare(AVChannelLayout* @chl, AVChannelLayout* @chl1); /// Make a copy of a channel layout. This differs from just assigning src to dst in that it allocates and copies the map for AV_CHANNEL_ORDER_CUSTOM. /// destination channel layout /// source channel layout /// 0 on success, a negative AVERROR on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_copy(AVChannelLayout* @dst, AVChannelLayout* @src); /// Initialize a custom channel layout with the specified number of channels. The channel map will be allocated and the designation of all channels will be set to AV_CHAN_UNKNOWN. /// the layout structure to be initialized /// the number of channels /// 0 on success AVERROR(EINVAL) if the number of channels < = 0 AVERROR(ENOMEM) if the channel map could not be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_custom_init(AVChannelLayout* @channel_layout, int @nb_channels); /// Get the default channel layout for a given number of channels. /// the layout structure to be initialized /// number of channels - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_channel_layout_default(AVChannelLayout* @ch_layout, int @nb_channels); /// Get a human-readable string describing the channel layout properties. The string will be in the same format that is accepted by av_channel_layout_from_string(), allowing to rebuild the same channel layout, except for opaque pointers. @@ -552,26 +552,26 @@ public static extern AVChannel av_channel_layout_channel_from_string(AVChannelLa /// pre-allocated buffer where to put the generated string /// size in bytes of the buffer. /// amount of bytes needed to hold the output string, or a negative AVERROR on failure. If the returned value is bigger than buf_size, then the string was truncated. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_describe(AVChannelLayout* @channel_layout, byte* @buf, ulong @buf_size); /// bprint variant of av_channel_layout_describe(). /// 0 on success, or a negative AVERROR value on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_describe_bprint(AVChannelLayout* @channel_layout, AVBPrint* @bp); /// Initialize a native channel layout from a bitmask indicating which channels are present. /// the layout structure to be initialized /// bitmask describing the channel layout /// 0 on success AVERROR(EINVAL) for invalid mask values - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_from_mask(AVChannelLayout* @channel_layout, ulong @mask); /// Initialize a channel layout from a given string description. The input string can be represented by: - the formal channel layout name (returned by av_channel_layout_describe()) - single or multiple channel names (returned by av_channel_name(), eg. "FL", or concatenated with "+", each optionally containing a custom name after a "", eg. "FL+FR+LFE") - a decimal or hexadecimal value of a native channel layout (eg. "4" or "0x4") - the number of channels with default layout (eg. "4c") - the number of unordered channels (eg. "4C" or "4 channels") - the ambisonic order followed by optional non-diegetic channels (eg. "ambisonic 2+stereo") On error, the channel layout will remain uninitialized, but not necessarily untouched. /// uninitialized channel layout for the result /// string describing the channel layout /// 0 on success parsing the channel layout AVERROR(EINVAL) if an invalid channel layout string was provided AVERROR(ENOMEM) if there was not enough memory - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_from_string(AVChannelLayout* @channel_layout, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -584,14 +584,14 @@ public static extern int av_channel_layout_from_string(AVChannelLayout* @channel /// input channel layout /// the channel whose index to obtain /// index of channel in channel_layout on success or a negative number if channel is not present in channel_layout. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_index_from_channel(AVChannelLayout* @channel_layout, AVChannel @channel); /// Get the index in a channel layout of a channel described by the given string. In case multiple channels are found, only the first match will be returned. /// input channel layout /// string describing the channel whose index to obtain /// a channel index described by the given string, or a negative AVERROR value. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_index_from_string(AVChannelLayout* @channel_layout, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -605,25 +605,25 @@ public static extern int av_channel_layout_index_from_string(AVChannelLayout* @c /// the desired channel layout order /// a combination of AV_CHANNEL_LAYOUT_RETYPE_FLAG_* constants /// 0 if the conversion was successful and lossless or if the channel layout was already in the desired order >0 if the conversion was successful but lossy AVERROR(ENOSYS) if the conversion was not possible (or would be lossy and AV_CHANNEL_LAYOUT_RETYPE_FLAG_LOSSLESS was specified) AVERROR(EINVAL), AVERROR(ENOMEM) on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_retype(AVChannelLayout* @channel_layout, AVChannelOrder @order, int @flags); /// Iterate over all standard channel layouts. /// a pointer where libavutil will store the iteration state. Must point to NULL to start the iteration. /// the standard channel layout or NULL when the iteration is finished - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannelLayout* av_channel_layout_standard(void** @opaque); /// Find out what channels from a given set are present in a channel layout, without regard for their positions. /// input channel layout /// a combination of AV_CH_* representing a set of channels /// a bitfield representing all the channels from mask that are present in channel_layout - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern ulong av_channel_layout_subset(AVChannelLayout* @channel_layout, ulong @mask); /// Free any allocated data in the channel layout and reset the channel count to 0. /// the layout structure to be uninitialized - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_channel_layout_uninit(AVChannelLayout* @channel_layout); /// Get a human readable string in an abbreviated form describing a given channel. This is the inverse function of av_channel_from_string(). @@ -631,22 +631,22 @@ public static extern int av_channel_layout_index_from_string(AVChannelLayout* @c /// size in bytes of the buffer. /// the AVChannel whose name to get /// amount of bytes needed to hold the output string, or a negative AVERROR on failure. If the returned value is bigger than buf_size, then the string was truncated. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_name(byte* @buf, ulong @buf_size, AVChannel @channel); /// bprint variant of av_channel_name(). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_channel_name_bprint(AVBPrint* @bp, AVChannel @channel_id); /// Converts AVChromaLocation to swscale x/y chroma position. /// horizontal chroma sample position /// vertical chroma sample position - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_chroma_location_enum_to_pos(int* @xpos, int* @ypos, AVChromaLocation @pos); /// Returns the AVChromaLocation value for name or an AVError if not found. /// the AVChromaLocation value for name or an AVError if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_chroma_location_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -657,26 +657,26 @@ public static extern int av_chroma_location_from_name( /// Returns the name for provided chroma location or NULL if unknown. /// the name for provided chroma location or NULL if unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_chroma_location_name(AVChromaLocation @location); /// Converts swscale x/y chroma position to AVChromaLocation. /// horizontal chroma sample position /// vertical chroma sample position - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVChromaLocation av_chroma_location_pos_to_enum(int @xpos, int @ypos); /// Get the AVCodecID for the given codec tag tag. If no codec id is found returns AV_CODEC_ID_NONE. /// list of supported codec_id-codec_tag pairs, as stored in AVInputFormat.codec_tag and AVOutputFormat.codec_tag /// codec tag to match to a codec ID - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecID av_codec_get_id(AVCodecTag** @tags, uint @tag); /// Get the codec tag for the given codec id id. If no codec tag is found returns 0. /// list of supported codec_id-codec_tag pairs, as stored in AVInputFormat.codec_tag and AVOutputFormat.codec_tag /// codec ID to match to a codec tag - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_codec_get_tag(AVCodecTag** @tags, AVCodecID @id); /// Get the codec tag for the given codec id. @@ -684,28 +684,28 @@ public static extern int av_chroma_location_from_name( /// codec id that should be searched for in the list /// A pointer to the found tag /// 0 if id was not found in tags, > 0 if it was found - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_codec_get_tag2(AVCodecTag** @tags, AVCodecID @id, uint* @tag); /// Returns a non-zero number if codec is a decoder, zero otherwise /// a non-zero number if codec is a decoder, zero otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_codec_is_decoder(AVCodec* @codec); /// Returns a non-zero number if codec is an encoder, zero otherwise /// a non-zero number if codec is an encoder, zero otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_codec_is_encoder(AVCodec* @codec); /// Iterate over all registered codecs. /// a pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration. /// the next registered codec or NULL when the iteration is finished - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* av_codec_iterate(void** @opaque); /// Returns the AVColorPrimaries value for name or an AVError if not found. /// the AVColorPrimaries value for name or an AVError if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_primaries_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -716,13 +716,13 @@ public static extern int av_color_primaries_from_name( /// Returns the name for provided color primaries or NULL if unknown. /// the name for provided color primaries or NULL if unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_color_primaries_name(AVColorPrimaries @primaries); /// Returns the AVColorRange value for name or an AVError if not found. /// the AVColorRange value for name or an AVError if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_range_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -733,13 +733,13 @@ public static extern int av_color_range_from_name( /// Returns the name for provided color range or NULL if unknown. /// the name for provided color range or NULL if unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_color_range_name(AVColorRange @range); /// Returns the AVColorSpace value for name or an AVError if not found. /// the AVColorSpace value for name or an AVError if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_space_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -750,13 +750,13 @@ public static extern int av_color_space_from_name( /// Returns the name for provided color space or NULL if unknown. /// the name for provided color space or NULL if unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_color_space_name(AVColorSpace @space); /// Returns the AVColorTransferCharacteristic value for name or an AVError if not found. /// the AVColorTransferCharacteristic value for name or an AVError if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_transfer_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -767,7 +767,7 @@ public static extern int av_color_transfer_from_name( /// Returns the name for provided color transfer or NULL if unknown. /// the name for provided color transfer or NULL if unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_color_transfer_name(AVColorTransferCharacteristic @transfer); @@ -776,75 +776,75 @@ public static extern int av_color_transfer_from_name( /// Operand /// Divisor; must be a power of 2 /// - a negative value if `a % mod < b % mod` - a positive value if `a % mod > b % mod` - zero if `a % mod == b % mod` - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_compare_mod(ulong @a, ulong @b, ulong @mod); /// Compare two timestamps each in its own time base. /// One of the following values: - -1 if `ts_a` is before `ts_b` - 1 if `ts_a` is after `ts_b` - 0 if they represent the same position - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_compare_ts(long @ts_a, AVRational @tb_a, long @ts_b, AVRational @tb_b); /// Allocate an AVContainerFifo instance for AVPacket. /// currently unused - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVContainerFifo* av_container_fifo_alloc_avpacket(uint @flags); /// Allocate an AVContentLightMetadata structure and set its fields to default values. The resulting struct can be freed using av_freep(). /// An AVContentLightMetadata filled with default values or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVContentLightMetadata* av_content_light_metadata_alloc(ulong* @size); /// Allocate a complete AVContentLightMetadata and add it to the frame. /// The frame which side data is added to. /// The AVContentLightMetadata structure to be filled by caller. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVContentLightMetadata* av_content_light_metadata_create_side_data(AVFrame* @frame); /// Allocate a CPB properties structure and initialize its fields to default values. /// if non-NULL, the size of the allocated struct will be written here. This is useful for embedding it in side data. /// the newly allocated struct or NULL on failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCPBProperties* av_cpb_properties_alloc(ulong* @size); /// Returns the number of logical CPU cores present. /// the number of logical CPU cores present. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_cpu_count(); /// Overrides cpu count detection and forces the specified count. Count < 1 disables forcing of specific count. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_cpu_force_count(int @count); /// Get the maximum data alignment that may be required by FFmpeg. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern ulong av_cpu_max_align(); /// Convert a double precision floating point number to a rational. /// `double` to convert /// Maximum allowed numerator and denominator /// `d` in AVRational form - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_d2q(double @d, int @max); /// Allocate an AVD3D11VAContext. /// Newly-allocated AVD3D11VAContext or NULL on failure. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVD3D11VAContext* av_d3d11va_alloc_context(); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVClassCategory av_default_get_category(void* @ptr); /// Return the context name /// The AVClass context /// The AVClass class_name - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_default_item_name(void* @ctx); /// Iterate over all registered demuxers. /// a pointer where libavformat will store the iteration state. Must point to NULL to start the iteration. /// the next registered demuxer or NULL when the iteration is finished - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_demuxer_iterate(void** @opaque); /// Copy entries from one AVDictionary struct into another. @@ -852,17 +852,17 @@ public static extern int av_color_transfer_from_name( /// Pointer to the source AVDictionary struct to copy items from. /// Flags to use when setting entries in *dst /// 0 on success, negative AVERROR code on failure. If dst was allocated by this function, callers should free the associated memory. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_copy(AVDictionary** @dst, AVDictionary* @src, int @flags); /// Get number of entries in dictionary. /// dictionary /// number of entries in dictionary - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_count(AVDictionary* @m); /// Free all the memory allocated for an AVDictionary struct and all keys and values. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_dict_free(AVDictionary** @m); /// Get a dictionary entry with matching key. @@ -870,7 +870,7 @@ public static extern int av_color_transfer_from_name( /// Set to the previous matching element to find the next. If set to NULL the first matching element is returned. /// A collection of AV_DICT_* flags controlling how the entry is retrieved /// Found entry or NULL in case no matching entry was found in the dictionary - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVDictionaryEntry* av_dict_get(AVDictionary* @m, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -885,13 +885,13 @@ public static extern int av_color_transfer_from_name( /// Character used to separate key from value /// Character used to separate two pairs from each other /// >= 0 on success, negative on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_get_string(AVDictionary* @m, byte** @buffer, byte @key_val_sep, byte @pairs_sep); /// Iterate over a dictionary /// The dictionary to iterate over /// Pointer to the previous AVDictionaryEntry, NULL initially - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVDictionaryEntry* av_dict_iterate(AVDictionary* @m, AVDictionaryEntry* @prev); /// Parse the key/value pairs list and add the parsed entries to a dictionary. @@ -899,7 +899,7 @@ public static extern int av_color_transfer_from_name( /// A 0-terminated list of characters used to separate two pairs from each other /// Flags to use when adding to the dictionary. ::AV_DICT_DONT_STRDUP_KEY and ::AV_DICT_DONT_STRDUP_VAL are ignored since the key/value tokens will always be duplicated. /// 0 on success, negative AVERROR code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_parse_string(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -925,7 +925,7 @@ public static extern int av_dict_parse_string(AVDictionary** @pm, /// Entry key to add to *pm (will either be av_strduped or added as a new key depending on flags) /// Entry value to add to *pm (will be av_strduped or added as a new key depending on flags). Passing a NULL value will cause an existing entry to be deleted. /// >= 0 on success otherwise an error code < 0 - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_set(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -941,7 +941,7 @@ public static extern int av_dict_set(AVDictionary** @pm, string @value, int @flags); /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_set_int(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -954,24 +954,24 @@ public static extern int av_dict_set_int(AVDictionary** @pm, /// a transformation matrix /// whether the matrix should be flipped horizontally /// whether the matrix should be flipped vertically - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip); /// Extract the rotation component of the transformation matrix. /// the transformation matrix /// the angle (in degrees) by which the transformation rotates the frame counterclockwise. The angle will be in range [-180.0, 180.0], or NaN if the matrix is singular. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern double av_display_rotation_get(in int9 @matrix); /// Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees). /// a transformation matrix (will be fully overwritten by this function) /// rotation angle in degrees. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_display_rotation_set(ref int9 @matrix, double @angle); /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. /// The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_disposition_from_string( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -983,7 +983,7 @@ public static extern int av_disposition_from_string( /// Returns 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. /// a combination of AV_DISPOSITION_* values /// 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. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_disposition_to_string(int @disposition); @@ -991,7 +991,7 @@ public static extern int av_disposition_from_string( /// First rational /// Second rational /// b/c - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_div_q(AVRational @b, AVRational @c); /// Print detailed information about the input or output format, such as duration, bitrate, streams, container, programs, metadata, side data, codec and time base. @@ -999,7 +999,7 @@ public static extern int av_disposition_from_string( /// index of the stream to dump information about /// the URL to print, such as source or destination file /// Select whether the specified context is an input(0) or output(1) - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_dump_format(AVFormatContext* @ic, int @index, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1010,13 +1010,13 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, /// Allocate an AVDynamicHDRPlus structure and set its fields to default values. The resulting struct can be freed using av_freep(). /// An AVDynamicHDRPlus filled with default values or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVDynamicHDRPlus* av_dynamic_hdr_plus_alloc(ulong* @size); /// Allocate a complete AVDynamicHDRPlus and add it to the frame. /// The frame which side data is added to. /// The AVDynamicHDRPlus structure to be filled by caller or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVDynamicHDRPlus* av_dynamic_hdr_plus_create_side_data(AVFrame* @frame); /// Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRPlus). The T.35 buffer must begin with the application mode, skipping the country code, terminal provider codes, and application identifier. @@ -1024,7 +1024,7 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, /// The byte array containing the raw ITU-T T.35 data. /// Size of the data array in bytes. /// >= 0 on success. Otherwise, returns the appropriate AVERROR. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus* @s, byte* @data, ulong @size); /// Serialize dynamic HDR10+ metadata to a user data registered ITU-T T.35 buffer, excluding the first 48 bytes of the header, and beginning with the application mode. @@ -1032,19 +1032,46 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, /// A pointer to pointer to a byte buffer to be filled with the serialized metadata. If *data is NULL, a buffer be will be allocated and a pointer to it stored in its place. The caller assumes ownership of the buffer. May be NULL, in which case the function will only store the required buffer size in *size. /// A pointer to a size to be set to the returned buffer's size. If *data is not NULL, *size must contain the size of the input buffer. May be NULL only if *data is NULL. /// >= 0 on success. Otherwise, returns the appropriate AVERROR. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dynamic_hdr_plus_to_t35(AVDynamicHDRPlus* @s, byte** @data, ulong* @size); + /// Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to default values. The resulting struct can be freed using av_freep(). + /// An AVDynamicHDRSmpte2094App5 filled with default values or NULL on failure. + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] + public static extern AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc(ulong* @size); + + /// Allocate a complete AVDynamicHDRSmpte2094App5 and add it to the frame. + /// The frame which side data is added to. + /// The AVDynamicHDRSmpte2094App5 structure to be filled by caller or NULL on failure. + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] + public static extern AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data(AVFrame* @frame); + + /// Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5. + /// A pointer containing the decoded AVDynamicHDRSmpte2094App5 structure. + /// The byte array containing the raw ITU-T T.35 data. + /// Size of the data array in bytes. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size); + + /// Serialize dynamic SMPTE-2094-50 metadata to a ITU-T T.35 message. Excluding the country_code, provider_code and provider_oriented_code. + /// A pointer containing the AVDynamicHDRSmpte2094App5 data. + /// A pointer to pointer to a byte buffer to be filled with the serialized metadata. If *data is NULL, a buffer be will be allocated and a pointer to it stored in its place. The caller assumes ownership of the buffer. May be NULL, in which case the function will only store the required buffer size in *size. + /// A pointer to a size to be set to the returned buffer's size. If *data is not NULL, *size must contain the size of the input buffer. May be NULL only if *data is NULL. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_dynamic_hdr_smpte2094_app5_to_t35(AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size); + /// Add the pointer to an element to a dynamic array. /// Pointer to the array to grow /// Pointer to the number of elements in the array /// Element to add - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_dynarray_add(void* @tab_ptr, int* @nb_ptr, void* @elem); /// Add an element to a dynamic array. /// >=0 on success, negative otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dynarray_add_nofree(void* @tab_ptr, int* @nb_ptr, void* @elem); /// Add an element of size `elem_size` to a dynamic array. @@ -1053,29 +1080,29 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, /// Size in bytes of an element in the array /// Pointer to the data of the element to add. If `NULL`, the space of the newly added element is allocated but left uninitialized. /// Pointer to the data of the element to copy in the newly allocated space - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_dynarray2_add(void** @tab_ptr, int* @nb_ptr, ulong @elem_size, byte* @elem_data); /// Allocate a buffer, reusing the given one if large enough. /// Pointer to pointer to an already allocated buffer. `*ptr` will be overwritten with pointer to new buffer on success or `NULL` on failure /// Pointer to the size of buffer `*ptr`. `*size` is updated to the new allocated size, in particular 0 in case of failure. /// Desired minimal size of buffer `*ptr` - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_fast_malloc(void* @ptr, uint* @size, ulong @min_size); /// Allocate and clear a buffer, reusing the given one if large enough. /// Pointer to pointer to an already allocated buffer. `*ptr` will be overwritten with pointer to new buffer on success or `NULL` on failure /// Pointer to the size of buffer `*ptr`. `*size` is updated to the new allocated size, in particular 0 in case of failure. /// Desired minimal size of buffer `*ptr` - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_fast_mallocz(void* @ptr, uint* @size, ulong @min_size); /// Same behaviour av_fast_malloc but the buffer has additional AV_INPUT_BUFFER_PADDING_SIZE at the end which will always be 0. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_fast_padded_malloc(void* @ptr, uint* @size, ulong @min_size); /// Same behaviour av_fast_padded_malloc except that buffer will always be 0-initialized after call. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_fast_padded_mallocz(void* @ptr, uint* @size, ulong @min_size); /// Reallocate the given buffer if it is not large enough, otherwise do nothing. @@ -1083,7 +1110,7 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, /// Pointer to the size of buffer `ptr`. `*size` is updated to the new allocated size, in particular 0 in case of failure. /// Desired minimal size of buffer `ptr` /// `ptr` if the buffer is large enough, a pointer to newly reallocated buffer if the buffer was not large enough, or `NULL` in case of error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_fast_realloc(void* @ptr, uint* @size, ulong @min_size); /// Read the file with name filename, and put its content in a newly allocated buffer or map it with mmap() when available. In case of success set *bufptr to the read or mmapped buffer, and *size to the size in bytes of the buffer in *bufptr. Unlike mmap this function succeeds with zero sized files, in this case *bufptr will be set to NULL and *size will be set to 0. The returned buffer must be released with av_file_unmap(). @@ -1093,7 +1120,7 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, /// loglevel offset used for logging /// context used for logging /// a non negative number in case of success, a negative value corresponding to an AVERROR error code in case of failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_file_map( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1105,13 +1132,13 @@ public static extern int av_file_map( /// Unmap or free the buffer bufptr created by av_file_map(). /// the buffer previously created with av_file_map() /// size in bytes of bufptr, must be the same as returned by av_file_map() - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_file_unmap(byte* @bufptr, ulong @size); /// Check whether filename actually is a numbered sequence generator. /// possible numbered sequence string /// 1 if a valid numbered sequence string, 0 otherwise - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_filename_number_test( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1123,14 +1150,14 @@ public static extern int av_filename_number_test( /// Iterate over all registered filters. /// a pointer where libavfilter will store the iteration state. Must point to NULL to start the iteration. /// the next registered filter or NULL when the iteration is finished - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilter* av_filter_iterate(void** @opaque); /// Compute what kind of losses will occur when converting from one specific pixel format to another. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. These losses can involve loss of chroma, but also loss of resolution, loss of color depth, loss due to the color space conversion, loss of the alpha bits or loss due to color quantization. av_get_fix_fmt_loss() informs you about the various types of losses which will occur when converting from one pixel format to another. /// source pixel format /// Whether the source pixel format alpha channel is used. /// Combination of flags informing you what kind of losses will occur (maximum loss for an invalid dst_pix_fmt). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat av_find_best_pix_fmt_of_2(AVPixelFormat @dst_pix_fmt1, AVPixelFormat @dst_pix_fmt2, AVPixelFormat @src_pix_fmt, int @has_alpha, int* @loss_ptr); /// Find the "best" stream in the file. The best stream is determined according to various heuristics as the most likely to be what the user expects. If the decoder parameter is non-NULL, av_find_best_stream will find the default decoder for the stream's codec; streams for which no decoder can be found are ignored. @@ -1141,14 +1168,14 @@ public static extern int av_filename_number_test( /// if non-NULL, returns the decoder for the selected stream /// flags; none are currently defined /// the non-negative stream number in case of success, AVERROR_STREAM_NOT_FOUND if no stream with the requested type could be found, AVERROR_DECODER_NOT_FOUND if streams were found but no decoder - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_find_best_stream(AVFormatContext* @ic, AVMediaType @type, int @wanted_stream_nb, int @related_stream, AVCodec** @decoder_ret, int @flags); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_find_default_stream_index(AVFormatContext* @s); /// Find AVInputFormat based on the short name of the input format. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_find_input_format( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1161,7 +1188,7 @@ public static extern int av_filename_number_test( /// Reference rational /// Array of rationals terminated by `{0, 0}` /// Index of the nearest value found in the array - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_find_nearest_q_idx(AVRational @q, AVRational* @q_list); /// Find the programs which belong to a given stream. @@ -1169,82 +1196,82 @@ public static extern int av_filename_number_test( /// the last found program, the search will start after this program, or from the beginning if it is NULL /// stream index /// the next program which belongs to s, NULL if no program is found or the last program is not among the programs of ic. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVProgram* av_find_program_from_stream(AVFormatContext* @ic, AVProgram* @last, int @s); /// Disables cpu detection and forces the specified flags. -1 is a special case that disables forcing of specific flags. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_force_cpu_flags(int @flags); /// Fill the provided buffer with a string containing a FourCC (four-character code) representation. /// a buffer with size in bytes of at least AV_FOURCC_MAX_STRING_SIZE /// the fourcc to represent /// the buffer in input - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_fourcc_make_string(byte* @buf, uint @fourcc); /// Allocate an AVFrame and set its fields to default values. The resulting struct must be freed using av_frame_free(). /// An AVFrame filled with default values or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrame* av_frame_alloc(); /// Crop the given video AVFrame according to its crop_left/crop_top/crop_right/ crop_bottom fields. If cropping is successful, the function will adjust the data pointers and the width/height fields, and set the crop fields to 0. /// the frame which should be cropped /// Some combination of AV_FRAME_CROP_* flags, or 0. /// >= 0 on success, a negative AVERROR on error. If the cropping fields were invalid, AVERROR(ERANGE) is returned, and nothing is changed. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_apply_cropping(AVFrame* @frame, int @flags); /// Create a new frame that references the same data as src. /// newly created AVFrame on success, NULL on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrame* av_frame_clone(AVFrame* @src); /// Copy the frame data from src to dst. /// >= 0 on success, a negative AVERROR on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_copy(AVFrame* @dst, AVFrame* @src); /// Copy only "metadata" fields from src to dst. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_copy_props(AVFrame* @dst, AVFrame* @src); /// Free the frame and any dynamically allocated objects in it, e.g. extended_data. If the frame is reference counted, it will be unreferenced first. /// frame to be freed. The pointer will be set to NULL. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_free(AVFrame** @frame); /// Allocate new buffer(s) for audio or video data. /// frame in which to store the new buffers. /// Required buffer size and data pointer alignment. If equal to 0, alignment will be chosen automatically for the current CPU. It is highly recommended to pass 0 here unless you know what you are doing. /// 0 on success, a negative AVERROR on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_get_buffer(AVFrame* @frame, int @align); /// Get the buffer reference a given data plane is stored in. /// the frame to get the plane's buffer from /// index of the data plane of interest in frame->extended_data. /// the buffer reference that contains the plane or NULL if the input frame is not valid. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_frame_get_plane_buffer(AVFrame* @frame, int @plane); /// Returns a pointer to the side data of a given type on success, NULL if there is no side data with such type in this frame. /// a pointer to the side data of a given type on success, NULL if there is no side data with such type in this frame. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData* av_frame_get_side_data(AVFrame* @frame, AVFrameSideDataType @type); /// Check if the frame data is writable. /// A positive value if the frame data is writable (which is true if and only if each of the underlying buffers has only one reference, namely the one stored in this frame). Return 0 otherwise. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_is_writable(AVFrame* @frame); /// Ensure that the frame data is writable, avoiding data copy if possible. /// 0 on success, a negative AVERROR on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_make_writable(AVFrame* @frame); /// Move everything contained in src to dst and reset src. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_move_ref(AVFrame* @dst, AVFrame* @src); /// Add a new side data to a frame. @@ -1252,7 +1279,7 @@ public static extern int av_filename_number_test( /// type of the added side data /// size of the side data /// newly added side data on success, NULL on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData* av_frame_new_side_data(AVFrame* @frame, AVFrameSideDataType @type, ulong @size); /// Add a new side data to a frame from an existing AVBufferRef @@ -1260,21 +1287,21 @@ public static extern int av_filename_number_test( /// the type of the added side data /// an AVBufferRef to add as side data. The ownership of the reference is transferred to the frame. /// newly added side data on success, NULL on error. On failure the frame is unchanged and the AVBufferRef remains owned by the caller. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData* av_frame_new_side_data_from_buf(AVFrame* @frame, AVFrameSideDataType @type, AVBufferRef* @buf); /// Set up a new reference to the data described by the source frame. /// 0 on success, a negative AVERROR on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_ref(AVFrame* @dst, AVFrame* @src); /// Remove and free all side data instances of the given type. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_remove_side_data(AVFrame* @frame, AVFrameSideDataType @type); /// Ensure the destination frame refers to the same data described by the source frame, either by creating a new reference for each AVBufferRef from src if they differ from those in dst, by allocating new buffers and copying data if src is not reference counted, or by unreferencing it if src is empty. /// 0 on success, a negative AVERROR on error. On error, dst is unreferenced. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_replace(AVFrame* @dst, AVFrame* @src); /// Add a new side data entry to an array from an existing AVBufferRef. @@ -1284,7 +1311,7 @@ public static extern int av_filename_number_test( /// Pointer to AVBufferRef to add to the array. On success, the function takes ownership of the AVBufferRef and *buf is set to NULL, unless AV_FRAME_SIDE_DATA_FLAG_NEW_REF is set in which case the ownership will remain with the caller. /// Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. /// newly added side data on success, NULL on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData* av_frame_side_data_add(AVFrameSideData*** @sd, int* @nb_sd, AVFrameSideDataType @type, AVBufferRef** @buf, uint @flags); /// Add a new side data entry to an array based on existing side data, taking a reference towards the contained AVBufferRef. @@ -1293,18 +1320,18 @@ public static extern int av_filename_number_test( /// side data to be cloned, with a new reference utilized for the buffer. /// Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. /// negative error code on failure, >=0 on success. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_side_data_clone(AVFrameSideData*** @sd, int* @nb_sd, AVFrameSideData* @src, uint @flags); /// Returns side data descriptor corresponding to a given side data type, NULL when not available. /// side data descriptor corresponding to a given side data type, NULL when not available. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVSideDataDescriptor* av_frame_side_data_desc(AVFrameSideDataType @type); /// Free all side data entries and their contents, then zeroes out the values which the pointers are pointing to. /// pointer to array of side data to free. Will be set to NULL upon return. /// pointer to an integer containing the number of entries in the array. Will be set to 0 upon return. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_side_data_free(AVFrameSideData*** @sd, int* @nb_sd); /// Get a side data entry of a specific type from an array. @@ -1312,12 +1339,12 @@ public static extern int av_filename_number_test( /// integer containing the number of entries in the array. /// type of side data to be queried /// a pointer to the side data of a given type on success, NULL if there is no side data with such type in this set. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData* av_frame_side_data_get_c(AVFrameSideData** @sd, int @nb_sd, AVFrameSideDataType @type); /// Returns a string identifying the side data type /// a string identifying the side data type - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_frame_side_data_name(AVFrameSideDataType @type); @@ -1328,84 +1355,84 @@ public static extern int av_filename_number_test( /// size of the side data /// Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. /// newly added side data on success, NULL on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVFrameSideData* av_frame_side_data_new(AVFrameSideData*** @sd, int* @nb_sd, AVFrameSideDataType @type, ulong @size, uint @flags); /// Remove and free all side data instances of the given type from an array. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_side_data_remove(AVFrameSideData*** @sd, int* @nb_sd, AVFrameSideDataType @type); /// Remove and free all side data instances that match any of the given side data properties. (See enum AVSideDataProps) - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_side_data_remove_by_props(AVFrameSideData*** @sd, int* @nb_sd, int @props); /// Unreference all the buffers referenced by frame and reset the frame fields. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_unref(AVFrame* @frame); /// Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family. /// Pointer to the memory block which should be freed. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_free(void* @ptr); /// Free a memory block which has been allocated with a function of av_malloc() or av_realloc() family, and set the pointer pointing to it to `NULL`. /// Pointer to the pointer to the memory block which should be freed - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_freep(void* @ptr); /// Compute the greatest common divisor of two integer operands. /// Operand /// Operand /// GCD of a and b up to sign; if a >= 0 and b >= 0, return value is >= 0; if a == 0 and b == 0, returns 0. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_gcd(long @a, long @b); /// Return the best rational so that a and b are multiple of it. If the resulting denominator is larger than max_den, return def. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_gcd_q(AVRational @a, AVRational @b, int @max_den, AVRational @def); /// Return the planar<->packed alternative form of the given sample format, or AV_SAMPLE_FMT_NONE on error. If the passed sample_fmt is already in the requested planar/packed format, the format returned is the same as the input. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVSampleFormat av_get_alt_sample_fmt(AVSampleFormat @sample_fmt, int @planar); /// Return audio frame duration. /// codec context /// size of the frame, or 0 if unknown /// frame duration, in samples, if known. 0 if not able to determine. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern 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. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + /// This function is the same as ::av_get_audio_frame_duration(), except it works with ::AVCodecParameters instead of an ::AVCodecContext. + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_audio_frame_duration2(AVCodecParameters* @par, int @frame_bytes); /// Return the number of bits per pixel used by the pixel format described by pixdesc. Note that this is not the same as the number of bits per sample. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_bits_per_pixel(AVPixFmtDescriptor* @pixdesc); /// Return codec bits per sample. /// the codec /// Number of bits per sample or zero if unknown for the given codec. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_bits_per_sample(AVCodecID @codec_id); /// Return number of bytes per sample. /// the sample format /// number of bytes per sample or zero if unknown for the given sample format - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_bytes_per_sample(AVSampleFormat @sample_fmt); /// Return the flags which specify extensions supported by the CPU. The returned value is affected by av_force_cpu_flags() if that was used before. So av_get_cpu_flags() can easily be used in an application to detect the enabled cpu flags. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_cpu_flags(); /// Return codec bits per sample. Only return non-zero if the bits per sample is exactly correct, not an approximation. /// the codec /// Number of bits per sample or zero if unknown for the given codec. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_exact_bits_per_sample(AVCodecID @codec_id); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_frame_filename(byte* @buf, int @buf_size, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1421,7 +1448,7 @@ public static extern int av_get_frame_filename(byte* @buf, int @buf_size, /// frame number /// AV_FRAME_FILENAME_FLAGS_* /// 0 if OK, -1 on format error - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_frame_filename2(byte* @buf, int @buf_size, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1431,7 +1458,7 @@ public static extern int av_get_frame_filename2(byte* @buf, int @buf_size, string @path, int @number, int @flags); /// Return a string describing the media_type enum, NULL if media_type is unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_media_type_string(AVMediaType @media_type); @@ -1440,12 +1467,12 @@ public static extern int av_get_frame_filename2(byte* @buf, int @buf_size, /// stream in the media file /// DTS of the last packet output for the stream, in stream time_base units /// absolute time when that packet whas output, in microsecond - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_output_timestamp(AVFormatContext* @s, int @stream, long* @dts, long* @wall); /// Get the packed alternative form of the given sample format. /// the packed alternative form of the given sample format or AV_SAMPLE_FMT_NONE on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVSampleFormat av_get_packed_sample_fmt(AVSampleFormat @sample_fmt); /// Allocate and read the payload of a packet and initialize its fields with default values. @@ -1453,27 +1480,27 @@ public static extern int av_get_frame_filename2(byte* @buf, int @buf_size, /// packet /// desired payload size /// >0 (read size) if OK, AVERROR_xxx otherwise - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_packet(AVIOContext* @s, AVPacket* @pkt, int @size); /// Return the number of bits per pixel for the pixel format described by pixdesc, including any padding or unused bits. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_padded_bits_per_pixel(AVPixFmtDescriptor* @pixdesc); /// Return the PCM codec associated with a sample format. /// endianness, 0 for little, 1 for big, -1 (or anything else) for native /// AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecID av_get_pcm_codec(AVSampleFormat @fmt, int @be); /// Return a single letter to describe the given picture type pict_type. /// the picture type /// a single character representing the picture type, '?' if pict_type is unknown - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte av_get_picture_type_char(AVPictureType @pict_type); /// Return the pixel format corresponding to name. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat av_get_pix_fmt( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1487,11 +1514,11 @@ public static extern AVPixelFormat av_get_pix_fmt( /// source pixel format /// Whether the source pixel format alpha channel is used. /// Combination of flags informing you what kind of losses will occur (maximum loss for an invalid dst_pix_fmt). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_pix_fmt_loss(AVPixelFormat @dst_pix_fmt, AVPixelFormat @src_pix_fmt, int @has_alpha); /// Return the short name for a pixel format, NULL in case pix_fmt is unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_pix_fmt_name(AVPixelFormat @pix_fmt); @@ -1499,24 +1526,24 @@ public static extern AVPixelFormat av_get_pix_fmt( /// the buffer where to write the string /// the size of buf /// the number of the pixel format to print the corresponding info string, or a negative value to print the corresponding header. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_get_pix_fmt_string(byte* @buf, int @buf_size, AVPixelFormat @pix_fmt); /// Get the planar alternative form of the given sample format. /// the planar alternative form of the given sample format or AV_SAMPLE_FMT_NONE on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVSampleFormat av_get_planar_sample_fmt(AVSampleFormat @sample_fmt); /// Return a name for the specified profile, if available. /// the codec that is searched for the given profile /// the profile value for which a name is requested /// A name for the profile if found, NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_profile_name(AVCodec* @codec, int @profile); /// Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVSampleFormat av_get_sample_fmt( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1526,7 +1553,7 @@ public static extern AVSampleFormat av_get_sample_fmt( string @name); /// Return the name of sample_fmt, or NULL if sample_fmt is not recognized. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_sample_fmt_name(AVSampleFormat @sample_fmt); @@ -1534,34 +1561,34 @@ public static extern AVSampleFormat av_get_sample_fmt( /// the buffer where to write the string /// the size of buf /// the number of the sample format to print the corresponding info string, or a negative value to print the corresponding header. - /// the pointer to the filled buffer or NULL if sample_fmt is unknown or in case of other errors - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + /// the pointer to the filled buffer or NULL in case of other errors + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_get_sample_fmt_string(byte* @buf, int @buf_size, AVSampleFormat @sample_fmt); /// Return the fractional representation of the internal time base. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_get_time_base_q(); /// Get the current time in microseconds. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_gettime(); /// Get the current time in microseconds since some unspecified starting point. On platforms that support it, the time comes from a monotonic clock This property makes this time source ideal for measuring relative time. The returned values may not be monotonic on platforms where a monotonic clock is not available. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_gettime_relative(); /// Indicates with a boolean result if the av_gettime_relative() time source is monotonic. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_gettime_relative_is_monotonic(); /// Increase packet size, correctly zeroing padding /// packet /// number of bytes by which to increase the size of the packet - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_grow_packet(AVPacket* @pkt, int @grow_by); /// Guess the codec ID based upon muxer and filename. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1586,7 +1613,7 @@ public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, /// if non-NULL checks if short_name matches with the names of the registered formats /// if non-NULL checks if filename terminates with the extensions of the registered formats /// if non-NULL checks if mime_type matches with the MIME type of the registered formats - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_guess_format( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1612,7 +1639,7 @@ public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, /// the stream which the frame is part of /// the frame for which the frame rate should be determined, may be NULL /// the guessed (valid) frame rate, 0/1 if no idea - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_guess_frame_rate(AVFormatContext* @ctx, AVStream* @stream, AVFrame* @frame); /// Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio. @@ -1620,14 +1647,14 @@ public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, /// the stream which the frame is part of /// the frame with the aspect ratio to be determined /// the guessed (valid) sample_aspect_ratio, 0/1 if no idea - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_guess_sample_aspect_ratio(AVFormatContext* @format, AVStream* @stream, AVFrame* @frame); /// Send a nice hexadecimal dump of a buffer to the specified file stream. /// The file stream pointer where the dump should be sent to. /// buffer /// buffer size - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_hex_dump(_iobuf* @f, byte* @buf, int @size); /// Send a nice hexadecimal dump of a buffer to the log. @@ -1635,13 +1662,13 @@ public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, /// The importance level of the message, lower values signifying higher importance. /// buffer /// buffer size - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_hex_dump_log(void* @avcl, int @level, byte* @buf, int @size); /// Allocate an AVHWDeviceContext for a given hardware type. /// the type of the hardware device to allocate. /// a reference to the newly created AVHWDeviceContext on success or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_hwdevice_ctx_alloc(AVHWDeviceType @type); /// Open a device of the specified type and create an AVHWDeviceContext for it. @@ -1651,7 +1678,7 @@ public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, /// A dictionary of additional (type-specific) options to use in opening the device. The dictionary remains owned by the caller. /// currently unused /// 0 on success, a negative AVERROR code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwdevice_ctx_create(AVBufferRef** @device_ctx, AVHWDeviceType @type, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1666,7 +1693,7 @@ public static extern int av_hwdevice_ctx_create(AVBufferRef** @device_ctx, AVHWD /// A reference to an existing AVHWDeviceContext which will be used to create the new device. /// Currently unused; should be set to zero. /// Zero on success, a negative AVERROR code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwdevice_ctx_create_derived(AVBufferRef** @dst_ctx, AVHWDeviceType @type, AVBufferRef* @src_ctx, int @flags); /// Create a new device of the specified type from an existing device. @@ -1676,19 +1703,19 @@ public static extern int av_hwdevice_ctx_create(AVBufferRef** @device_ctx, AVHWD /// Options for the new device to create, same format as in av_hwdevice_ctx_create. /// Currently unused; should be set to zero. /// Zero on success, a negative AVERROR code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwdevice_ctx_create_derived_opts(AVBufferRef** @dst_ctx, AVHWDeviceType @type, AVBufferRef* @src_ctx, AVDictionary* @options, int @flags); /// Finalize the device context before use. This function must be called after the context is filled with all the required information and before it is used in any way. /// a reference to the AVHWDeviceContext /// 0 on success, a negative AVERROR code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwdevice_ctx_init(AVBufferRef* @ref); /// Look up an AVHWDeviceType by name. /// String name of the device type (case-insensitive). /// The type from enum AVHWDeviceType, or AV_HWDEVICE_TYPE_NONE if not found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVHWDeviceType av_hwdevice_find_type_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1701,37 +1728,37 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// a reference to the associated AVHWDeviceContext. /// a filled HW-specific configuration structure, or NULL to return the maximum possible capabilities of the device. /// AVHWFramesConstraints structure describing the constraints on the device, or NULL if not available. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVHWFramesConstraints* av_hwdevice_get_hwframe_constraints(AVBufferRef* @ref, void* @hwconfig); /// Get the string name of an AVHWDeviceType. /// Type from enum AVHWDeviceType. /// Pointer to a static string containing the name, or NULL if the type is not valid. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_hwdevice_get_type_name(AVHWDeviceType @type); /// Allocate a HW-specific configuration structure for a given HW device. After use, the user must free all members as required by the specific hardware structure being used, then free the structure itself with av_free(). /// a reference to the associated AVHWDeviceContext. /// The newly created HW-specific configuration structure on success or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_hwdevice_hwconfig_alloc(AVBufferRef* @device_ctx); /// Iterate over supported device types. /// AV_HWDEVICE_TYPE_NONE initially, then the previous type returned by this function in subsequent iterations. /// The next usable device type from enum AVHWDeviceType, or AV_HWDEVICE_TYPE_NONE if there are no more. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVHWDeviceType av_hwdevice_iterate_types(AVHWDeviceType @prev); /// Free an AVHWFrameConstraints structure. /// The (filled or unfilled) AVHWFrameConstraints structure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_hwframe_constraints_free(AVHWFramesConstraints** @constraints); /// Allocate an AVHWFramesContext tied to a given device context. /// a reference to a AVHWDeviceContext. This function will make a new reference for internal use, the one passed to the function remains owned by the caller. /// a reference to the newly created AVHWFramesContext on success or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_hwframe_ctx_alloc(AVBufferRef* @device_ctx); /// Create and initialise an AVHWFramesContext as a mapping of another existing AVHWFramesContext on a different device. @@ -1741,13 +1768,13 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// A reference to an existing AVHWFramesContext which will be mapped to the derived context. /// Some combination of AV_HWFRAME_MAP_* flags, defining the mapping parameters to apply to frames which are allocated in the derived device. /// Zero on success, negative AVERROR code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_ctx_create_derived(AVBufferRef** @derived_frame_ctx, AVPixelFormat @format, AVBufferRef* @derived_device_ctx, AVBufferRef* @source_frame_ctx, int @flags); /// Finalize the context before use. This function must be called after the context is filled with all the required information and before it is attached to any frames. /// a reference to the AVHWFramesContext /// 0 on success, a negative AVERROR code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_ctx_init(AVBufferRef* @ref); /// Allocate a new frame attached to the given AVHWFramesContext. @@ -1755,7 +1782,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// an empty (freshly allocated or unreffed) frame to be filled with newly allocated buffers. /// currently unused, should be set to zero /// 0 on success, a negative AVERROR code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_get_buffer(AVBufferRef* @hwframe_ctx, AVFrame* @frame, int @flags); /// Map a hardware frame. @@ -1763,7 +1790,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// Source frame, to be mapped. /// Some combination of AV_HWFRAME_MAP_* flags. /// Zero on success, negative AVERROR code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_map(AVFrame* @dst, AVFrame* @src, int @flags); /// Copy data to or from a hw surface. At least one of dst/src must have an AVHWFramesContext attached. @@ -1771,7 +1798,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the source frame. /// currently unused, should be set to zero /// 0 on success, a negative AVERROR error code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_transfer_data(AVFrame* @dst, AVFrame* @src, int @flags); /// Get a list of possible source or target formats usable in av_hwframe_transfer_data(). @@ -1780,7 +1807,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the pointer to the output format list will be written here. The list is terminated with AV_PIX_FMT_NONE and must be freed by the caller when no longer needed using av_free(). If this function returns successfully, the format list will have at least one item (not counting the terminator). On failure, the contents of this pointer are unspecified. /// currently unused, should be set to zero /// 0 on success, a negative AVERROR code on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_transfer_get_formats(AVBufferRef* @hwframe_ctx, AVHWFrameTransferDirection @dir, AVPixelFormat** @formats, int @flags); /// Allocate an image with size w and h and pixel format pix_fmt, and fill pointers and linesizes accordingly. The allocated image buffer has to be freed by using av_freep(&pointers[0]). @@ -1791,7 +1818,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the AVPixelFormat of the image /// the value to use for buffer size alignment /// the size in bytes required for the image buffer, a negative error code in case of failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_alloc(ref byte_ptr4 @pointers, ref int4 @linesizes, int @w, int @h, AVPixelFormat @pix_fmt, int @align); /// Check if the given sample aspect ratio of an image is valid. @@ -1799,7 +1826,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// height of the image /// sample aspect ratio of the image /// 0 if valid, a negative AVERROR code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_check_sar(uint @w, uint @h, AVRational @sar); /// Check if the given dimension of an image is valid, meaning that all bytes of the image can be addressed with a signed int. @@ -1808,7 +1835,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the offset to sum to the log level for logging with log_ctx /// the parent logging context, it may be NULL /// >= 0 if valid, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_check_size(uint @w, uint @h, int @log_offset, void* @log_ctx); /// Check if the given dimension of an image is valid, meaning that all bytes of a plane of an image with the specified pix_fmt can be addressed with a signed int. @@ -1819,7 +1846,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the offset to sum to the log level for logging with log_ctx /// the parent logging context, it may be NULL /// >= 0 if valid, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_check_size2(uint @w, uint @h, long @max_pixels, AVPixelFormat @pix_fmt, int @log_offset, void* @log_ctx); /// Copy image in src_data to dst_data. @@ -1830,7 +1857,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the AVPixelFormat of the image /// width of the image in pixels /// height of the image in pixels - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_copy(ref byte_ptr4 @dst_data, in int4 @dst_linesizes, in byte_ptr4 @src_data, in int4 @src_linesizes, AVPixelFormat @pix_fmt, int @width, int @height); /// Copy image plane from src to dst. That is, copy "height" number of lines of "bytewidth" bytes each. The first byte of each successive line is separated by *_linesize bytes. @@ -1839,11 +1866,11 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// source plane to copy from /// linesize for the image plane in src /// height (number of lines) of the plane - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_copy_plane(byte* @dst, int @dst_linesize, 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(). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_copy_plane_uc_from(byte* @dst, long @dst_linesize, byte* @src, long @src_linesize, long @bytewidth, int @height); /// Copy image data from an image into a buffer. @@ -1856,11 +1883,11 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the height of the source image in pixels /// the assumed linesize alignment for dst /// the number of bytes written to dst, or a negative value (error code) on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_copy_to_buffer(byte* @dst, int @dst_size, in byte_ptr4 @src_data, in int4 @src_linesize, AVPixelFormat @pix_fmt, int @width, int @height, int @align); /// 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(). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_copy_uc_from(ref byte_ptr4 @dst_data, in long4 @dst_linesizes, in byte_ptr4 @src_data, in long4 @src_linesizes, AVPixelFormat @pix_fmt, int @width, int @height); /// Setup the data pointers and linesizes based on the specified image parameters and the provided array. @@ -1872,7 +1899,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the height of the image in pixels /// the value used in src for linesize alignment /// the size in bytes required for src, a negative error code in case of failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_arrays(ref byte_ptr4 @dst_data, ref int4 @dst_linesize, byte* @src, AVPixelFormat @pix_fmt, int @width, int @height, int @align); /// Overwrite the image data with black. This is suitable for filling a sub-rectangle of an image, meaning the padding between the right most pixel and the left most pixel on the next line will not be overwritten. For some formats, the image size might be rounded up due to inherent alignment. @@ -1883,7 +1910,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the width of the image in pixels /// the height of the image in pixels /// 0 if the image data was cleared, a negative AVERROR code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_black(ref byte_ptr4 @dst_data, in long4 @dst_linesize, AVPixelFormat @pix_fmt, AVColorRange @range, int @width, int @height); /// Overwrite the image data with a color. This is suitable for filling a sub-rectangle of an image, meaning the padding between the right most pixel and the left most pixel on the next line will not be overwritten. For some formats, the image size might be rounded up due to inherent alignment. @@ -1895,7 +1922,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the height of the image in pixels /// currently unused /// 0 if the image data was filled, a negative AVERROR code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_color(ref byte_ptr4 @dst_data, in long4 @dst_linesize, AVPixelFormat @pix_fmt, in uint4 @color, int @width, int @height, int @flags); /// Fill plane linesizes for an image with pixel format pix_fmt and width width. @@ -1903,14 +1930,14 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the AVPixelFormat of the image /// width of the image in pixels /// >= 0 in case of success, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_linesizes(ref int4 @linesizes, AVPixelFormat @pix_fmt, int @width); /// Compute the max pixel step for each plane of an image with a format described by pixdesc. /// an array which is filled with the max pixel step for each plane. Since a plane may contain different pixel components, the computed max_pixsteps[plane] is relative to the component in the plane with the max pixel step. /// an array which is filled with the component for each plane which has the max pixel step. May be NULL. /// the AVPixFmtDescriptor for the image, describing its format - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_fill_max_pixsteps(ref int4 @max_pixsteps, ref int4 @max_pixstep_comps, AVPixFmtDescriptor* @pixdesc); /// Fill plane sizes for an image with pixel format pix_fmt and height height. @@ -1919,7 +1946,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// height of the image in pixels /// the array containing the linesize for each plane, should be filled by av_image_fill_linesizes() /// >= 0 in case of success, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_plane_sizes(ref ulong4 @size, AVPixelFormat @pix_fmt, int @height, in long4 @linesizes); /// Fill plane data pointers for an image with pixel format pix_fmt and height height. @@ -1929,7 +1956,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the pointer to a buffer which will contain the image /// the array containing the linesize for each plane, should be filled by av_image_fill_linesizes() /// the size in bytes required for the image buffer, a negative error code in case of failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_pointers(ref byte_ptr4 @data, AVPixelFormat @pix_fmt, int @height, byte* @ptr, in int4 @linesizes); /// Return the size in bytes of the amount of data required to store an image with the given parameters. @@ -1938,12 +1965,12 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// the height of the image in pixels /// the assumed linesize alignment /// the buffer size in bytes, a negative error code in case of failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_get_buffer_size(AVPixelFormat @pix_fmt, int @width, int @height, int @align); /// Compute the size of an image line with format pix_fmt and width width for the plane plane. /// the computed size in bytes - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_get_linesize(AVPixelFormat @pix_fmt, int @width, int @plane); /// Get the index for a specific timestamp. @@ -1951,49 +1978,40 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// timestamp to retrieve the index for /// if AVSEEK_FLAG_BACKWARD then the returned index 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 /// < 0 if no such timestamp could be found - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_index_search_timestamp(AVStream* @st, long @timestamp, int @flags); /// Initialize optional fields of a packet with default values. /// packet [Obsolete("This function is deprecated. Once it's removed, sizeof(AVPacket) will not be a part of the ABI anymore.")] - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_init_packet(AVPacket* @pkt); /// Audio input devices iterator. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_input_audio_device_next(AVInputFormat* @d); /// Video input devices iterator. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_input_video_device_next(AVInputFormat* @d); - /// Compute the length of an integer list. - /// size in bytes of each list element (only 1, 2, 4 or 8) - /// pointer to the list - /// list terminator (usually 0 or -1) - /// length of the list, in elements, not counting the terminator - [Obsolete()] - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] - public static extern uint av_int_list_length_for_size(uint @elsize, void* @list, ulong @term); - /// Write a packet to an output media file ensuring correct interleaving. /// media file handle /// The packet containing the data to be written. If the packet is reference-counted, this function will take ownership of this reference and unreference it later when it sees 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. Packet's "stream_index" field must be set to the index of the corresponding stream in "s->streams". The timestamps ( "pts", "dts") must be set to correct values in the stream's timebase (unless the output format is flagged with the AVFMT_NOTIMESTAMPS flag, then they can be set to AV_NOPTS_VALUE). 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). "duration" should also be set if known. /// 0 on success, a negative AVERROR on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_interleaved_write_frame(AVFormatContext* @s, AVPacket* @pkt); /// Write an uncoded frame to an output media file. /// >=0 for success, a negative code on error - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_interleaved_write_uncoded_frame(AVFormatContext* @s, int @stream_index, AVFrame* @frame); /// Send the specified message to the log if the level is less than or equal to the current av_log_level. By default, all logging messages are sent to stderr. This behavior can be altered by setting a different logging callback function. /// A pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct or NULL if general log. /// The importance level of the message expressed using a "Logging Constant". /// The format string (printf-compatible) that specifies how subsequent arguments are converted to output. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log(void* @avcl, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2007,7 +2025,7 @@ public static extern void av_log(void* @avcl, int @level, /// The importance level of the message expressed using a "Logging Constant". /// The format string (printf-compatible) that specifies how subsequent arguments are converted to output. /// The arguments referenced by the format string. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_default_callback(void* @avcl, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2020,7 +2038,7 @@ public static extern void av_log_default_callback(void* @avcl, int @level, /// buffer to receive the formatted line /// size of the buffer /// used to store whether the prefix must be printed; must point to a persistent integer initially set to 1 - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_format_line(void* @ptr, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2034,7 +2052,7 @@ public static extern void av_log_format_line(void* @ptr, int @level, /// size of the buffer; at most line_size-1 characters will be written to the buffer, plus one null terminator /// used to store whether the prefix must be printed; must point to a persistent integer initially set to 1 /// Returns a negative value if an error occurred, otherwise returns the number of characters that would have been written for a sufficiently large buffer, not including the terminating null character. If the return value is not less than line_size, it means that the log message was truncated to fit the buffer. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log_format_line2(void* @ptr, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2043,12 +2061,12 @@ public static extern int av_log_format_line2(void* @ptr, int @level, #endif string @fmt, byte* @vl, byte* @line, int @line_size, int* @print_prefix); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log_get_flags(); /// Get the current log level /// Current log level - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log_get_level(); /// Send the specified message to the log once with the initial_level and then with the subsequent_level. By default, all logging messages are sent to stderr. This behavior can be altered by setting a different logging callback function. @@ -2057,7 +2075,7 @@ public static extern int av_log_format_line2(void* @ptr, int @level, /// importance level of the message expressed using a "Logging Constant" after the first occurrence. /// a variable to keep trak of if a message has already been printed this must be initialized to 0 before the first use. The same state must not be accessed by 2 Threads simultaneously. /// The format string (printf-compatible) that specifies how subsequent arguments are converted to output. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_once(void* @avcl, int @initial_level, int @subsequent_level, int* @state, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2068,62 +2086,62 @@ public static extern void av_log_once(void* @avcl, int @initial_level, int @subs /// Set the logging callback /// A logging function with a compatible signature. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_set_callback(av_log_set_callback_callback_func @callback); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_set_flags(int @arg); /// Set the log level /// Logging level - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_set_level(int @level); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log2(uint @v); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log2_16bit(uint @v); /// Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU). /// Size in bytes for the memory block to be allocated /// Pointer to the allocated block, or `NULL` if the block cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_malloc(ulong @size); /// Allocate a memory block for an array with av_malloc(). /// Number of element /// Size of a single element /// Pointer to the allocated block, or `NULL` if the block cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_malloc_array(ulong @nmemb, ulong @size); /// Allocate a memory block with alignment suitable for all memory accesses (including vectors if available on the CPU) and zero all the bytes of the block. /// Size in bytes for the memory block to be allocated /// Pointer to the allocated block, or `NULL` if it cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_mallocz(ulong @size); /// Allocate an AVMasteringDisplayMetadata structure and set its fields to default values. The resulting struct can be freed using av_freep(). /// An AVMasteringDisplayMetadata filled with default values or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc(); /// Allocate an AVMasteringDisplayMetadata structure and set its fields to default values. The resulting struct can be freed using av_freep(). /// An AVMasteringDisplayMetadata filled with default values or NULL on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc_size(ulong* @size); /// Allocate a complete AVMasteringDisplayMetadata and add it to the frame. /// The frame which side data is added to. /// The AVMasteringDisplayMetadata structure to be filled by caller. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVMasteringDisplayMetadata* av_mastering_display_metadata_create_side_data(AVFrame* @frame); /// Return a positive value if the given filename has one of the given extensions, 0 otherwise. /// file name to check against the given extensions /// a comma-separated list of filename extensions - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_match_ext( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2140,21 +2158,21 @@ public static extern int av_match_ext( /// Set the maximum size that may be allocated in one block. /// Value to be set as the new maximum size - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_max_alloc(ulong @max); /// Overlapping memcpy() implementation. /// Destination buffer /// Number of bytes back to start copying (i.e. the initial size of the overlapping window); must be > 0 /// Number of bytes to copy; must be >= 0 - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_memcpy_backptr(byte* @dst, int @back, int @cnt); /// Duplicate a buffer with av_malloc(). /// Buffer to be duplicated /// Size in bytes of the buffer copied /// Pointer to a newly allocated buffer containing a copy of `p` or `NULL` if the buffer cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_memdup(void* @p, ulong @size); /// Make a RFC 4281/6381 like string describing a codec for MIME types. @@ -2162,20 +2180,20 @@ public static extern int av_match_ext( /// an AVRational for the frame rate, for deciding the right profile for video codecs. Pass an invalid AVRational (1/0) to indicate that it is unknown. /// the AVBPrint to write the output to /// < 0 on error - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_mime_codec_str(AVCodecParameters* @par, AVRational @frame_rate, AVBPrint* @out); /// Multiply two rationals. /// First rational /// Second rational /// b*c - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_mul_q(AVRational @b, AVRational @c); /// Iterate over all registered muxers. /// a pointer where libavformat will store the iteration state. Must point to NULL to start the iteration. /// the next registered muxer or NULL when the iteration is finished - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_muxer_iterate(void** @opaque); /// Find which of the two rationals is closer to another rational. @@ -2183,39 +2201,39 @@ public static extern int av_match_ext( /// Rational to be tested /// Rational to be tested /// One of the following values: - 1 if `q1` is nearer to `q` than `q2` - -1 if `q2` is nearer to `q` than `q1` - 0 if they have the same distance - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_nearer_q(AVRational @q, AVRational @q1, AVRational @q2); /// Allocate the payload of a packet and initialize its fields with default values. /// packet /// wanted payload size /// 0 if OK, AVERROR_xxx otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_new_packet(AVPacket* @pkt, int @size); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVProgram* av_new_program(AVFormatContext* @s, int @id); /// Iterate over potential AVOptions-enabled children of parent. /// a pointer where iteration state is stored. /// AVClass corresponding to next potential child or NULL - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* av_opt_child_class_iterate(AVClass* @parent, void** @iter); /// Iterate over AVOptions-enabled children of obj. /// result of a previous call to this function or NULL /// next AVOptions-enabled child or NULL - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_opt_child_next(void* @obj, void* @prev); /// Copy options from src object into dest object. /// Object to copy from /// Object to copy into /// 0 on success, negative on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_copy(void* @dest, void* @src); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_double(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2229,7 +2247,7 @@ public static extern int av_opt_eval_double(void* @obj, AVOption* @o, /// an option for which the string is to be evaluated. /// string to be evaluated. /// 0 on success, a negative number on failure. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_flags(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2238,7 +2256,7 @@ public static extern int av_opt_eval_flags(void* @obj, AVOption* @o, #endif string @val, int* @flags_out); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_float(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2247,7 +2265,7 @@ public static extern int av_opt_eval_float(void* @obj, AVOption* @o, #endif string @val, float* @float_out); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_int(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2256,7 +2274,7 @@ public static extern int av_opt_eval_int(void* @obj, AVOption* @o, #endif string @val, int* @int_out); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_int64(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2265,7 +2283,7 @@ public static extern int av_opt_eval_int64(void* @obj, AVOption* @o, #endif string @val, long* @int64_out); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_q(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2274,7 +2292,7 @@ public static extern int av_opt_eval_q(void* @obj, AVOption* @o, #endif string @val, AVRational* @q_out); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_uint(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2290,7 +2308,7 @@ public static extern int av_opt_eval_uint(void* @obj, AVOption* @o, /// Find only options with all the specified flags set (AV_OPT_FLAG). /// A combination of AV_OPT_SEARCH_*. /// A pointer to the option found, or NULL if no option was found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_find(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2313,7 +2331,7 @@ public static extern int av_opt_eval_uint(void* @obj, AVOption* @o, /// A combination of AV_OPT_SEARCH_*. /// if non-NULL, an object to which the option belongs will be written here. It may be different from obj if AV_OPT_SEARCH_CHILDREN is present in search_flags. This parameter is ignored if search_flags contain AV_OPT_SEARCH_FAKE_OBJ. /// A pointer to the option found, or NULL if no option was found. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_find2(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2332,7 +2350,7 @@ public static extern int av_opt_eval_uint(void* @obj, AVOption* @o, /// the name of the flag field option /// the name of the flag to check /// non-zero if the flag is set, zero if the flag isn't set, isn't of the right type, or the flags field doesn't exist. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_flag_is_set(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2348,11 +2366,11 @@ public static extern int av_opt_flag_is_set(void* @obj, string @flag_name); /// Free all allocated objects in obj. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_opt_free(void* @obj); /// Free an AVOptionRanges struct and set it to NULL. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_opt_freep_ranges(AVOptionRanges** @ranges); /// @{ Those functions get a value of the option with the given name from an object. @@ -2361,7 +2379,7 @@ public static extern int av_opt_flag_is_set(void* @obj, /// flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN is passed here, then the option may be found in a child of obj. /// value of the option will be written here /// >=0 on success, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2375,7 +2393,7 @@ public static extern int av_opt_get(void* @obj, /// number of array elements to retrieve; start_elem+nb_elems must not be larger than array size as returned by av_opt_get_array_size() /// Option type corresponding to the desired output. /// Array with nb_elems members into which the output will be written. The array type must match the underlying C type as documented for out_type, and be zeroed on entry to this function. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_array(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2385,7 +2403,7 @@ public static extern int av_opt_get_array(void* @obj, string @name, int @search_flags, uint @start_elem, uint @nb_elems, AVOptionType @out_type, void* @out_val); /// For an array-type option, get the number of elements in the array. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_array_size(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2395,7 +2413,7 @@ public static extern int av_opt_get_array_size(void* @obj, string @name, int @search_flags, uint* @out_val); /// The returned layout is a copy of the actual value and must be freed with av_channel_layout_uninit() by the caller - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_chlayout(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2405,7 +2423,7 @@ public static extern int av_opt_get_chlayout(void* @obj, string @name, int @search_flags, AVChannelLayout* @layout); /// The returned dictionary is a copy of the actual value and must be freed with av_dict_free() by the caller - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_dict_val(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2414,7 +2432,7 @@ public static extern int av_opt_get_dict_val(void* @obj, #endif string @name, int @search_flags, AVDictionary** @out_val); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_double(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2423,7 +2441,7 @@ public static extern int av_opt_get_double(void* @obj, #endif string @name, int @search_flags, double* @out_val); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_image_size(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2432,7 +2450,7 @@ public static extern int av_opt_get_image_size(void* @obj, #endif string @name, int @search_flags, int* @w_out, int* @h_out); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_int(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2449,7 +2467,7 @@ public static extern int av_opt_get_int(void* @obj, /// parsed key; must be freed using av_free() /// parsed value; must be freed using av_free() /// >=0 for success, or a negative value corresponding to an AVERROR code in case of error; in particular: AVERROR(EINVAL) if no key is present - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_key_value(byte** @ropts, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2464,7 +2482,7 @@ public static extern int av_opt_get_key_value(byte** @ropts, #endif string @pairs_sep, uint @flags, byte** @rkey, byte** @rval); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_pixel_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2473,7 +2491,7 @@ public static extern int av_opt_get_pixel_fmt(void* @obj, #endif string @name, int @search_flags, AVPixelFormat* @out_fmt); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_q(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2482,7 +2500,7 @@ public static extern int av_opt_get_q(void* @obj, #endif string @name, int @search_flags, AVRational* @out_val); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_sample_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2491,7 +2509,7 @@ public static extern int av_opt_get_sample_fmt(void* @obj, #endif string @name, int @search_flags, AVSampleFormat* @out_fmt); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_video_rate(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2504,7 +2522,7 @@ public static extern int av_opt_get_video_rate(void* @obj, /// AVClass object to check option on /// option to be checked /// >0 when option is set to its default, 0 when option is not set its default, < 0 on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_is_set_to_default(void* @obj, AVOption* @o); /// Check if given option is set to its default value. @@ -2512,7 +2530,7 @@ public static extern int av_opt_get_video_rate(void* @obj, /// option name /// combination of AV_OPT_SEARCH_* /// >0 when option is set to its default, 0 when option is not set its default, < 0 on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_is_set_to_default_by_name(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2525,24 +2543,13 @@ public static extern int av_opt_is_set_to_default_by_name(void* @obj, /// an AVOptions-enabled struct or a double pointer to an AVClass describing it. /// result of the previous call to av_opt_next() on this object or NULL /// next AVOption or NULL - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_next(void* @obj, AVOption* @prev); - /// Gets a pointer to the requested field in a struct. This function allows accessing a struct even when its fields are moved or renamed since the application making the access has been compiled, - [Obsolete("direct access to AVOption-exported fields is not supported")] - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] - public static extern void* av_opt_ptr(AVClass* @avclass, void* @obj, - #if NETSTANDARD2_1_OR_GREATER - [MarshalAs(UnmanagedType.LPUTF8Str)] - #else - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] - #endif - string @name); - /// Get a list of allowed ranges for the given option. /// is a bitmask of flags, undefined flags should not be set and should be ignored AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, /// number of components returned on success, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_query_ranges(AVOptionRanges** @p0, void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2554,7 +2561,7 @@ public static extern int av_opt_query_ranges(AVOptionRanges** @p0, void* @obj, /// Get a default list of allowed ranges for the given option. /// is a bitmask of flags, undefined flags should not be set and should be ignored AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, /// number of components returned on success, a negative error code otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_query_ranges_default(AVOptionRanges** @p0, void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2571,7 +2578,7 @@ public static extern int av_opt_query_ranges_default(AVOptionRanges** @p0, void* /// character used to separate key from value /// character used to separate two pairs from each other /// >= 0 on success, negative on error - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_serialize(void* @obj, int @opt_flags, int @flags, byte** @buffer, byte @key_val_sep, byte @pairs_sep); /// @{ Those functions set the field of obj with the given name to value. @@ -2580,7 +2587,7 @@ public static extern int av_opt_query_ranges_default(AVOptionRanges** @p0, void* /// The value to set. In case of av_opt_set() if the field is not of a string type, then the given string is parsed. SI postfixes and some named scalars are supported. If the field is of a numeric type, it has to be a numeric or named scalar. Behavior with more than one scalar and +- infix operators is undefined. If the field is of a flags type, it has to be a sequence of numeric scalars or named flags separated by '+' or '-'. Prefixing a flag with '+' causes it to be set without affecting the other flags; similarly, '-' unsets a flag. If the field is of a dictionary type, it has to be a ':' separated list of key=value parameters. Values containing ':' special characters must be escaped. /// flags passed to av_opt_find2. I.e. if AV_OPT_SEARCH_CHILDREN is passed here, then the option may be set on a child of obj. /// 0 if the value has been set, or an AVERROR code in case of error: AVERROR_OPTION_NOT_FOUND if no matching option exists AVERROR(ERANGE) if the value is out of range AVERROR(EINVAL) if the value is not valid - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2600,7 +2607,7 @@ public static extern int av_opt_set(void* @obj, /// number of array elements to modify; when val is NULL, start_elem+nb_elems must not be larger than array size as returned by av_opt_get_array_size() /// Option type corresponding to the type of val, ignored when val is NULL. /// Array with nb_elems elements or NULL. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_array(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2609,7 +2616,7 @@ public static extern int av_opt_set_array(void* @obj, #endif string @name, int @search_flags, uint @start_elem, uint @nb_elems, AVOptionType @val_type, void* @val); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_bin(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2618,7 +2625,7 @@ public static extern int av_opt_set_bin(void* @obj, #endif string @name, byte* @val, int @size, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_chlayout(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2629,24 +2636,24 @@ public static extern int av_opt_set_chlayout(void* @obj, /// Set the values of all AVOption fields to their default values. /// an AVOption-enabled struct (its first member must be a pointer to AVClass) - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_opt_set_defaults(void* @s); /// Set the values of all AVOption fields to their default values. Only these AVOption fields for which (opt->flags & mask) == flags will have their default applied to s. /// an AVOption-enabled struct (its first member must be a pointer to AVClass) /// combination of AV_OPT_FLAG_* /// combination of AV_OPT_FLAG_* - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_opt_set_defaults2(void* @s, int @mask, int @flags); /// Set all the options from a given dictionary on an object. /// a struct whose first element is a pointer to AVClass /// options to process. This dictionary will be freed and replaced by a new one containing all options not found in obj. Of course this new dictionary needs to be freed by caller with av_dict_free(). /// 0 on success, a negative AVERROR if some option was found in obj, but could not be set. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_dict(void* @obj, AVDictionary** @options); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_dict_val(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2660,10 +2667,10 @@ public static extern int av_opt_set_dict_val(void* @obj, /// options to process. This dictionary will be freed and replaced by a new one containing all options not found in obj. Of course this new dictionary needs to be freed by caller with av_dict_free(). /// A combination of AV_OPT_SEARCH_*. /// 0 on success, a negative AVERROR if some option was found in obj, but could not be set. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_dict2(void* @obj, AVDictionary** @options, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_double(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2679,7 +2686,7 @@ public static extern int av_opt_set_double(void* @obj, /// a 0-terminated list of characters used to separate key from value, for example '=' /// a 0-terminated list of characters used to separate two pairs from each other, for example ':' or ',' /// the number of successfully set key=value pairs, or a negative value corresponding to an AVERROR code in case of error: AVERROR(EINVAL) if opts cannot be parsed, the error code issued by av_set_string3() if a key/value pair cannot be set - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_from_string(void* @ctx, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2700,7 +2707,7 @@ public static extern int av_opt_set_from_string(void* @ctx, #endif string @pairs_sep); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_image_size(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2709,7 +2716,7 @@ public static extern int av_opt_set_image_size(void* @obj, #endif string @name, int @w, int @h, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_int(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2718,7 +2725,7 @@ public static extern int av_opt_set_int(void* @obj, #endif string @name, long @val, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_pixel_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2727,7 +2734,7 @@ public static extern int av_opt_set_pixel_fmt(void* @obj, #endif string @name, AVPixelFormat @fmt, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_q(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2736,7 +2743,7 @@ public static extern int av_opt_set_q(void* @obj, #endif string @name, AVRational @val, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_sample_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2745,7 +2752,7 @@ public static extern int av_opt_set_sample_fmt(void* @obj, #endif string @name, AVSampleFormat @fmt, int @search_flags); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_video_rate(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2758,15 +2765,15 @@ public static extern int av_opt_set_video_rate(void* @obj, /// log context to use for showing the options /// requested flags for the options to show. Show only the options for which it is opt->flags & req_flags. /// rejected flags for the options to show. Show only the options for which it is !(opt->flags & req_flags). - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_show2(void* @obj, void* @av_log_obj, int @req_flags, int @rej_flags); /// Audio output devices iterator. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_output_audio_device_next(AVOutputFormat* @d); /// Video output devices iterator. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_output_video_device_next(AVOutputFormat* @d); /// Wrap an existing array as a packet side data. @@ -2775,34 +2782,34 @@ public static extern int av_opt_set_video_rate(void* @obj, /// the side data array. It must be allocated with the av_malloc() family of functions. The ownership of the data is transferred to pkt. /// side information size /// a non-negative number on success, a negative AVERROR code on failure. On failure, the packet is unchanged and the data remains owned by the caller. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_add_side_data(AVPacket* @pkt, AVPacketSideDataType @type, byte* @data, ulong @size); /// Allocate an AVPacket and set its fields to default values. The resulting struct must be freed using av_packet_free(). /// An AVPacket filled with default values or NULL on failure. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPacket* av_packet_alloc(); /// Create a new packet that references the same data as src. /// newly created AVPacket on success, NULL on error. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPacket* av_packet_clone(AVPacket* @src); /// Copy only "properties" fields from src to dst. /// Destination packet /// Source packet /// 0 on success AVERROR on failure. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_copy_props(AVPacket* @dst, AVPacket* @src); /// Free the packet, if the packet is reference counted, it will be unreferenced first. /// packet to be freed. The pointer will be set to NULL. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_free(AVPacket** @pkt); /// Convenience function to free all the side data stored. All the other fields stay untouched. /// packet - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_free_side_data(AVPacket* @pkt); /// Initialize a reference-counted packet from av_malloc()ed data. @@ -2810,7 +2817,7 @@ public static extern int av_opt_set_video_rate(void* @obj, /// Data allocated by av_malloc() to be used as packet data. If this function returns successfully, the data is owned by the underlying AVBuffer. The caller may not access the data through other means. /// size of data in bytes, without the padding. I.e. the full buffer size is assumed to be size + AV_INPUT_BUFFER_PADDING_SIZE. /// 0 on success, a negative AVERROR on error - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_from_data(AVPacket* @pkt, byte* @data, int @size); /// Get side information from packet. @@ -2818,25 +2825,25 @@ public static extern int av_opt_set_video_rate(void* @obj, /// desired side information type /// If supplied, *size will be set to the size of the side data or to zero if the desired side data is not present. /// pointer to data if present or NULL otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_packet_get_side_data(AVPacket* @pkt, AVPacketSideDataType @type, ulong* @size); /// Ensure the data described by a given packet is reference counted. /// packet whose data should be made reference counted. /// 0 on success, a negative AVERROR on error. On failure, the packet is unchanged. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_make_refcounted(AVPacket* @pkt); /// Create a writable reference for the data described by a given packet, avoiding data copy if possible. /// Packet whose data should be made writable. /// 0 on success, a negative AVERROR on failure. On failure, the packet is unchanged. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_make_writable(AVPacket* @pkt); /// Move every field in src to dst and reset src. /// Destination packet /// Source packet, will be reset - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_move_ref(AVPacket* @dst, AVPacket* @src); /// Allocate new information of a packet. @@ -2844,28 +2851,28 @@ public static extern int av_opt_set_video_rate(void* @obj, /// side information type /// side information size /// pointer to fresh allocated data or NULL otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_packet_new_side_data(AVPacket* @pkt, AVPacketSideDataType @type, ulong @size); /// Pack a dictionary for use in side_data. /// The dictionary to pack. /// pointer to store the size of the returned data /// pointer to data if successful, NULL otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_packet_pack_dictionary(AVDictionary* @dict, ulong* @size); /// Setup a new reference to the data described by a given packet /// Destination packet. Will be completely overwritten. /// Source packet /// 0 on success, a negative AVERROR on error. On error, dst will be blank (as if returned by av_packet_alloc()). - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_ref(AVPacket* @dst, AVPacket* @src); /// Convert valid timing fields (timestamps / durations) in a packet from one timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) will be ignored. /// packet on which the conversion will be performed /// source timebase, in which the timing fields in pkt are expressed /// destination timebase, to which the timing fields will be converted - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_rescale_ts(AVPacket* @pkt, AVRational @tb_src, AVRational @tb_dst); /// Shrink the already allocated side data buffer @@ -2873,7 +2880,7 @@ public static extern int av_opt_set_video_rate(void* @obj, /// side information type /// new side information size /// 0 on success, < 0 on failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_shrink_side_data(AVPacket* @pkt, AVPacketSideDataType @type, ulong @size); /// Wrap existing data as packet side data. @@ -2884,18 +2891,18 @@ public static extern int av_opt_set_video_rate(void* @obj, /// size of the data array /// currently unused. Must be zero /// pointer to freshly allocated side data on success, or NULL otherwise On failure, the side data array is unchanged and the data remains owned by the caller. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPacketSideData* av_packet_side_data_add(AVPacketSideData** @sd, int* @nb_sd, AVPacketSideDataType @type, void* @data, ulong @size, int @flags); /// Convenience function to free all the side data stored in an array, and the array itself. /// pointer to array of side data to free. Will be set to NULL upon return. /// pointer to an integer containing the number of entries in the array. Will be set to 0 upon return. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_side_data_free(AVPacketSideData** @sd, int* @nb_sd); /// Add a new packet side data entry to an array based on existing frame side data, if a matching type exists for packet side data. /// Currently unused. Must be 0. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_side_data_from_frame(AVPacketSideData** @sd, int* @nb_sd, AVFrameSideData* @src, uint @flags); /// Get side information from a side data array. @@ -2903,10 +2910,10 @@ public static extern int av_opt_set_video_rate(void* @obj, /// value containing the number of entries in the array. /// desired side information type /// pointer to side data if present or NULL otherwise - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPacketSideData* av_packet_side_data_get(AVPacketSideData* @sd, int @nb_sd, AVPacketSideDataType @type); - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_packet_side_data_name(AVPacketSideDataType @type); @@ -2915,19 +2922,19 @@ public static extern int av_opt_set_video_rate(void* @obj, /// desired side data size /// currently unused. Must be zero /// pointer to freshly allocated side data on success, or NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPacketSideData* av_packet_side_data_new(AVPacketSideData** @psd, int* @pnb_sd, AVPacketSideDataType @type, ulong @size, int @flags); /// Remove side data of the given type from a side data array. /// the array from which the side data should be removed /// pointer to an integer containing the number of entries in the array. Will be reduced by the amount of entries removed upon return /// side information type - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_side_data_remove(AVPacketSideData* @sd, int* @nb_sd, AVPacketSideDataType @type); /// Add a new frame side data entry to an array based on existing packet side data, if a matching type exists for frame side data. /// Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_side_data_to_frame(AVFrameSideData*** @sd, int* @nb_sd, AVPacketSideData* @src, uint @flags); /// Unpack a dictionary from side_data. @@ -2935,17 +2942,17 @@ public static extern int av_opt_set_video_rate(void* @obj, /// size of the data /// the metadata storage dictionary /// 0 on success, < 0 on failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_unpack_dictionary(byte* @data, ulong @size, AVDictionary** @dict); /// Wipe the packet. /// The packet to be unreferenced. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_unref(AVPacket* @pkt); /// Parse CPU caps from a string and update the given AV_CPU_* flags based on that. /// negative on error. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_parse_cpu_caps(uint* @flags, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2954,16 +2961,16 @@ public static extern int av_parse_cpu_caps(uint* @flags, #endif string @s); - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_parser_close(AVCodecParserContext* @s); - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] - public static extern AVCodecParserContext* av_parser_init(int @codec_id); + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] + public static extern AVCodecParserContext* av_parser_init(AVCodecID @codec_id); /// Iterate over all registered codec parsers. /// a pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration. /// the next registered codec parser or NULL when the iteration is finished - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParser* av_parser_iterate(void** @opaque); /// Parse a packet. @@ -2977,28 +2984,28 @@ public static extern int av_parse_cpu_caps(uint* @flags, /// input decoding timestamp. /// input byte position in stream. /// the number of bytes of the input bitstream used. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_parser_parse2(AVCodecParserContext* @s, AVCodecContext* @avctx, byte** @poutbuf, int* @poutbuf_size, byte* @buf, int @buf_size, long @pts, long @dts, long @pos); /// Returns number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a valid pixel format. /// number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a valid pixel format. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_pix_fmt_count_planes(AVPixelFormat @pix_fmt); /// Returns a pixel format descriptor for provided pixel format or NULL if this pixel format is unknown. /// a pixel format descriptor for provided pixel format or NULL if this pixel format is unknown. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixFmtDescriptor* av_pix_fmt_desc_get(AVPixelFormat @pix_fmt); /// Returns an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc is not a valid pointer to a pixel format descriptor. /// an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc is not a valid pointer to a pixel format descriptor. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat av_pix_fmt_desc_get_id(AVPixFmtDescriptor* @desc); /// Iterate over all pixel format descriptors known to libavutil. /// previous descriptor. NULL to get the first descriptor. /// next descriptor or NULL after the last descriptor - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixFmtDescriptor* av_pix_fmt_desc_next(AVPixFmtDescriptor* @prev); /// Utility function to access log2_chroma_w log2_chroma_h from the pixel format AVPixFmtDescriptor. @@ -3006,13 +3013,13 @@ public static extern int av_parse_cpu_caps(uint* @flags, /// store log2_chroma_w (horizontal/width shift) /// store log2_chroma_h (vertical/height shift) /// 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_pix_fmt_get_chroma_sub_sample(AVPixelFormat @pix_fmt, int* @h_shift, int* @v_shift); /// Utility function to swap the endianness of a pixel format. /// the pixel format /// pixel format with swapped endianness if it exists, otherwise AV_PIX_FMT_NONE - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat av_pix_fmt_swap_endianness(AVPixelFormat @pix_fmt); /// Send a nice dump of a packet to the log. @@ -3021,7 +3028,7 @@ public static extern int av_parse_cpu_caps(uint* @flags, /// packet to dump /// True if the payload must be displayed, too. /// AVStream that the packet belongs to - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_pkt_dump_log2(void* @avcl, int @level, AVPacket* @pkt, int @dump_payload, AVStream* @st); /// Send a nice dump of a packet to the specified file stream. @@ -3029,11 +3036,11 @@ public static extern int av_parse_cpu_caps(uint* @flags, /// packet to dump /// True if the payload must be displayed, too. /// AVStream that the packet belongs to - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_pkt_dump2(_iobuf* @f, AVPacket* @pkt, int @dump_payload, AVStream* @st); /// Like av_probe_input_buffer2() but returns 0 on success - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_probe_input_buffer(AVIOContext* @pb, AVInputFormat** @fmt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3050,7 +3057,7 @@ public static extern int av_probe_input_buffer(AVIOContext* @pb, AVInputFormat** /// the offset within the bytestream to probe from /// the maximum probe buffer size (zero for default) /// the score in case of success, a negative value corresponding to an the maximal score is AVPROBE_SCORE_MAX AVERROR code otherwise - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat** @fmt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3062,37 +3069,54 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// Guess the file format. /// data to be probed /// Whether the file is already opened; determines whether demuxers with or without AVFMT_NOFILE are probed. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_probe_input_format(AVProbeData* @pd, int @is_opened); /// Guess the file format. /// data to be probed /// Whether the file is already opened; determines whether demuxers with or without AVFMT_NOFILE are probed. /// A probe score larger that this is required to accept a detection, the variable is set to the actual detection score afterwards. If the score is < = AVPROBE_SCORE_MAX / 4 it is recommended to retry with a larger probe buffer. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_probe_input_format2(AVProbeData* @pd, int @is_opened, int* @score_max); /// Guess the file format. /// Whether the file is already opened; determines whether demuxers with or without AVFMT_NOFILE are probed. /// The score of the best detection. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_probe_input_format3(AVProbeData* @pd, int @is_opened, int* @score_ret); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_program_add_stream_index(AVFormatContext* @ac, int @progid, uint @idx); + /// Add the supplied index of a stream to the AVProgram with matching id. + /// the format context which contains the target AVProgram + /// the ID of the AVProgram whose stream index is to be updated + /// the index of the stream to be added + /// >=0 upon successful addition or if index was already present, AVERROR if no matching program is found or stream index is invalid or the stream index array reallocation failed. + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_program_add_stream_index2(AVFormatContext* @ac, int @progid, uint @idx); + + /// Copy an AVProgram from one AVFormatContext to another. + /// pointer to the target muxer context + /// pointer to the source muxer context + /// ID of the program to be copied + /// combination of flags which determine how streams are matched and whether pre-existing AVProgram in target is overwritten. If no match condition is set, streams will be matched by ids if all source stream ids are non-zero and unique, else by index. + /// >= 0 in case of success, Error EEXIST if target already has program with same ID and overwrite flag isn't set, else a negative AVERROR code in case of other failures. + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_program_copy(AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags); + /// Convert an AVRational to a IEEE 32-bit `float` expressed in fixed-point format. /// Rational to be converted /// Equivalent floating-point value, expressed as an unsigned 32-bit integer. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_q2intfloat(AVRational @q); /// Return the next frame of a stream. This function returns what is stored in the file, and does not validate that what is there are valid frames for the decoder. It will split what is stored in the file into frames and return one for each call. It will not omit invalid data between valid frames so as to give the decoder the maximum information possible for decoding. /// 0 if OK, < 0 on error or end of file. On error, pkt will be blank (as if it came from av_packet_alloc()). - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_read_frame(AVFormatContext* @s, AVPacket* @pkt); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_read_image_line(ushort* @dst, in byte_ptr4 @data, in int4 @linesize, AVPixFmtDescriptor* @desc, int @x, int @y, int @c, int @w, int @read_pal_component); /// Read a line from an image, and write the values of the pixel format component c to dst. @@ -3104,22 +3128,22 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// the width of the line to read, that is the number of values to write to dst /// if not zero and the format is a paletted format writes the values corresponding to the palette component c in data[1] to dst, rather than the palette indexes in data[0]. The behavior is undefined if the format is not paletted. /// size of elements in dst array (2 or 4 byte) - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_read_image_line2(void* @dst, in byte_ptr4 @data, in int4 @linesize, AVPixFmtDescriptor* @desc, int @x, int @y, int @c, int @w, int @read_pal_component, int @dst_element_size); /// Pause a network-based stream (e.g. RTSP stream). - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_read_pause(AVFormatContext* @s); /// Start playing a network-based stream (e.g. RTSP stream) at the current position. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_read_play(AVFormatContext* @s); /// Allocate, reallocate, or free a block of memory. /// Pointer to a memory block already allocated with av_realloc() or `NULL` /// Size in bytes of the memory block to be allocated or reallocated /// Pointer to a newly-reallocated block or `NULL` if the block cannot be reallocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_realloc(void* @ptr, ulong @size); /// Allocate, reallocate, or free an array. @@ -3127,18 +3151,18 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// Number of elements in the array /// Size of the single element of the array /// Pointer to a newly-reallocated block or NULL if the block cannot be reallocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_realloc_array(void* @ptr, ulong @nmemb, ulong @size); /// Allocate, reallocate, or free a block of memory. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_realloc_f(void* @ptr, ulong @nelem, ulong @elsize); /// Allocate, reallocate, or free a block of memory through a pointer to a pointer. /// Pointer to a pointer to a memory block already allocated with av_realloc(), or a pointer to `NULL`. The pointer is updated on success, or freed on failure. /// Size in bytes for the memory block to be allocated or reallocated /// Zero on success, an AVERROR error code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_reallocp(void* @ptr, ulong @size); /// Allocate, reallocate an array through a pointer to a pointer. @@ -3146,7 +3170,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// Number of elements /// Size of the single element /// Zero on success, an AVERROR error code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_reallocp_array(void* @ptr, ulong @nmemb, ulong @size); /// Reduce a fraction. @@ -3156,11 +3180,11 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// Source denominator /// Maximum allowed values for `dst_num` & `dst_den` /// 1 if the operation is exact, 0 otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_reduce(int* @dst_num, int* @dst_den, long @num, long @den, long @max); /// Rescale a 64-bit integer with rounding to nearest. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_rescale(long @a, long @b, long @c); /// Rescale a timestamp while preserving known durations. @@ -3171,25 +3195,25 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// Pointer to a timestamp expressed in terms of `fs_tb`, acting as a state variable /// Output timebase /// Timestamp expressed in terms of `out_tb` - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_rescale_delta(AVRational @in_tb, long @in_ts, AVRational @fs_tb, int @duration, long* @last, AVRational @out_tb); /// Rescale a 64-bit integer by 2 rational numbers. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_rescale_q(long @a, AVRational @bq, AVRational @cq); /// Rescale a 64-bit integer by 2 rational numbers with specified rounding. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_rescale_q_rnd(long @a, AVRational @bq, AVRational @cq, AVRounding @rnd); /// Rescale a 64-bit integer with specified rounding. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern long av_rescale_rnd(long @a, long @b, long @c, AVRounding @rnd); /// Check if the sample format is planar. /// the sample format to inspect /// 1 if the sample format is planar, 0 if it is interleaved - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_sample_fmt_is_planar(AVSampleFormat @sample_fmt); /// Allocate a samples buffer for nb_samples samples, and fill data pointers and linesize accordingly. The allocated samples buffer can be freed by using av_freep(&audio_data[0]) Allocated data will be initialized to silence. @@ -3200,11 +3224,11 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// >=0 on success or a negative error code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_samples_alloc(byte** @audio_data, int* @linesize, int @nb_channels, int @nb_samples, AVSampleFormat @sample_fmt, int @align); /// Allocate a data pointers array, samples buffer for nb_samples samples, and fill data pointers and linesize accordingly. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_samples_alloc_array_and_samples(byte*** @audio_data, int* @linesize, int @nb_channels, int @nb_samples, AVSampleFormat @sample_fmt, int @align); /// Copy samples from src to dst. @@ -3215,7 +3239,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// number of samples to be copied /// number of audio channels /// audio sample format - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_samples_copy(byte** @dst, byte** @src, int @dst_offset, int @src_offset, int @nb_samples, int @nb_channels, AVSampleFormat @sample_fmt); /// Fill plane data pointers and linesize for samples with sample format sample_fmt. @@ -3227,7 +3251,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// minimum size in bytes required for the buffer on success, or a negative error code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_samples_fill_arrays(byte** @audio_data, int* @linesize, byte* @buf, int @nb_channels, int @nb_samples, AVSampleFormat @sample_fmt, int @align); /// Get the required buffer size for the given audio parameters. @@ -3237,7 +3261,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// required buffer size, or negative error code on failure - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_samples_get_buffer_size(int* @linesize, int @nb_channels, int @nb_samples, AVSampleFormat @sample_fmt, int @align); /// Fill an audio buffer with silence. @@ -3246,7 +3270,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// number of samples to fill /// number of audio channels /// audio sample format - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_samples_set_silence(byte** @audio_data, int @offset, int @nb_samples, int @nb_channels, AVSampleFormat @sample_fmt); /// Generate an SDP for an RTP session. @@ -3255,7 +3279,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// buffer where the SDP will be stored (must be allocated by the caller) /// the size of the buffer /// 0 if OK, AVERROR_xxx on error - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_sdp_create(AVFormatContext** @ac, int @n_files, byte* @buf, int @size); /// Seek to the keyframe at timestamp. 'timestamp' in 'stream_index'. @@ -3264,7 +3288,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// Timestamp in AVStream.time_base units or, if no stream is specified, in AV_TIME_BASE units. /// flags which select direction and seeking mode /// >= 0 on success - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_seek_frame(AVFormatContext* @s, int @stream_index, long @timestamp, int @flags); /// Parse the key/value pairs list in opts. For each key/value pair found, stores the value in the field in ctx that is named like the key. ctx must be an AVClass context, storing is done using AVOptions. @@ -3272,7 +3296,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// a 0-terminated list of characters used to separate key from value /// a 0-terminated list of characters used to separate two pairs from each other /// the number of successfully set key/value pairs, or a negative value corresponding to an AVERROR code in case of error: AVERROR(EINVAL) if opts cannot be parsed, the error code issued by av_opt_set() if a key/value pair cannot be set - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_set_options_string(void* @ctx, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3296,7 +3320,7 @@ public static extern int av_set_options_string(void* @ctx, /// Reduce packet size, correctly zeroing padding /// packet /// new size - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_shrink_packet(AVPacket* @pkt, int @size); /// Multiply two `size_t` values checking for overflow. @@ -3304,13 +3328,13 @@ public static extern int av_set_options_string(void* @ctx, /// Operand of multiplication /// Pointer to the result of the operation /// 0 on success, AVERROR(EINVAL) on overflow - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_size_mult(ulong @a, ulong @b, ulong* @r); /// Duplicate a string. /// String to be duplicated /// Pointer to a newly-allocated string containing a copy of `s` or `NULL` if the string cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_strdup( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3320,18 +3344,14 @@ public static extern int av_set_options_string(void* @ctx, string @s); /// Get the AVClass for AVStream. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* av_stream_get_class(); - [Obsolete("do not call this function")] - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] - public static extern AVRational av_stream_get_codec_timebase(AVStream* @st); - - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParserContext* av_stream_get_parser(AVStream* @s); /// Get the AVClass for AVStreamGroup. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* av_stream_group_get_class(); /// Put a description of the AVERROR code errnum in errbuf. In case of failure the global variable errno is set to indicate the error. Even in case of failure av_strerror() will print a generic error message indicating the errnum provided to errbuf. @@ -3339,14 +3359,14 @@ public static extern int av_set_options_string(void* @ctx, /// buffer to which description is written /// the size in bytes of errbuf /// 0 on success, a negative value if a description for errnum cannot be found - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_strerror(int @errnum, byte* @errbuf, ulong @errbuf_size); /// Duplicate a substring of a string. /// String to be duplicated /// Maximum length of the resulting string (not counting the terminating byte) /// Pointer to a newly-allocated string containing a substring of `s` or `NULL` if the string cannot be allocated - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_strndup( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3359,19 +3379,19 @@ public static extern int av_set_options_string(void* @ctx, /// First rational /// Second rational /// b-c - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_sub_q(AVRational @b, AVRational @c); /// Adjust frame number for NTSC drop frame time code. /// frame number to adjust /// frame per second, multiples of 30 /// adjusted frame number - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_adjust_ntsc_framenum2(int @framenum, int @fps); /// Check if the timecode feature is available for the given frame rate /// 0 if supported, < 0 otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_check_frame_rate(AVRational @rate); /// Convert sei info to SMPTE 12M binary representation. @@ -3382,14 +3402,14 @@ public static extern int av_set_options_string(void* @ctx, /// second /// frame number /// the SMPTE binary representation - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_timecode_get_smpte(AVRational @rate, int @drop, int @hh, int @mm, int @ss, int @ff); /// Convert frame number to SMPTE 12M binary representation. /// timecode data correctly initialized /// frame number /// the SMPTE binary representation - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_timecode_get_smpte_from_framenum(AVTimecode* @tc, int @framenum); /// Init a timecode struct with the passed parameters. @@ -3399,7 +3419,7 @@ public static extern int av_set_options_string(void* @ctx, /// the first frame number /// a pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct (used for av_log) /// 0 on success, AVERROR otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_init(AVTimecode* @tc, AVRational @rate, int @flags, int @frame_start, void* @log_ctx); /// Init a timecode struct from the passed timecode components. @@ -3412,7 +3432,7 @@ public static extern int av_set_options_string(void* @ctx, /// frames /// a pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct (used for av_log) /// 0 on success, AVERROR otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_init_from_components(AVTimecode* @tc, AVRational @rate, int @flags, int @hh, int @mm, int @ss, int @ff, void* @log_ctx); /// Parse timecode representation (hh:mm:ss[:;.]ff). @@ -3421,7 +3441,7 @@ public static extern int av_set_options_string(void* @ctx, /// timecode string which will determine the frame start /// a pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct (used for av_log). /// 0 on success, AVERROR otherwise - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRational @rate, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3434,7 +3454,7 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// destination buffer, must be at least AV_TIMECODE_STR_SIZE long /// the 25-bits timecode /// the buf parameter - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_timecode_make_mpeg_tc_string(byte* @buf, uint @tc25bit); /// Get the timecode string from the SMPTE timecode format. @@ -3442,7 +3462,7 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// the 32-bit SMPTE timecode /// prevent the use of a drop flag when it is known the DF bit is arbitrary /// the buf parameter - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_timecode_make_smpte_tc_string(byte* @buf, uint @tcsmpte, int @prevent_df); /// Get the timecode string from the SMPTE timecode format. @@ -3452,7 +3472,7 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// prevent the use of a drop flag when it is known the DF bit is arbitrary /// prevent the use of a field flag when it is known the field bit is arbitrary (e.g. because it is used as PC flag) /// the buf parameter - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_timecode_make_smpte_tc_string2(byte* @buf, AVRational @rate, uint @tcsmpte, int @prevent_df, int @skip_field); /// Load timecode string in buf. @@ -3460,15 +3480,15 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// destination buffer, must be at least AV_TIMECODE_STR_SIZE long /// frame number /// the buf parameter - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_timecode_make_string(AVTimecode* @tc, byte* @buf, int @framenum); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_tree_destroy(AVTreeNode* @t); /// Apply enu(opaque, &elem) to all the elements in the tree in a given range. /// a comparison function that returns < 0 for an element below the range, > 0 for an element above the range and == 0 for an element inside the range - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_tree_enumerate(AVTreeNode* @t, void* @opaque, av_tree_enumerate_cmp_func @cmp, av_tree_enumerate_enu_func @enu); /// Find an element. @@ -3476,7 +3496,7 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// compare function used to compare elements in the tree, API identical to that of Standard C's qsort It is guaranteed that the first and only the first argument to cmp() will be the key parameter to av_tree_find(), thus it could if the user wants, be a different type (like an opaque context). /// If next is not NULL, then next[0] will contain the previous element and next[1] the next element. If either does not exist, then the corresponding entry in next is unchanged. /// An element with cmp(key, elem) == 0 or NULL if no such element exists in the tree. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_tree_find(AVTreeNode* @root, void* @key, av_tree_find_cmp_func @cmp, ref void_ptr2 @next); /// Insert or remove an element. @@ -3485,11 +3505,11 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// compare function used to compare elements in the tree, API identical to that of Standard C's qsort /// Used to allocate and free AVTreeNodes. For insertion the user must set it to an allocated and zeroed object of at least av_tree_node_size bytes size. av_tree_insert() will set it to NULL if it has been consumed. For deleting elements *next is set to NULL by the user and av_tree_insert() will set it to the AVTreeNode which was used for the removed element. This allows the use of flat arrays, which have lower overhead compared to many malloced elements. You might want to define a function like: /// If no insertion happened, the found element; if an insertion or removal happened, then either key or NULL will be returned. Which one it is depends on the tree state and the implementation. You should make no assumptions that it's one or the other in the code. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_tree_insert(AVTreeNode** @rootp, void* @key, av_tree_insert_cmp_func @cmp, AVTreeNode** @next); /// Allocate an AVTreeNode. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern AVTreeNode* av_tree_node_alloc(); /// Split a URL string into components. @@ -3503,7 +3523,7 @@ public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRationa /// the buffer for the path /// the size of the path buffer /// the URL to split - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void av_url_split(byte* @proto, int @proto_size, byte* @authorization, int @authorization_size, byte* @hostname, int @hostname_size, int* @port_ptr, byte* @path, int @path_size, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3515,11 +3535,11 @@ public static extern void av_url_split(byte* @proto, int @proto_size, byte* @aut /// Sleep for a period of time. Although the duration is expressed in microseconds, the actual delay may be rounded to the precision of the system timer. /// Number of microseconds to sleep. /// zero on success or (negative) error code. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern int av_usleep(uint @usec); /// Return an informative version string. This usually is the actual release version number or a git commit description. This string has no fixed format and can change any time. It should never be parsed by code. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_version_info(); @@ -3528,7 +3548,7 @@ public static extern void av_url_split(byte* @proto, int @proto_size, byte* @aut /// The importance level of the message expressed using a "Logging Constant". /// The format string (printf-compatible) that specifies how subsequent arguments are converted to output. /// The arguments referenced by the format string. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_vlog(void* @avcl, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3541,10 +3561,10 @@ public static extern void av_vlog(void* @avcl, int @level, /// media file handle /// The packet containing the data to be written. Note that unlike av_interleaved_write_frame(), this function does not take ownership of the packet passed to it (though some muxers may make an internal reference to the input packet). This parameter can be NULL (at any time, not just at the end), in order to immediately flush data buffered within the muxer, for muxers that buffer up data internally before writing it to the output. Packet's "stream_index" field must be set to the index of the corresponding stream in "s->streams". The timestamps ( "pts", "dts") must be set to correct values in the stream's timebase (unless the output format is flagged with the AVFMT_NOTIMESTAMPS flag, then they can be set to AV_NOPTS_VALUE). The dts for subsequent packets passed to this function must be strictly increasing when compared in their respective timebases (unless the output format is flagged with the AVFMT_TS_NONSTRICT, then they merely have to be nondecreasing). "duration") should also be set if known. /// < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_write_frame(AVFormatContext* @s, AVPacket* @pkt); - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_write_image_line(ushort* @src, ref byte_ptr4 @data, in int4 @linesize, AVPixFmtDescriptor* @desc, int @x, int @y, int @c, int @w); /// Write the values from src to the pixel format component c of an image line. @@ -3556,47 +3576,47 @@ public static extern void av_vlog(void* @avcl, int @level, /// the vertical coordinate of the first pixel to write /// the width of the line to write, that is the number of values to write to the image line /// size of elements in src array (2 or 4 byte) - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern void av_write_image_line2(void* @src, ref byte_ptr4 @data, in int4 @linesize, AVPixFmtDescriptor* @desc, int @x, int @y, int @c, int @w, int @src_element_size); /// Write the stream trailer to an output media file and free the file private data. /// media file handle /// 0 if OK, AVERROR_xxx on error - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_write_trailer(AVFormatContext* @s); /// Write an uncoded frame to an output media file. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_write_uncoded_frame(AVFormatContext* @s, int @stream_index, AVFrame* @frame); /// Test whether a muxer supports uncoded frame. /// >=0 if an uncoded frame can be written to that muxer and stream, < 0 if not - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int av_write_uncoded_frame_query(AVFormatContext* @s, int @stream_index); /// Encode extradata length to a buffer. Used by xiph codecs. /// buffer to write to; must be at least (v/255+1) bytes long /// size of extradata in bytes /// number of bytes written to the buffer. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_xiphlacing(byte* @s, uint @v); /// Modify width and height values so that they will result in a memory buffer that is acceptable for the codec if you do not use any horizontal padding. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_align_dimensions(AVCodecContext* @s, int* @width, int* @height); /// Modify width and height values so that they will result in a memory buffer that is acceptable for the codec if you also ensure that all line sizes are a multiple of the respective linesize_align[i]. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_align_dimensions2(AVCodecContext* @s, int* @width, int* @height, ref int8 @linesize_align); /// Allocate an AVCodecContext and set its fields to default values. The resulting struct should be freed with avcodec_free_context(). /// if non-NULL, allocate private data and initialize defaults for the given codec. It is illegal to then call avcodec_open2() with a different codec. If NULL, then the codec-specific defaults won't be initialized, which may result in suboptimal default settings (this is important mainly for encoders, e.g. libx264). /// An AVCodecContext filled with default values or NULL on failure. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecContext* avcodec_alloc_context3(AVCodec* @codec); /// Return the libavcodec build-time configuration. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_configuration(); @@ -3605,34 +3625,34 @@ public static extern void av_vlog(void* @avcl, int @level, /// The preallocated AVSubtitle in which the decoded subtitle will be stored, must be freed with avsubtitle_free if *got_sub_ptr is set. /// Zero if no subtitle could be decompressed, otherwise, it is nonzero. /// The input AVPacket containing the input buffer. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_decode_subtitle2(AVCodecContext* @avctx, AVSubtitle* @sub, int* @got_sub_ptr, AVPacket* @avpkt); - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_default_execute(AVCodecContext* @c, avcodec_default_execute_func_func @func, void* @arg, int* @ret, int @count, int @size); - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_default_execute2(AVCodecContext* @c, avcodec_default_execute2_func_func @func, void* @arg, int* @ret, int @count); /// The default callback for AVCodecContext.get_buffer2(). It is made public so it can be called by custom get_buffer2() implementations for decoders without AV_CODEC_CAP_DR1 set. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_default_get_buffer2(AVCodecContext* @s, AVFrame* @frame, int @flags); /// The default callback for AVCodecContext.get_encode_buffer(). It is made public so it can be called by custom get_encode_buffer() implementations for encoders without AV_CODEC_CAP_DR1 set. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_default_get_encode_buffer(AVCodecContext* @s, AVPacket* @pkt, int @flags); - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat avcodec_default_get_format(AVCodecContext* @s, AVPixelFormat* @fmt); /// Returns descriptor for given codec ID or NULL if no descriptor exists. /// descriptor for given codec ID or NULL if no descriptor exists. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecDescriptor* avcodec_descriptor_get(AVCodecID @id); /// Returns codec descriptor with the given name or NULL if no such descriptor exists. /// codec descriptor with the given name or NULL if no such descriptor exists. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecDescriptor* avcodec_descriptor_get_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3644,11 +3664,11 @@ public static extern void av_vlog(void* @avcl, int @level, /// Iterate over all codec descriptors known to libavcodec. /// previous descriptor. NULL to get the first descriptor. /// next descriptor or NULL after the last descriptor - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecDescriptor* avcodec_descriptor_next(AVCodecDescriptor* @prev); /// @{ - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_encode_subtitle(AVCodecContext* @avctx, byte* @buf, int @buf_size, AVSubtitle* @sub); /// Fill AVFrame audio data and linesize pointers. @@ -3659,7 +3679,7 @@ public static extern void av_vlog(void* @avcl, int @level, /// size of buffer /// plane size sample alignment (0 = default) /// >=0 on success, negative error code on failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_fill_audio_frame(AVFrame* @frame, int @nb_channels, AVSampleFormat @sample_fmt, byte* @buf, int @buf_size, int @align); /// Find the best pixel format to convert to given a certain source pixel format. When converting from one pixel format to another, information loss may occur. For example, when converting from RGB24 to GRAY, the color information will be lost. Similarly, other losses occur when converting from some formats to other formats. avcodec_find_best_pix_fmt_of_2() searches which of the given pixel formats should be used to suffer the least amount of loss. The pixel formats from which it chooses one, are determined by the pix_fmt_list parameter. @@ -3668,19 +3688,19 @@ public static extern void av_vlog(void* @avcl, int @level, /// Whether the source pixel format alpha channel is used. /// Combination of flags informing you what kind of losses will occur. /// The best pixel format to convert to or -1 if none was found. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat avcodec_find_best_pix_fmt_of_list(AVPixelFormat* @pix_fmt_list, AVPixelFormat @src_pix_fmt, int @has_alpha, int* @loss_ptr); /// Find a registered decoder with a matching codec ID. /// AVCodecID of the requested decoder /// A decoder if one was found, NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* avcodec_find_decoder(AVCodecID @id); /// Find a registered decoder with the specified name. /// name of the requested decoder /// A decoder if one was found, NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* avcodec_find_decoder_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3692,13 +3712,13 @@ public static extern void av_vlog(void* @avcl, int @level, /// Find a registered encoder with a matching codec ID. /// AVCodecID of the requested encoder /// An encoder if one was found, NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* avcodec_find_encoder(AVCodecID @id); /// Find a registered encoder with the specified name. /// name of the requested encoder /// An encoder if one was found, NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* avcodec_find_encoder_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3708,19 +3728,19 @@ public static extern void av_vlog(void* @avcl, int @level, string @name); /// Reset the internal codec state / flush internal buffers. Should be called e.g. when seeking or when switching to a different stream. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_flush_buffers(AVCodecContext* @avctx); /// Free the codec context and everything associated with it and write NULL to the provided pointer. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_free_context(AVCodecContext** @avctx); /// Get the AVClass for AVCodecContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avcodec_get_class(); /// Retrieve supported hardware configurations for a codec. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecHWConfig* avcodec_get_hw_config(AVCodec* @codec, int @index); /// Create and return a AVHWFramesContext with values adequate for hardware decoding. This is meant to get called from the get_format callback, and is a helper for preparing a AVHWFramesContext for AVCodecContext.hw_frames_ctx. This API is for decoding with certain hardware acceleration modes/APIs only. @@ -3729,17 +3749,17 @@ public static extern void av_vlog(void* @avcl, int @level, /// The hwaccel format you are going to return from get_format. /// On success, set to a reference to an _uninitialized_ AVHWFramesContext, created from the given device_ref. Fields will be set to values required for decoding. Not changed if an error is returned. /// zero on success, a negative value on error. The following error codes have special semantics: AVERROR(ENOENT): the decoder does not support this functionality. Setup is always manual, or it is a decoder which does not support setting AVCodecContext.hw_frames_ctx at all, or it is a software format. AVERROR(EINVAL): it is known that hardware decoding is not supported for this configuration, or the device_ref is not supported for the hwaccel referenced by hw_pix_fmt. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_get_hw_frames_parameters(AVCodecContext* @avctx, AVBufferRef* @device_ref, AVPixelFormat @hw_pix_fmt, AVBufferRef** @out_frames_ref); /// Get the name of a codec. /// a static string identifying the codec; never NULL - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_get_name(AVCodecID @id); /// Get the AVClass for AVSubtitleRect. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avcodec_get_subtitle_rect_class(); /// Retrieve a list of all supported values for a given configuration type. @@ -3749,20 +3769,20 @@ public static extern void av_vlog(void* @avcl, int @level, /// Currently unused; should be set to zero. /// On success, set to a list of configurations, terminated by a config-specific terminator, or NULL if all possible values are supported. /// On success, set to the number of elements in out_configs, excluding the terminator. Optional. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_get_supported_config(AVCodecContext* @avctx, AVCodec* @codec, AVCodecConfig @config, uint @flags, void** @out_configs, int* @out_num_configs); /// Get the type of the given codec. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVMediaType avcodec_get_type(AVCodecID @codec_id); /// Returns a positive value if s is open (i.e. avcodec_open2() was called on it), 0 otherwise. /// a positive value if s is open (i.e. avcodec_open2() was called on it), 0 otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_is_open(AVCodecContext* @s); /// Return the libavcodec license. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_license(); @@ -3771,79 +3791,79 @@ public static extern void av_vlog(void* @avcl, int @level, /// The codec to open this context for. If a non-NULL codec has been previously passed to avcodec_alloc_context3() or for this context, then this parameter MUST be either NULL or equal to the previously passed codec. /// A dictionary filled with AVCodecContext and codec-private options, which are set on top of the options already set in avctx, can be NULL. On return this object will be filled with options that were not found in the avctx codec context. /// zero on success, a negative value on error - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_open2(AVCodecContext* @avctx, AVCodec* @codec, AVDictionary** @options); - /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with avcodec_parameters_free(). - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with ::avcodec_parameters_free(). + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParameters* avcodec_parameters_alloc(); /// Copy the contents of src to dst. Any allocated fields in dst are freed and replaced with newly allocated duplicates of the corresponding fields in src. /// >= 0 on success, a negative AVERROR code on failure. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_parameters_copy(AVCodecParameters* @dst, AVCodecParameters* @src); - /// Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied pointer. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + /// Free an AVCodecParameters instance and everything associated with it and write `NULL` to the supplied pointer. + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_parameters_free(AVCodecParameters** @par); /// Fill the parameters struct based on the values from the supplied codec context. Any allocated fields in par are freed and replaced with duplicates of the corresponding fields in codec. /// >= 0 on success, a negative AVERROR code on failure - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_parameters_from_context(AVCodecParameters* @par, AVCodecContext* @codec); /// Fill the codec context based on the values from the supplied codec parameters. Any allocated fields in codec that have a corresponding field in par are freed and replaced with duplicates of the corresponding field in par. Fields in codec that do not have a counterpart in par are not touched. /// >= 0 on success, a negative AVERROR code on failure. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_parameters_to_context(AVCodecContext* @codec, AVCodecParameters* @par); /// Return a value representing the fourCC code associated to the pixel format pix_fmt, or 0 if no associated fourCC code can be found. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avcodec_pix_fmt_to_codec_tag(AVPixelFormat @pix_fmt); /// Return a name for the specified profile, if available. /// the ID of the codec to which the requested profile belongs /// the profile value for which a name is requested /// A name for the profile if found, NULL otherwise. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_profile_name(AVCodecID @codec_id, int @profile); /// Alias for `avcodec_receive_frame_flags(avctx, frame, 0)`. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_receive_frame(AVCodecContext* @avctx, AVFrame* @frame); /// Return decoded output data from a decoder or encoder (when the AV_CODEC_FLAG_RECON_FRAME flag is used). /// codec context /// This will be set to a reference-counted video or audio frame (depending on the decoder type) allocated by the codec. Note that the function will always call av_frame_unref(frame) before doing anything else. /// Combination of AV_CODEC_RECEIVE_FRAME_FLAG_* flags. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_receive_frame_flags(AVCodecContext* @avctx, AVFrame* @frame, uint @flags); /// Read encoded data from the encoder. /// codec context /// This will be set to a reference-counted packet allocated by the encoder. Note that the function will always call av_packet_unref(avpkt) before doing anything else. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_receive_packet(AVCodecContext* @avctx, AVPacket* @avpkt); /// Supply a raw video or audio frame to the encoder. Use avcodec_receive_packet() to retrieve buffered output packets. /// codec context /// AVFrame containing the raw audio or video frame to be encoded. Ownership of the frame remains with the caller, and the encoder will not write to the frame. The encoder may create a reference to the frame data (or copy it if the frame is not reference-counted). It can be NULL, in which case it is considered a flush packet. This signals the end of the stream. If the encoder still has packets buffered, it will return them after this call. Once flushing mode has been entered, additional flush packets are ignored, and sending frames will return AVERROR_EOF. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_send_frame(AVCodecContext* @avctx, AVFrame* @frame); /// Supply raw packet data as input to a decoder. /// codec context /// The input AVPacket. Usually, this will be a single video frame, or several complete audio frames. Ownership of the packet remains with the caller, and the decoder will not write to the packet. The decoder may create a reference to the packet data (or copy it if the packet is not reference-counted). Unlike with older APIs, the packet is always fully consumed, and if it contains multiple frames (e.g. some audio codecs), will require you to call avcodec_receive_frame() multiple times afterwards before you can send a new packet. It can be NULL (or an AVPacket with data set to NULL and size set to 0); in this case, it is considered a flush packet, which signals the end of the stream. Sending the first flush packet will return success. Subsequent ones are unnecessary and will return AVERROR_EOF. If the decoder still has frames buffered, it will return them after sending a flush packet. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_send_packet(AVCodecContext* @avctx, AVPacket* @avpkt); /// @} - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_string(byte* @buf, int @buf_size, AVCodecContext* @enc, int @encode); /// Return the LIBAVCODEC_VERSION_INT constant. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avcodec_version(); /// Send control message from application to device. @@ -3852,11 +3872,11 @@ public static extern void av_vlog(void* @avcl, int @level, /// message data. Exact type depends on message type. /// size of message data. /// >= 0 on success, negative on error. AVERROR(ENOSYS) when device doesn't implement handler of the message. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_app_to_dev_control_message(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size); /// Return the libavdevice build-time configuration. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avdevice_configuration(); @@ -3866,16 +3886,16 @@ public static extern void av_vlog(void* @avcl, int @level, /// message data. Can be NULL. /// size of message data. /// >= 0 on success, negative on error. AVERROR(ENOSYS) when application doesn't implement handler of the message. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_dev_to_app_control_message(AVFormatContext* @s, AVDevToAppMessageType @type, void* @data, ulong @data_size); /// Convenient function to free result of avdevice_list_devices(). /// device list to be freed. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avdevice_free_list_devices(AVDeviceInfoList** @device_list); /// Return the libavdevice license. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avdevice_license(); @@ -3883,7 +3903,7 @@ public static extern void av_vlog(void* @avcl, int @level, /// device context. /// list of autodetected devices. /// count of autodetected devices, negative on error. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_list_devices(AVFormatContext* @s, AVDeviceInfoList** @device_list); /// List devices. @@ -3892,7 +3912,7 @@ public static extern void av_vlog(void* @avcl, int @level, /// An AVDictionary filled with device-private options. May be NULL. The same options must be passed later to avformat_write_header() for output devices or avformat_open_input() for input devices, or at any other place that affects device-private options. /// list of autodetected devices /// count of autodetected devices, negative on error. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_list_input_sources(AVInputFormat* @device, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3901,7 +3921,7 @@ public static extern int avdevice_list_input_sources(AVInputFormat* @device, #endif string @device_name, AVDictionary* @device_options, AVDeviceInfoList** @device_list); - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3911,31 +3931,31 @@ public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, string @device_name, AVDictionary* @device_options, AVDeviceInfoList** @device_list); /// Initialize libavdevice and register all the input and output devices. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avdevice_register_all(); /// Return the LIBAVDEVICE_VERSION_INT constant. - [DllImport("avdevice-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avdevice_version(); /// Return the libavfilter build-time configuration. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avfilter_configuration(); /// Get the number of elements in an AVFilter's inputs or outputs array. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern uint avfilter_filter_pad_count(AVFilter* @filter, int @is_output); /// Free a filter context. This will also remove the filter from its filtergraph's list of filters. /// the filter to free - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_free(AVFilterContext* @filter); /// Get a filter definition matching the given name. /// the filter name to find /// the filter definition, if any matching one is registered. NULL if none found. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilter* avfilter_get_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3946,12 +3966,12 @@ public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, /// Returns AVClass for AVFilterContext. /// AVClass for AVFilterContext. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avfilter_get_class(); /// Allocate a filter graph. /// the allocated filter graph on success or NULL. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterGraph* avfilter_graph_alloc(); /// Create a new filter instance in a filter graph. @@ -3959,7 +3979,7 @@ public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, /// the filter to create an instance of /// Name to give to the new instance (will be copied to AVFilterContext.name). This may be used by the caller to identify different filters, libavfilter itself assigns no semantics to this parameter. May be NULL. /// the context of the newly created filter instance (note that it is also retrievable directly through AVFilterGraph.filters or with avfilter_graph_get_filter()) on success or NULL on failure. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterContext* avfilter_graph_alloc_filter(AVFilterGraph* @graph, AVFilter* @filter, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3972,14 +3992,14 @@ public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, /// the filter graph /// context used for logging /// >= 0 in case of success, a negative AVERROR code otherwise - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_config(AVFilterGraph* @graphctx, void* @log_ctx); /// A convenience wrapper that allocates and initializes a filter in a single step. The filter instance is created from the filter filt and inited with the parameter args. opaque is currently ignored. /// the instance name to give to the created filter instance /// the filter graph /// a negative AVERROR error code in case of failure, a non negative value otherwise - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_create_filter(AVFilterContext** @filt_ctx, AVFilter* @filt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3998,7 +4018,7 @@ public static extern int avfilter_graph_create_filter(AVFilterContext** @filt_ct /// the graph to dump /// formatting options; currently ignored /// a string, or NULL in case of memory allocation failure; the string must be freed using av_free - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern byte* avfilter_graph_dump(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4008,14 +4028,14 @@ public static extern int avfilter_graph_create_filter(AVFilterContext** @filt_ct string @options); /// Free a graph, destroy its links, and set *graph to NULL. If *graph is NULL, do nothing. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_graph_free(AVFilterGraph** @graph); /// Get a filter instance identified by instance name from graph. /// filter graph to search through. /// filter instance name (should be unique in the graph). /// the pointer to the found filter instance or NULL if it cannot be found. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterContext* avfilter_graph_get_filter(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4030,7 +4050,7 @@ public static extern int avfilter_graph_create_filter(AVFilterContext** @filt_ct /// linked list to the inputs of the graph /// linked list to the outputs of the graph /// zero on success, a negative AVERROR code on error - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_parse(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4045,7 +4065,7 @@ public static extern int avfilter_graph_parse(AVFilterGraph* @graph, /// pointer to a linked list to the inputs of the graph, may be NULL. If non-NULL, *inputs is updated to contain the list of open inputs after the parsing, should be freed with avfilter_inout_free(). /// pointer to a linked list to the outputs of the graph, may be NULL. If non-NULL, *outputs is updated to contain the list of open outputs after the parsing, should be freed with avfilter_inout_free(). /// non negative on success, a negative AVERROR code on error - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_parse_ptr(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4060,7 +4080,7 @@ public static extern int avfilter_graph_parse_ptr(AVFilterGraph* @graph, /// a linked list of all free (unlinked) inputs of the parsed graph will be returned here. It is to be freed by the caller using avfilter_inout_free(). /// a linked list of all free (unlinked) outputs of the parsed graph will be returned here. It is to be freed by the caller using avfilter_inout_free(). /// zero on success, a negative AVERROR code on error - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_parse2(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4075,7 +4095,7 @@ public static extern int avfilter_graph_parse2(AVFilterGraph* @graph, /// the command to sent, for handling simplicity all commands must be alphanumeric only /// the argument for the command /// time at which the command should be sent to the filter - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4098,7 +4118,7 @@ public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, /// Request a frame on the oldest sink link. /// the return value of ff_request_frame(), or AVERROR_EOF if all links returned AVERROR_EOF - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_request_oldest(AVFilterGraph* @graph); /// Apply all filter/link descriptions from a graph segment to the associated filtergraph. @@ -4106,30 +4126,30 @@ public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, /// reserved for future use, caller must set to 0 for now /// passed to avfilter_graph_segment_link() /// passed to avfilter_graph_segment_link() - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_segment_apply(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs); /// Apply parsed options to filter instances in a graph segment. /// the filtergraph segment to process /// reserved for future use, caller must set to 0 for now - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_segment_apply_opts(AVFilterGraphSegment* @seg, int @flags); /// Create filters specified in a graph segment. /// the filtergraph segment to process /// reserved for future use, caller must set to 0 for now - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_segment_create_filters(AVFilterGraphSegment* @seg, int @flags); /// Free the provided AVFilterGraphSegment and everything associated with it. /// double pointer to the AVFilterGraphSegment to be freed. NULL will be written to this pointer on exit from this function. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_graph_segment_free(AVFilterGraphSegment** @seg); /// Initialize all filter instances in a graph segment. /// the filtergraph segment to process /// reserved for future use, caller must set to 0 for now - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_segment_init(AVFilterGraphSegment* @seg, int @flags); /// Link filters in a graph segment. @@ -4137,7 +4157,7 @@ public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, /// reserved for future use, caller must set to 0 for now /// a linked list of all free (unlinked) inputs of the filters in this graph segment will be returned here. It is to be freed by the caller using avfilter_inout_free(). /// a linked list of all free (unlinked) outputs of the filters in this graph segment will be returned here. It is to be freed by the caller using avfilter_inout_free(). - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_segment_link(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs); /// Parse a textual filtergraph description into an intermediate form. @@ -4145,7 +4165,7 @@ public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, /// a string describing the filtergraph segment /// reserved for future use, caller must set to 0 for now /// A pointer to the newly-created AVFilterGraphSegment is written here on success. The graph segment is owned by the caller and must be freed with avfilter_graph_segment_free() before graph itself is freed. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_segment_parse(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4160,7 +4180,7 @@ public static extern int avfilter_graph_segment_parse(AVFilterGraph* @graph, /// the command to send, for handling simplicity all commands must be alphanumeric only /// the argument for the command /// a buffer with size res_size where the filter(s) can return a response. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_send_command(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4183,21 +4203,21 @@ public static extern int avfilter_graph_send_command(AVFilterGraph* @graph, /// Enable or disable automatic format conversion inside the graph. /// any of the AVFILTER_AUTO_CONVERT_* constants - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_graph_set_auto_convert(AVFilterGraph* @graph, uint @flags); /// Initialize a filter with the supplied dictionary of options. /// uninitialized filter context to initialize /// An AVDictionary filled with options for this filter. On return this parameter will be destroyed and replaced with a dict containing options that were not found. This dictionary must be freed by the caller. May be NULL, then this function is equivalent to avfilter_init_str() with the second parameter set to NULL. /// 0 on success, a negative AVERROR on failure - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_init_dict(AVFilterContext* @ctx, AVDictionary** @options); /// Initialize a filter with the supplied parameters. /// uninitialized filter context to initialize /// Options to initialize the filter with. This must be a ':'-separated list of options in the 'key=value' form. May be NULL if the options have been set directly using the AVOptions API or there are no options that need to be set. /// 0 on success, a negative AVERROR on failure - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_init_str(AVFilterContext* @ctx, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4208,11 +4228,11 @@ public static extern int avfilter_init_str(AVFilterContext* @ctx, /// Allocate a single AVFilterInOut entry. Must be freed with avfilter_inout_free(). /// allocated AVFilterInOut on success, NULL on failure. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterInOut* avfilter_inout_alloc(); /// Free the supplied list of AVFilterInOut and set *inout to NULL. If *inout is NULL, do nothing. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_inout_free(AVFilterInOut** @inout); /// Insert a filter in the middle of an existing link. @@ -4221,11 +4241,11 @@ public static extern int avfilter_init_str(AVFilterContext* @ctx, /// the input pad on the filter to connect /// the output pad on the filter to connect /// zero on success - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_insert_filter(AVFilterLink* @link, AVFilterContext* @filt, uint @filt_srcpad_idx, uint @filt_dstpad_idx); /// Return the libavfilter license. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avfilter_license(); @@ -4235,20 +4255,20 @@ public static extern int avfilter_init_str(AVFilterContext* @ctx, /// the destination filter /// index of the input pad on the destination filter /// zero on success - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_link(AVFilterContext* @src, uint @srcpad, AVFilterContext* @dst, uint @dstpad); /// Get the hardware frames context of a filter link. /// an AVFilterLink /// a ref-counted copy of the link's hw_frames_ctx field if there is a hardware frames context associated with the link or NULL otherwise. The returned AVBufferRef needs to be released with av_buffer_unref() when it is no longer used. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* avfilter_link_get_hw_frames_ctx(AVFilterLink* @link); /// Get the name of an AVFilterPad. /// an array of AVFilterPads /// index of the pad in the array; it is the caller's responsibility to ensure the index is valid /// name of the pad_idx'th pad in pads - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avfilter_pad_get_name(AVFilterPad* @pads, int @pad_idx); @@ -4256,11 +4276,11 @@ public static extern int avfilter_init_str(AVFilterContext* @ctx, /// an array of AVFilterPads /// index of the pad in the array; it is the caller's responsibility to ensure the index is valid /// type of the pad_idx'th pad in pads - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern AVMediaType avfilter_pad_get_type(AVFilterPad* @pads, int @pad_idx); /// Make the filter instance process a command. It is recommended to use avfilter_graph_send_command(). - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_process_command(AVFilterContext* @filter, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4276,11 +4296,11 @@ public static extern int avfilter_process_command(AVFilterContext* @filter, string @arg, byte* @res, int @res_len, int @flags); /// Return the LIBAVFILTER_VERSION_INT constant. - [DllImport("avfilter-11", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-12", CallingConvention = CallingConvention.Cdecl)] public static extern uint avfilter_version(); /// Allocate an AVFormatContext. avformat_free_context() can be used to free the context and everything allocated by the framework within it. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVFormatContext* avformat_alloc_context(); /// Allocate an AVFormatContext for an output format. avformat_free_context() can be used to free the context and everything allocated by the framework within it. @@ -4289,7 +4309,7 @@ public static extern int avfilter_process_command(AVFilterContext* @filter, /// the name of output format to use for allocating the context, if NULL filename is used instead /// the name of the filename to use for allocating the context, may be NULL /// >= 0 in case of success, a negative AVERROR code in case of failure - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, AVOutputFormat* @oformat, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4305,11 +4325,11 @@ public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, string @filename); /// Close an opened input AVFormatContext. Free it and all its contents and set *s to NULL. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avformat_close_input(AVFormatContext** @s); /// Return the libavformat build-time configuration. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avformat_configuration(); @@ -4317,55 +4337,55 @@ public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, /// media file handle /// If non-NULL, an ic.nb_streams long array of pointers to dictionaries, where i-th member contains options for codec corresponding to i-th stream. On return each dictionary will be filled with options that were not found. /// >=0 if OK, AVERROR_xxx on error - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_find_stream_info(AVFormatContext* @ic, AVDictionary** @options); /// Discard all internally buffered data. This can be useful when dealing with discontinuities in the byte stream. Generally works only with formats that can resync. This includes headerless formats like MPEG-TS/TS but should also work with NUT, Ogg and in a limited way AVI for example. /// media file handle /// >=0 on success, error code otherwise - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_flush(AVFormatContext* @s); /// Free an AVFormatContext and all its streams. /// context to free - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avformat_free_context(AVFormatContext* @s); /// Get the AVClass for AVFormatContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avformat_get_class(); /// Returns the table mapping MOV FourCCs for audio to AVCodecID. /// the table mapping MOV FourCCs for audio to AVCodecID. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecTag* avformat_get_mov_audio_tags(); /// Returns the table mapping MOV FourCCs for video to libavcodec AVCodecID. /// the table mapping MOV FourCCs for video to libavcodec AVCodecID. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecTag* avformat_get_mov_video_tags(); /// Returns the table mapping RIFF FourCCs for audio to AVCodecID. /// the table mapping RIFF FourCCs for audio to AVCodecID. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecTag* avformat_get_riff_audio_tags(); /// @{ Get the tables mapping RIFF FourCCs to libavcodec AVCodecIDs. The tables are meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the following code: /// the table mapping RIFF FourCCs for video to libavcodec AVCodecID. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecTag* avformat_get_riff_video_tags(); /// Get the index entry count for the given AVStream. /// stream /// the number of index entries in the stream - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_index_get_entries_count(AVStream* @st); /// Get the AVIndexEntry corresponding to the given index. /// Stream containing the requested AVIndexEntry. /// The desired index. /// A pointer to the requested AVIndexEntry if it exists, NULL otherwise. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVIndexEntry* avformat_index_get_entry(AVStream* @st, int @idx); /// Get the AVIndexEntry corresponding to the given timestamp. @@ -4373,23 +4393,23 @@ public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, /// Timestamp to retrieve the index entry for. /// 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. /// A pointer to the requested AVIndexEntry if it exists, NULL otherwise. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVIndexEntry* avformat_index_get_entry_from_timestamp(AVStream* @st, long @wanted_timestamp, int @flags); /// Allocate the stream private data and initialize the codec, but do not write the header. May optionally be used before avformat_write_header() to initialize stream parameters before actually writing the header. If using this function, do not pass the same options to avformat_write_header(). /// Media file handle, must be allocated with avformat_alloc_context(). Its "oformat" field must be set to the desired output format; Its "pb" field must be set to an already opened ::AVIOContext. /// An ::AVDictionary filled with AVFormatContext and muxer-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_init_output(AVFormatContext* @s, AVDictionary** @options); /// Return the libavformat license. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avformat_license(); /// Check if the stream st contained in s is matched by the stream specifier spec. /// >0 if st is matched by spec; 0 if st is not matched by spec; AVERROR code if spec is invalid - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_match_stream_specifier(AVFormatContext* @s, AVStream* @st, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4399,18 +4419,18 @@ public static extern int avformat_match_stream_specifier(AVFormatContext* @s, AV string @spec); /// Undo the initialization done by avformat_network_init. Call it only once for each time you called avformat_network_init. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_network_deinit(); /// Do global initialization of network libraries. This is optional, and not recommended anymore. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_network_init(); /// Add a new stream to a media file. /// media file handle /// unused, does nothing /// newly created stream or NULL on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVStream* avformat_new_stream(AVFormatContext* @s, AVCodec* @c); /// Open an input stream and read the header. The codecs are not opened. The stream must be closed with avformat_close_input(). @@ -4419,7 +4439,7 @@ public static extern int avformat_match_stream_specifier(AVFormatContext* @s, AV /// If non-NULL, this parameter forces a specific input format. Otherwise the format is autodetected. /// A dictionary filled with AVFormatContext and demuxer-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL. /// 0 on success; on failure: frees ps, sets its pointer to NULL, and returns a negative AVERROR. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_open_input(AVFormatContext** @ps, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4433,17 +4453,17 @@ public static extern int avformat_open_input(AVFormatContext** @ps, /// codec to potentially store in container /// standards compliance level, one of FF_COMPLIANCE_* /// 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot. A negative number if this information is not available. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_query_codec(AVOutputFormat* @ofmt, AVCodecID @codec_id, int @std_compliance); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_queue_attached_pictures(AVFormatContext* @s); /// Receive a command reply from the demuxer /// Format context, must be allocated with ::avformat_alloc_context. /// Identifier of type ::AVFormatCommandID, indicating the command for which to retrieve the reply. /// Pointee is set to the command reply, the actual type depends on the command. This is allocated by the muxer and must be freed with ::av_free. For details on the actual data set here, consult the documentation of the respective ::AVFormatCommandID. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_receive_command_reply(AVFormatContext* @s, AVFormatCommandID @id, void** @data_out); /// Seek to timestamp ts. Seeking will be done so that the point from which all active streams can be presented successfully will be closest to ts and within min/max_ts. Active streams are all streams that have AVStream.discard < AVDISCARD_ALL. @@ -4454,53 +4474,49 @@ public static extern int avformat_open_input(AVFormatContext** @ps, /// largest acceptable timestamp /// flags /// >=0 on success, error code otherwise - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_seek_file(AVFormatContext* @s, int @stream_index, long @min_ts, long @ts, long @max_ts, int @flags); /// Send a command to the demuxer /// Format context, must be allocated with ::avformat_alloc_context. /// Identifier of type ::AVFormatCommandID, indicating the command to send. /// Command-specific data, allocated by the caller and ownership remains with the caller. For details what is expected here, consult the documentation of the respective ::AVFormatCommandID. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_send_command(AVFormatContext* @s, AVFormatCommandID @id, void* @data); /// Add an already allocated stream to a stream group. /// stream group belonging to a media file. /// stream in the media file to add to the group. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_stream_group_add_stream(AVStreamGroup* @stg, AVStream* @st); /// Add a new empty stream group to a media file. /// media file handle /// newly created group or NULL on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVStreamGroup* avformat_stream_group_create(AVFormatContext* @s, AVStreamGroupParamsType @type, AVDictionary** @options); /// Returns a string identifying the stream group type, or NULL if unknown /// a string identifying the stream group type, or NULL if unknown - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avformat_stream_group_name(AVStreamGroupParamsType @type); - [Obsolete("do not call this function")] - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] - public static extern int avformat_transfer_internal_stream_timing_info(AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb); - /// Return the LIBAVFORMAT_VERSION_INT constant. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avformat_version(); /// Allocate the stream private data and write the stream header to an output media file. /// Media file handle, must be allocated with avformat_alloc_context(). Its "oformat" field must be set to the desired output format; Its "pb" field must be set to an already opened ::AVIOContext. /// An ::AVDictionary filled with AVFormatContext and muxer-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_write_header(AVFormatContext* @s, AVDictionary** @options); /// Accept and allocate a client context on a server context. /// the server context /// the client context, must be unallocated /// >= 0 on success or a negative value corresponding to an AVERROR on failure - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_accept(AVIOContext* @s, AVIOContext** @c); /// Allocate and initialize an AVIOContext for buffered I/O. It must be later freed with avio_context_free(). @@ -4512,11 +4528,11 @@ public static extern int avformat_open_input(AVFormatContext** @ps, /// A function for writing the buffer contents, may be NULL. The function may not change the input buffers content. /// A function for seeking to specified byte position, may be NULL. /// Allocated AVIOContext or NULL on failure. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVIOContext* avio_alloc_context(byte* @buffer, int @buffer_size, int @write_flag, void* @opaque, avio_alloc_context_read_packet_func @read_packet, avio_alloc_context_write_packet_func @write_packet, avio_alloc_context_seek_func @seek); /// Return AVIO_FLAG_* access flags corresponding to the access permissions of the resource in url, or a negative value corresponding to an AVERROR code in case of failure. The returned access flags are masked by the value in flags. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_check( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4527,48 +4543,48 @@ public static extern int avio_check( /// Close the resource accessed by the AVIOContext s and free it. This function can only be used if s was opened by avio_open(). /// 0 on success, an AVERROR < 0 on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_close(AVIOContext* @s); /// Close directory. /// directory read context. /// >=0 on success or negative on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_close_dir(AVIODirContext** @s); /// Return the written size and a pointer to the buffer. The buffer must be freed with av_free(). Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer. /// IO context /// pointer to a byte buffer /// the length of the byte buffer - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_close_dyn_buf(AVIOContext* @s, byte** @pbuffer); /// Close the resource accessed by the AVIOContext *s, free it and set the pointer pointing to it to NULL. This function can only be used if s was opened by avio_open(). /// 0 on success, an AVERROR < 0 on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_closep(AVIOContext** @s); /// Free the supplied IO context and everything associated with it. /// Double pointer to the IO context. This function will write NULL into s. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_context_free(AVIOContext** @s); /// Iterate through names of available protocols. /// A private pointer representing current protocol. It must be a pointer to NULL on first iteration and will be updated by successive calls to avio_enum_protocols. /// If set to 1, iterate over output protocols, otherwise over input protocols. /// A static string containing the name of current protocol or NULL - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avio_enum_protocols(void** @opaque, int @output); /// Similar to feof() but also returns nonzero on read errors. /// non zero if and only if at end of file or a read error happened when reading. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_feof(AVIOContext* @s); /// Return the name of the protocol that will handle the passed URL. /// Name of the protocol or NULL. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avio_find_protocol_name( #if NETSTANDARD2_1_OR_GREATER @@ -4579,38 +4595,38 @@ public static extern string avio_find_protocol_name( string @url); /// Force flushing of buffered data. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_flush(AVIOContext* @s); /// Free entry allocated by avio_read_dir(). /// entry to be freed. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_free_directory_entry(AVIODirEntry** @entry); /// Return the written size and a pointer to the buffer. The AVIOContext stream is left intact. The buffer must NOT be freed. No padding is added to the buffer. /// IO context /// pointer to a byte buffer /// the length of the byte buffer - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_get_dyn_buf(AVIOContext* @s, byte** @pbuffer); /// Read a string from pb into buf. The reading will terminate when either a NULL character was encountered, maxlen bytes have been read, or nothing more can be read from pb. The result is guaranteed to be NULL-terminated, it will be truncated if buf is too small. Note that the string is not interpreted or validated in any way, it might get truncated in the middle of a sequence for multi-byte encodings. /// number of bytes read (is always < = maxlen). If reading ends on EOF or error, the return value will be one more than bytes actually read. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_get_str(AVIOContext* @pb, int @maxlen, byte* @buf, int @buflen); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_get_str16be(AVIOContext* @pb, int @maxlen, byte* @buf, int @buflen); /// Read a UTF-16 string from pb and convert it to UTF-8. The reading will terminate when either a null or invalid character was encountered or maxlen bytes have been read. /// number of bytes read (is always < = maxlen) - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_get_str16le(AVIOContext* @pb, int @maxlen, byte* @buf, int @buflen); /// Perform one step of the protocol handshake to accept a new client. This function must be called on a client returned by avio_accept() before using it as a read/write context. It is separate from avio_accept() because it may block. A step of the handshake is defined by places where the application may decide to change the proceedings. For example, on a protocol with a request header and a reply header, each one can constitute a step because the application may use the parameters from the request to change parameters in the reply; or each individual chunk of the request can constitute a step. If the handshake is already finished, avio_handshake() does nothing and returns 0 immediately. /// the client context to perform the handshake on /// 0 on a complete and successful handshake > 0 if the handshake progressed, but is not complete < 0 for an AVERROR code - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_handshake(AVIOContext* @c); /// Create and initialize a AVIOContext for accessing the resource indicated by url. @@ -4618,7 +4634,7 @@ public static extern string avio_find_protocol_name( /// resource to access /// flags which control how the resource indicated by url is to be opened /// >= 0 in case of success, a negative value corresponding to an AVERROR code in case of failure - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open(AVIOContext** @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4632,7 +4648,7 @@ public static extern int avio_open(AVIOContext** @s, /// directory to be listed. /// A dictionary filled with protocol-private options. On return this parameter will be destroyed and replaced with a dictionary containing options that were not found. May be NULL. /// >=0 on success or negative on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open_dir(AVIODirContext** @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4644,7 +4660,7 @@ public static extern int avio_open_dir(AVIODirContext** @s, /// Open a write only memory stream. /// new IO context /// zero if no error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open_dyn_buf(AVIOContext** @s); /// Create and initialize a AVIOContext for accessing the resource indicated by url. @@ -4654,7 +4670,7 @@ public static extern int avio_open_dir(AVIODirContext** @s, /// an interrupt callback to be used at the protocols level /// A dictionary filled with protocol-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. May be NULL. /// >= 0 in case of success, a negative value corresponding to an AVERROR code in case of failure - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open2(AVIOContext** @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4666,16 +4682,16 @@ public static extern int avio_open2(AVIOContext** @s, /// Pause and resume playing - only meaningful if using a network streaming protocol (e.g. MMS). /// IO context from which to call the read_pause function pointer /// 1 for pause, 0 for resume - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_pause(AVIOContext* @h, int @pause); /// Write a NULL terminated array of strings to the context. Usually you don't need to use this function directly but its macro wrapper, avio_print. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_print_string_array(AVIOContext* @s, byte*[] @strings); /// Writes a formatted string to the context. /// number of bytes written, < 0 on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_printf(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4686,7 +4702,7 @@ public static extern int avio_printf(AVIOContext* @s, /// Get AVClass by names of available protocols. /// A AVClass of input protocol name or NULL - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avio_protocol_get_class( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4697,7 +4713,7 @@ public static extern int avio_printf(AVIOContext* @s, /// Write a NULL-terminated string. /// number of bytes written. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_put_str(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4710,7 +4726,7 @@ public static extern int avio_put_str(AVIOContext* @s, /// the AVIOContext /// NULL-terminated UTF-8 string /// number of bytes written. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_put_str16be(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4723,7 +4739,7 @@ public static extern int avio_put_str16be(AVIOContext* @s, /// the AVIOContext /// NULL-terminated UTF-8 string /// number of bytes written. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_put_str16le(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4733,58 +4749,58 @@ public static extern int avio_put_str16le(AVIOContext* @s, string @str); /// @{ - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_r8(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rb16(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rb24(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rb32(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern ulong avio_rb64(AVIOContext* @s); /// Read size bytes from AVIOContext into buf. /// number of bytes read or AVERROR - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_read(AVIOContext* @s, byte* @buf, int @size); /// Get next directory entry. /// directory read context. /// next entry or NULL when no more entries. /// >=0 on success or negative on error. End of list is not considered an error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_read_dir(AVIODirContext* @s, AVIODirEntry** @next); /// Read size bytes from AVIOContext into buf. Unlike avio_read(), this is allowed to read fewer bytes than requested. The missing bytes can be read in the next call. This always tries to read at least 1 byte. Useful to reduce latency in certain cases. /// number of bytes read or AVERROR - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_read_partial(AVIOContext* @s, byte* @buf, int @size); /// Read contents of h into print buffer, up to max_size bytes, or up to EOF. /// 0 for success (max_size bytes read or EOF reached), negative error code otherwise - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_read_to_bprint(AVIOContext* @h, AVBPrint* @pb, ulong @max_size); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rl16(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rl24(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rl32(AVIOContext* @s); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern ulong avio_rl64(AVIOContext* @s); /// fseek() equivalent for AVIOContext. /// new position or AVERROR. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern long avio_seek(AVIOContext* @s, long @offset, int @whence); /// Seek to a given timestamp relative to some component stream. Only meaningful if using a network streaming protocol (e.g. MMS.). @@ -4793,22 +4809,22 @@ public static extern int avio_put_str16le(AVIOContext* @s, /// timestamp in AVStream.time_base units or if there is no stream specified then in AV_TIME_BASE units. /// Optional combination of AVSEEK_FLAG_BACKWARD, AVSEEK_FLAG_BYTE and AVSEEK_FLAG_ANY. The protocol may silently ignore AVSEEK_FLAG_BACKWARD and AVSEEK_FLAG_ANY, but AVSEEK_FLAG_BYTE will fail if used and not supported. /// >= 0 on success - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern long avio_seek_time(AVIOContext* @h, int @stream_index, long @timestamp, int @flags); /// Get the filesize. /// filesize or AVERROR - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern long avio_size(AVIOContext* @s); /// Skip given number of bytes forward /// new position or AVERROR. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern long avio_skip(AVIOContext* @s, long @offset); /// Writes a formatted string to the context taking a va_list. /// number of bytes written, < 0 on error. - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_vprintf(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4817,65 +4833,65 @@ public static extern int avio_vprintf(AVIOContext* @s, #endif string @fmt, byte* @ap); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_w8(AVIOContext* @s, int @b); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb16(AVIOContext* @s, uint @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb24(AVIOContext* @s, uint @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb32(AVIOContext* @s, uint @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb64(AVIOContext* @s, ulong @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl16(AVIOContext* @s, uint @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl24(AVIOContext* @s, uint @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl32(AVIOContext* @s, uint @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl64(AVIOContext* @s, ulong @val); - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_write(AVIOContext* @s, byte* @buf, int @size); /// Mark the written bytestream as a specific type. /// the AVIOContext /// the stream time the current bytestream pos corresponds to (in AV_TIME_BASE units), or AV_NOPTS_VALUE if unknown or not applicable /// the kind of data written starting at the current pos - [DllImport("avformat-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_write_marker(AVIOContext* @s, long @time, AVIODataMarkerType @type); /// Free all allocated data in the given subtitle struct. /// AVSubtitle to free. - [DllImport("avcodec-62", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-63", CallingConvention = CallingConvention.Cdecl)] public static extern void avsubtitle_free(AVSubtitle* @sub); /// Return the libavutil build-time configuration. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avutil_configuration(); /// Return the libavutil license. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avutil_license(); /// Return the LIBAVUTIL_VERSION_INT constant. - [DllImport("avutil-60", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-61", CallingConvention = CallingConvention.Cdecl)] public static extern uint avutil_version(); /// Allocate SwrContext. /// NULL on error, allocated context otherwise - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern SwrContext* swr_alloc(); /// Allocate SwrContext if needed and set/reset common parameters. @@ -4889,7 +4905,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// logging level offset /// parent logging context, can be NULL /// 0 on success, a negative AVERROR code on error. On error, the Swr context is freed and *ps set to NULL. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_alloc_set_opts2(SwrContext** @ps, AVChannelLayout* @out_ch_layout, AVSampleFormat @out_sample_fmt, int @out_sample_rate, AVChannelLayout* @in_ch_layout, AVSampleFormat @in_sample_fmt, int @in_sample_rate, int @log_offset, void* @log_ctx); /// Generate a channel mixing matrix. @@ -4902,12 +4918,12 @@ public static extern int avio_vprintf(AVIOContext* @s, /// distance between adjacent input channels in the matrix array /// matrixed stereo downmix mode (e.g. dplii) /// 0 on success, negative AVERROR code on failure - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_build_matrix2(AVChannelLayout* @in_layout, AVChannelLayout* @out_layout, double @center_mix_level, double @surround_mix_level, double @lfe_mix_level, double @maxval, double @rematrix_volume, double* @matrix, long @stride, AVMatrixEncoding @matrix_encoding, void* @log_context); /// Closes the context so that swr_is_initialized() returns 0. /// Swr context to be closed - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern void swr_close(SwrContext* @s); /// Configure or reconfigure the SwrContext using the information provided by the AVFrames. @@ -4915,7 +4931,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// output AVFrame /// input AVFrame /// 0 on success, AVERROR on failure. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_config_frame(SwrContext* @swr, AVFrame* @out, AVFrame* @in); /// Convert audio. @@ -4925,7 +4941,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// input buffers, only the first one need to be set in case of packed audio /// number of input samples available in one channel /// number of samples output per channel, negative value on error - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_convert(SwrContext* @s, byte** @out, int @out_count, byte** @in, int @in_count); /// Convert the samples in the input AVFrame and write them to the output AVFrame. @@ -4933,68 +4949,68 @@ public static extern int avio_vprintf(AVIOContext* @s, /// output AVFrame /// input AVFrame /// 0 on success, AVERROR on failure or nonmatching configuration. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_convert_frame(SwrContext* @swr, AVFrame* @output, AVFrame* @input); /// Drops the specified number of output samples. /// allocated Swr context /// number of samples to be dropped /// >= 0 on success, or a negative AVERROR code on failure - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_drop_output(SwrContext* @s, int @count); /// Free the given SwrContext and set the pointer to NULL. /// a pointer to a pointer to Swr context - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern void swr_free(SwrContext** @s); /// Get the AVClass for SwrContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. /// the AVClass of SwrContext - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* swr_get_class(); /// Gets the delay the next input sample will experience relative to the next output sample. /// swr context /// timebase in which the returned delay will be: - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern long swr_get_delay(SwrContext* @s, long @base); /// Find an upper bound on the number of samples that the next swr_convert call will output, if called with in_samples of input samples. This depends on the internal state, and anything changing the internal state (like further swr_convert() calls) will may change the number of samples swr_get_out_samples() returns for the same number of input samples. /// number of input samples. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_get_out_samples(SwrContext* @s, int @in_samples); /// Initialize context after user parameters have been set. /// Swr context to initialize /// AVERROR error code in case of failure. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_init(SwrContext* @s); /// Injects the specified number of silence samples. /// allocated Swr context /// number of samples to be dropped /// >= 0 on success, or a negative AVERROR code on failure - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_inject_silence(SwrContext* @s, int @count); /// Check whether an swr context has been initialized or not. /// Swr context to check /// positive if it has been initialized, 0 if not initialized - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_is_initialized(SwrContext* @s); /// Convert the next timestamp from input to output timestamps are in 1/(in_sample_rate * out_sample_rate) units. /// initialized Swr context /// timestamp for the next input sample, INT64_MIN if unknown /// the output timestamp for the next output sample - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern long swr_next_pts(SwrContext* @s, long @pts); /// Set a customized input channel mapping. /// allocated Swr context, not yet initialized /// customized input channel mapping (array of channel indexes, -1 for a muted channel) /// >= 0 on success, or AVERROR error code in case of failure. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_set_channel_mapping(SwrContext* @s, int* @channel_map); /// Activate resampling compensation ("soft" compensation). This function is internally called when needed in swr_next_pts(). @@ -5002,7 +5018,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// delta in PTS per sample /// number of samples to compensate for /// >= 0 on success, AVERROR error codes if: - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_set_compensation(SwrContext* @s, int @sample_delta, int @compensation_distance); /// Set a customized remix matrix. @@ -5010,29 +5026,29 @@ public static extern int avio_vprintf(AVIOContext* @s, /// remix coefficients; matrix[i + stride * o] is the weight of input channel i in output channel o /// offset between lines of the matrix /// >= 0 on success, or AVERROR error code in case of failure. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_set_matrix(SwrContext* @s, double* @matrix, int @stride); /// Return the swr build-time configuration. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string swresample_configuration(); /// Return the swr license. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string swresample_license(); /// Return the LIBSWRESAMPLE_VERSION_INT constant. - [DllImport("swresample-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swresample-7", CallingConvention = CallingConvention.Cdecl)] public static extern uint swresample_version(); /// Allocate an empty SwsContext and set its fields to default values. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern SwsContext* sws_alloc_context(); /// Allocate and return an uninitialized vector with length coefficients. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern SwsVector* sws_allocVec(int @length); /// Convert an 8-bit paletted frame into a frame with a color depth of 24 bits. @@ -5040,7 +5056,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// destination frame buffer /// number of pixels to convert /// array with [256] entries, which must match color arrangement (RGB or BGR) of src - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_convertPalette8ToPacked24(byte* @src, byte* @dst, int @num_pixels, byte* @palette); /// Convert an 8-bit paletted frame into a frame with a color depth of 32 bits. @@ -5048,12 +5064,12 @@ public static extern int avio_vprintf(AVIOContext* @s, /// destination frame buffer /// number of pixels to convert /// array with [256] entries, which must match color arrangement (RGB or BGR) of src - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_convertPalette8ToPacked32(byte* @src, byte* @dst, int @num_pixels, byte* @palette); /// 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. /// The scaling context - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_frame_end(SwsContext* @c); /// Like `sws_scale_frame`, but without actually scaling. It will instead merely initialize internal state that *would* be required to perform the operation, as well as returning the correct error code for unsupported frame combinations. @@ -5061,7 +5077,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// The destination frame to consider. /// The source frame to consider. /// 0 on success, a negative AVERROR code on failure. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_frame_setup(SwsContext* @ctx, AVFrame* @dst, 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(). Requires a context that has previously been initialized with sws_init_context(). @@ -5069,39 +5085,39 @@ public static extern int avio_vprintf(AVIOContext* @s, /// The destination frame. /// 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(). /// 0 on success, a negative AVERROR code on failure - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_frame_start(SwsContext* @c, AVFrame* @dst, AVFrame* @src); /// Free the context and everything associated with it, and write NULL to the provided pointer. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_free_context(SwsContext** @ctx); /// Free the swscaler context swsContext. If swsContext is NULL, then does nothing. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_freeContext(SwsContext* @swsContext); - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_freeFilter(SwsFilter* @filter); - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_freeVec(SwsVector* @a); /// Get the AVClass for SwsContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* sws_get_class(); /// Check if context can be reused, otherwise reallocate a new one. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern SwsContext* sws_getCachedContext(SwsContext* @context, int @srcW, int @srcH, AVPixelFormat @srcFormat, int @dstW, int @dstH, AVPixelFormat @dstFormat, int @flags, SwsFilter* @srcFilter, SwsFilter* @dstFilter, double* @param); /// Return a pointer to yuv<->rgb coefficients for the given colorspace suitable for sws_setColorspaceDetails(). /// One of the SWS_CS_* macros. If invalid, SWS_CS_DEFAULT is used. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int* sws_getCoefficients(int @colorspace); /// Returns A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. /// A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_getColorspaceDetails(SwsContext* @c, int** @inv_table, int* @srcRange, int** @table, int* @dstRange, int* @brightness, int* @contrast, int* @saturation); /// Allocate and return an SwsContext. You need it to perform scaling/conversion operations using sws_scale(). @@ -5114,41 +5130,41 @@ public static extern int avio_vprintf(AVIOContext* @s, /// specify which algorithm and options to use for rescaling /// extra parameters to tune the used scaler For SWS_BICUBIC param[0] and [1] tune the shape of the basis function, param[0] tunes f(1) and param[1] f´(1) For SWS_GAUSS param[0] tunes the exponent and thus cutoff frequency For SWS_LANCZOS param[0] tunes the width of the window function /// a pointer to an allocated context, or NULL in case of error - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern SwsContext* sws_getContext(int @srcW, int @srcH, AVPixelFormat @srcFormat, int @dstW, int @dstH, AVPixelFormat @dstFormat, int @flags, SwsFilter* @srcFilter, SwsFilter* @dstFilter, double* @param); - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern SwsFilter* sws_getDefaultFilter(float @lumaGBlur, float @chromaGBlur, float @lumaSharpen, float @chromaSharpen, float @chromaHShift, float @chromaVShift, int @verbose); /// Return a normalized Gaussian curve used to filter stuff quality = 3 is high quality, lower is lower quality. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern SwsVector* sws_getGaussianVec(double @variance, double @quality); /// Initialize the swscaler context sws_context. /// zero or positive value on success, a negative value on error - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_init_context(SwsContext* @sws_context, SwsFilter* @srcFilter, SwsFilter* @dstFilter); /// Check if a given conversion is a noop. Returns a positive integer if no operation needs to be performed, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_is_noop(AVFrame* @dst, AVFrame* @src); /// Returns a positive value if an endianness conversion for pix_fmt is supported, 0 otherwise. /// the pixel format /// a positive value if an endianness conversion for pix_fmt is supported, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_isSupportedEndiannessConversion(AVPixelFormat @pix_fmt); /// Return a positive value if pix_fmt is a supported input format, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_isSupportedInput(AVPixelFormat @pix_fmt); /// Return a positive value if pix_fmt is a supported output format, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_isSupportedOutput(AVPixelFormat @pix_fmt); /// Scale all the coefficients of a so that their sum equals height. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_normalizeVec(SwsVector* @a, double @height); /// Request a horizontal slice of the output data to be written into the frame previously provided to sws_frame_start(). @@ -5156,13 +5172,13 @@ public static extern int avio_vprintf(AVIOContext* @s, /// first row of the slice; must be a multiple of sws_receive_slice_alignment() /// 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) /// 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 - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_receive_slice(SwsContext* @c, uint @slice_start, uint @slice_height); /// Get the alignment required for slices. Requires a context that has previously been initialized with sws_init_context(). /// The scaling context /// 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. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern uint sws_receive_slice_alignment(SwsContext* @c); /// Scale the image slice in srcSlice and put the resulting scaled slice in the image in dst. A slice is a sequence of consecutive rows in an image. Requires a context that has previously been initialized with sws_init_context(). @@ -5174,18 +5190,18 @@ public static extern int avio_vprintf(AVIOContext* @s, /// the array containing the pointers to the planes of the destination image /// the array containing the strides for each plane of the destination image /// the height of the output slice - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_scale(SwsContext* @c, byte*[] @srcSlice, int[] @srcStride, int @srcSliceY, int @srcSliceH, byte*[] @dst, int[] @dstStride); /// Scale source data from `src` and write the output to `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 (or all) output planes may be references to input planes, rather than copies. /// The source frame. If the data buffers are set to NULL, then this function behaves identically to `sws_frame_setup`. /// >= 0 on success, a negative AVERROR code on failure. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_scale_frame(SwsContext* @c, AVFrame* @dst, AVFrame* @src); /// Scale all the coefficients of a by the scalar value. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_scaleVec(SwsVector* @a, double @scalar); /// 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. @@ -5193,7 +5209,7 @@ public static extern int avio_vprintf(AVIOContext* @s, /// first row of the slice /// number of rows in the slice /// a non-negative number on success, a negative AVERROR code on failure. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_send_slice(SwsContext* @c, uint @slice_start, uint @slice_height); /// Returns A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. @@ -5206,59 +5222,59 @@ public static extern int avio_vprintf(AVIOContext* @s, /// 16.16 fixed point contrast correction /// 16.16 fixed point saturation correction /// A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_setColorspaceDetails(SwsContext* @c, in int4 @inv_table, int @srcRange, in int4 @table, int @dstRange, int @brightness, int @contrast, int @saturation); /// Test if a given color space is supported. /// The colorspace to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_colorspace(AVColorSpace @colorspace, int @output); - /// Test if a given (software) pixel format is supported. + /// Test if a given (software) pixel format is supported by any backend, excluding unstable backends. /// The format to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_format(AVPixelFormat @format, int @output); /// Helper function to run all sws_test_* against a frame, as well as testing the basic frame properties for sanity. Ignores irrelevant properties - for example, AVColorSpace is not checked for RGB frames. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_frame(AVFrame* @frame, int @output); - /// Test if a given hardware pixel format is supported. + /// Test if a given hardware pixel format is supported by any backend, excluding unstable backends. /// The hardware format to check, or AV_PIX_FMT_NONE. /// A positive integer if supported or AV_PIX_FMT_NONE, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_hw_format(AVPixelFormat @format); /// Test if a given set of color primaries is supported. /// The color primaries to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_primaries(AVColorPrimaries @primaries, int @output); /// Test if a given color transfer function is supported. /// The color transfer function to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_transfer(AVColorTransferCharacteristic @trc, int @output); /// Return the libswscale build-time configuration. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string swscale_configuration(); /// Return the libswscale license. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string swscale_license(); /// Color conversion and scaling library. - [DllImport("swscale-9", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-10", CallingConvention = CallingConvention.Cdecl)] public static extern uint swscale_version(); public unsafe static void Initialize() @@ -5417,6 +5433,10 @@ public unsafe static void Initialize() vectors.av_dynamic_hdr_plus_create_side_data = av_dynamic_hdr_plus_create_side_data; vectors.av_dynamic_hdr_plus_from_t35 = av_dynamic_hdr_plus_from_t35; vectors.av_dynamic_hdr_plus_to_t35 = av_dynamic_hdr_plus_to_t35; + vectors.av_dynamic_hdr_smpte2094_app5_alloc = av_dynamic_hdr_smpte2094_app5_alloc; + vectors.av_dynamic_hdr_smpte2094_app5_create_side_data = av_dynamic_hdr_smpte2094_app5_create_side_data; + vectors.av_dynamic_hdr_smpte2094_app5_from_t35 = av_dynamic_hdr_smpte2094_app5_from_t35; + vectors.av_dynamic_hdr_smpte2094_app5_to_t35 = av_dynamic_hdr_smpte2094_app5_to_t35; vectors.av_dynarray_add = av_dynarray_add; vectors.av_dynarray_add_nofree = av_dynarray_add_nofree; vectors.av_dynarray2_add = av_dynarray2_add; @@ -5545,7 +5565,6 @@ public unsafe static void Initialize() vectors.av_init_packet = av_init_packet; vectors.av_input_audio_device_next = av_input_audio_device_next; vectors.av_input_video_device_next = av_input_video_device_next; - vectors.av_int_list_length_for_size = av_int_list_length_for_size; vectors.av_interleaved_write_frame = av_interleaved_write_frame; vectors.av_interleaved_write_uncoded_frame = av_interleaved_write_uncoded_frame; vectors.av_log = av_log; @@ -5607,7 +5626,6 @@ public unsafe static void Initialize() vectors.av_opt_is_set_to_default = av_opt_is_set_to_default; vectors.av_opt_is_set_to_default_by_name = av_opt_is_set_to_default_by_name; vectors.av_opt_next = av_opt_next; - vectors.av_opt_ptr = av_opt_ptr; vectors.av_opt_query_ranges = av_opt_query_ranges; vectors.av_opt_query_ranges_default = av_opt_query_ranges_default; vectors.av_opt_serialize = av_opt_serialize; @@ -5676,6 +5694,8 @@ public unsafe static void Initialize() vectors.av_probe_input_format2 = av_probe_input_format2; vectors.av_probe_input_format3 = av_probe_input_format3; vectors.av_program_add_stream_index = av_program_add_stream_index; + vectors.av_program_add_stream_index2 = av_program_add_stream_index2; + vectors.av_program_copy = av_program_copy; vectors.av_q2intfloat = av_q2intfloat; vectors.av_read_frame = av_read_frame; vectors.av_read_image_line = av_read_image_line; @@ -5707,7 +5727,6 @@ public unsafe static void Initialize() vectors.av_size_mult = av_size_mult; vectors.av_strdup = av_strdup; vectors.av_stream_get_class = av_stream_get_class; - vectors.av_stream_get_codec_timebase = av_stream_get_codec_timebase; vectors.av_stream_get_parser = av_stream_get_parser; vectors.av_stream_group_get_class = av_stream_group_get_class; vectors.av_strerror = av_strerror; @@ -5864,7 +5883,6 @@ public unsafe static void Initialize() vectors.avformat_stream_group_add_stream = avformat_stream_group_add_stream; vectors.avformat_stream_group_create = avformat_stream_group_create; vectors.avformat_stream_group_name = avformat_stream_group_name; - vectors.avformat_transfer_internal_stream_timing_info = avformat_transfer_internal_stream_timing_info; vectors.avformat_version = avformat_version; vectors.avformat_write_header = avformat_write_header; vectors.avio_accept = avio_accept; diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs index 1420f395..6ca57b57 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs @@ -937,6 +937,30 @@ public unsafe static void Initialize() return vectors.av_dynamic_hdr_plus_to_t35(@s, @data, @size); }; + vectors.av_dynamic_hdr_smpte2094_app5_alloc = (ulong* @size) => + { + vectors.av_dynamic_hdr_smpte2094_app5_alloc = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_alloc(@size); + }; + + vectors.av_dynamic_hdr_smpte2094_app5_create_side_data = (AVFrame* @frame) => + { + vectors.av_dynamic_hdr_smpte2094_app5_create_side_data = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_create_side_data", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_create_side_data(@frame); + }; + + vectors.av_dynamic_hdr_smpte2094_app5_from_t35 = (AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size) => + { + vectors.av_dynamic_hdr_smpte2094_app5_from_t35 = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_from_t35", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_from_t35(@s, @data, @size); + }; + + vectors.av_dynamic_hdr_smpte2094_app5_to_t35 = (AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size) => + { + vectors.av_dynamic_hdr_smpte2094_app5_to_t35 = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_to_t35", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_to_t35(@s, @data, @size); + }; + vectors.av_dynarray_add = (void* @tab_ptr, int* @nb_ptr, void* @elem) => { vectors.av_dynarray_add = FunctionResolver.GetFunctionDelegate("avutil", "av_dynarray_add", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -1705,12 +1729,6 @@ public unsafe static void Initialize() return vectors.av_input_video_device_next(@d); }; - vectors.av_int_list_length_for_size = (uint @elsize, void* @list, ulong @term) => - { - vectors.av_int_list_length_for_size = FunctionResolver.GetFunctionDelegate("avutil", "av_int_list_length_for_size", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_int_list_length_for_size(@elsize, @list, @term); - }; - vectors.av_interleaved_write_frame = (AVFormatContext* @s, AVPacket* @pkt) => { vectors.av_interleaved_write_frame = FunctionResolver.GetFunctionDelegate("avformat", "av_interleaved_write_frame", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2077,12 +2095,6 @@ public unsafe static void Initialize() return vectors.av_opt_next(@obj, @prev); }; - vectors.av_opt_ptr = (AVClass* @avclass, void* @obj, string @name) => - { - vectors.av_opt_ptr = FunctionResolver.GetFunctionDelegate("avutil", "av_opt_ptr", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_opt_ptr(@avclass, @obj, @name); - }; - vectors.av_opt_query_ranges = (AVOptionRanges** @p0, void* @obj, string @key, int @flags) => { vectors.av_opt_query_ranges = FunctionResolver.GetFunctionDelegate("avutil", "av_opt_query_ranges", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2389,7 +2401,7 @@ public unsafe static void Initialize() vectors.av_parser_close(@s); }; - vectors.av_parser_init = (int @codec_id) => + vectors.av_parser_init = (AVCodecID @codec_id) => { vectors.av_parser_init = FunctionResolver.GetFunctionDelegate("avcodec", "av_parser_init", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; return vectors.av_parser_init(@codec_id); @@ -2491,6 +2503,18 @@ public unsafe static void Initialize() vectors.av_program_add_stream_index(@ac, @progid, @idx); }; + vectors.av_program_add_stream_index2 = (AVFormatContext* @ac, int @progid, uint @idx) => + { + vectors.av_program_add_stream_index2 = FunctionResolver.GetFunctionDelegate("avformat", "av_program_add_stream_index2", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_program_add_stream_index2(@ac, @progid, @idx); + }; + + vectors.av_program_copy = (AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags) => + { + vectors.av_program_copy = FunctionResolver.GetFunctionDelegate("avformat", "av_program_copy", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_program_copy(@dst, @src, @progid, @flags); + }; + vectors.av_q2intfloat = (AVRational @q) => { vectors.av_q2intfloat = FunctionResolver.GetFunctionDelegate("avutil", "av_q2intfloat", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2677,12 +2701,6 @@ public unsafe static void Initialize() return vectors.av_stream_get_class(); }; - vectors.av_stream_get_codec_timebase = (AVStream* @st) => - { - vectors.av_stream_get_codec_timebase = FunctionResolver.GetFunctionDelegate("avformat", "av_stream_get_codec_timebase", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_stream_get_codec_timebase(@st); - }; - vectors.av_stream_get_parser = (AVStream* @s) => { vectors.av_stream_get_parser = FunctionResolver.GetFunctionDelegate("avformat", "av_stream_get_parser", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3619,12 +3637,6 @@ public unsafe static void Initialize() return vectors.avformat_stream_group_name(@type); }; - vectors.avformat_transfer_internal_stream_timing_info = (AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb) => - { - vectors.avformat_transfer_internal_stream_timing_info = FunctionResolver.GetFunctionDelegate("avformat", "avformat_transfer_internal_stream_timing_info", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avformat_transfer_internal_stream_timing_info(@ofmt, @ost, @ist, @copy_tb); - }; - vectors.avformat_version = () => { vectors.avformat_version = FunctionResolver.GetFunctionDelegate("avformat", "avformat_version", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.libraries.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.libraries.g.cs index 0b4a2df5..86195d0a 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.libraries.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.libraries.g.cs @@ -6,12 +6,12 @@ public static unsafe partial class DynamicallyLoadedBindings { public static Dictionary LibraryVersionMap = new Dictionary { - {"avcodec", 62}, - {"avdevice", 62}, - {"avfilter", 11}, - {"avformat", 62}, - {"avutil", 60}, - {"swresample", 6}, - {"swscale", 9}, + {"avcodec", 63}, + {"avdevice", 63}, + {"avfilter", 12}, + {"avformat", 63}, + {"avutil", 61}, + {"swresample", 7}, + {"swscale", 10}, }; } diff --git a/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs b/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs index 2a5f8090..cca9d5d2 100644 --- a/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs @@ -1035,6 +1035,33 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dynamic_hdr_plus_to_t35(AVDynamicHDRPlus* @s, byte** @data, ulong* @size); + /// Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to default values. The resulting struct can be freed using av_freep(). + /// An AVDynamicHDRSmpte2094App5 filled with default values or NULL on failure. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc(ulong* @size); + + /// Allocate a complete AVDynamicHDRSmpte2094App5 and add it to the frame. + /// The frame which side data is added to. + /// The AVDynamicHDRSmpte2094App5 structure to be filled by caller or NULL on failure. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data(AVFrame* @frame); + + /// Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5. + /// A pointer containing the decoded AVDynamicHDRSmpte2094App5 structure. + /// The byte array containing the raw ITU-T T.35 data. + /// Size of the data array in bytes. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size); + + /// Serialize dynamic SMPTE-2094-50 metadata to a ITU-T T.35 message. Excluding the country_code, provider_code and provider_oriented_code. + /// A pointer containing the AVDynamicHDRSmpte2094App5 data. + /// A pointer to pointer to a byte buffer to be filled with the serialized metadata. If *data is NULL, a buffer be will be allocated and a pointer to it stored in its place. The caller assumes ownership of the buffer. May be NULL, in which case the function will only store the required buffer size in *size. + /// A pointer to a size to be set to the returned buffer's size. If *data is not NULL, *size must contain the size of the input buffer. May be NULL only if *data is NULL. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_dynamic_hdr_smpte2094_app5_to_t35(AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size); + /// Add the pointer to an element to a dynamic array. /// Pointer to the array to grow /// Pointer to the number of elements in the array @@ -1375,7 +1402,7 @@ public static extern int av_filename_number_test( [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern 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. + /// This function is the same as ::av_get_audio_frame_duration(), except it works with ::AVCodecParameters instead of an ::AVCodecContext. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_audio_frame_duration2(AVCodecParameters* @par, int @frame_bytes); @@ -1534,7 +1561,7 @@ public static extern AVSampleFormat av_get_sample_fmt( /// the buffer where to write the string /// the size of buf /// the number of the sample format to print the corresponding info string, or a negative value to print the corresponding header. - /// the pointer to the filled buffer or NULL if sample_fmt is unknown or in case of other errors + /// the pointer to the filled buffer or NULL in case of other errors [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_get_sample_fmt_string(byte* @buf, int @buf_size, AVSampleFormat @sample_fmt); @@ -1968,15 +1995,6 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_input_video_device_next(AVInputFormat* @d); - /// Compute the length of an integer list. - /// size in bytes of each list element (only 1, 2, 4 or 8) - /// pointer to the list - /// list terminator (usually 0 or -1) - /// length of the list, in elements, not counting the terminator - [Obsolete()] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern uint av_int_list_length_for_size(uint @elsize, void* @list, ulong @term); - /// Write a packet to an output media file ensuring correct interleaving. /// media file handle /// The packet containing the data to be written. If the packet is reference-counted, this function will take ownership of this reference and unreference it later when it sees 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. Packet's "stream_index" field must be set to the index of the corresponding stream in "s->streams". The timestamps ( "pts", "dts") must be set to correct values in the stream's timebase (unless the output format is flagged with the AVFMT_NOTIMESTAMPS flag, then they can be set to AV_NOPTS_VALUE). 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). "duration" should also be set if known. @@ -2528,17 +2546,6 @@ public static extern int av_opt_is_set_to_default_by_name(void* @obj, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_next(void* @obj, AVOption* @prev); - /// Gets a pointer to the requested field in a struct. This function allows accessing a struct even when its fields are moved or renamed since the application making the access has been compiled, - [Obsolete("direct access to AVOption-exported fields is not supported")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern void* av_opt_ptr(AVClass* @avclass, void* @obj, - #if NETSTANDARD2_1_OR_GREATER - [MarshalAs(UnmanagedType.LPUTF8Str)] - #else - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] - #endif - string @name); - /// Get a list of allowed ranges for the given option. /// is a bitmask of flags, undefined flags should not be set and should be ignored AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, /// number of components returned on success, a negative error code otherwise @@ -2958,7 +2965,7 @@ public static extern int av_parse_cpu_caps(uint* @flags, public static extern void av_parser_close(AVCodecParserContext* @s); [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern AVCodecParserContext* av_parser_init(int @codec_id); + public static extern AVCodecParserContext* av_parser_init(AVCodecID @codec_id); /// Iterate over all registered codec parsers. /// a pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration. @@ -3081,6 +3088,23 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void av_program_add_stream_index(AVFormatContext* @ac, int @progid, uint @idx); + /// Add the supplied index of a stream to the AVProgram with matching id. + /// the format context which contains the target AVProgram + /// the ID of the AVProgram whose stream index is to be updated + /// the index of the stream to be added + /// >=0 upon successful addition or if index was already present, AVERROR if no matching program is found or stream index is invalid or the stream index array reallocation failed. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_program_add_stream_index2(AVFormatContext* @ac, int @progid, uint @idx); + + /// Copy an AVProgram from one AVFormatContext to another. + /// pointer to the target muxer context + /// pointer to the source muxer context + /// ID of the program to be copied + /// combination of flags which determine how streams are matched and whether pre-existing AVProgram in target is overwritten. If no match condition is set, streams will be matched by ids if all source stream ids are non-zero and unique, else by index. + /// >= 0 in case of success, Error EEXIST if target already has program with same ID and overwrite flag isn't set, else a negative AVERROR code in case of other failures. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern int av_program_copy(AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags); + /// Convert an AVRational to a IEEE 32-bit `float` expressed in fixed-point format. /// Rational to be converted /// Equivalent floating-point value, expressed as an unsigned 32-bit integer. @@ -3323,10 +3347,6 @@ public static extern int av_set_options_string(void* @ctx, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* av_stream_get_class(); - [Obsolete("do not call this function")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern AVRational av_stream_get_codec_timebase(AVStream* @st); - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParserContext* av_stream_get_parser(AVStream* @s); @@ -3774,7 +3794,7 @@ public static extern void av_vlog(void* @avcl, int @level, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_open2(AVCodecContext* @avctx, AVCodec* @codec, AVDictionary** @options); - /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with avcodec_parameters_free(). + /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with ::avcodec_parameters_free(). [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParameters* avcodec_parameters_alloc(); @@ -3783,7 +3803,7 @@ public static extern void av_vlog(void* @avcl, int @level, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_parameters_copy(AVCodecParameters* @dst, AVCodecParameters* @src); - /// Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied pointer. + /// Free an AVCodecParameters instance and everything associated with it and write `NULL` to the supplied pointer. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void avcodec_parameters_free(AVCodecParameters** @par); @@ -4482,10 +4502,6 @@ public static extern int avformat_open_input(AVFormatContext** @ps, [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avformat_stream_group_name(AVStreamGroupParamsType @type); - [Obsolete("do not call this function")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern int avformat_transfer_internal_stream_timing_info(AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb); - /// Return the LIBAVFORMAT_VERSION_INT constant. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern uint avformat_version(); @@ -5216,7 +5232,7 @@ public static extern int avio_vprintf(AVIOContext* @s, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_colorspace(AVColorSpace @colorspace, int @output); - /// Test if a given (software) pixel format is supported. + /// Test if a given (software) pixel format is supported by any backend, excluding unstable backends. /// The format to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. @@ -5227,7 +5243,7 @@ public static extern int avio_vprintf(AVIOContext* @s, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_test_frame(AVFrame* @frame, int @output); - /// Test if a given hardware pixel format is supported. + /// Test if a given hardware pixel format is supported by any backend, excluding unstable backends. /// The hardware format to check, or AV_PIX_FMT_NONE. /// A positive integer if supported or AV_PIX_FMT_NONE, 0 otherwise. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -5417,6 +5433,10 @@ public unsafe static void Initialize() vectors.av_dynamic_hdr_plus_create_side_data = av_dynamic_hdr_plus_create_side_data; vectors.av_dynamic_hdr_plus_from_t35 = av_dynamic_hdr_plus_from_t35; vectors.av_dynamic_hdr_plus_to_t35 = av_dynamic_hdr_plus_to_t35; + vectors.av_dynamic_hdr_smpte2094_app5_alloc = av_dynamic_hdr_smpte2094_app5_alloc; + vectors.av_dynamic_hdr_smpte2094_app5_create_side_data = av_dynamic_hdr_smpte2094_app5_create_side_data; + vectors.av_dynamic_hdr_smpte2094_app5_from_t35 = av_dynamic_hdr_smpte2094_app5_from_t35; + vectors.av_dynamic_hdr_smpte2094_app5_to_t35 = av_dynamic_hdr_smpte2094_app5_to_t35; vectors.av_dynarray_add = av_dynarray_add; vectors.av_dynarray_add_nofree = av_dynarray_add_nofree; vectors.av_dynarray2_add = av_dynarray2_add; @@ -5545,7 +5565,6 @@ public unsafe static void Initialize() vectors.av_init_packet = av_init_packet; vectors.av_input_audio_device_next = av_input_audio_device_next; vectors.av_input_video_device_next = av_input_video_device_next; - vectors.av_int_list_length_for_size = av_int_list_length_for_size; vectors.av_interleaved_write_frame = av_interleaved_write_frame; vectors.av_interleaved_write_uncoded_frame = av_interleaved_write_uncoded_frame; vectors.av_log = av_log; @@ -5607,7 +5626,6 @@ public unsafe static void Initialize() vectors.av_opt_is_set_to_default = av_opt_is_set_to_default; vectors.av_opt_is_set_to_default_by_name = av_opt_is_set_to_default_by_name; vectors.av_opt_next = av_opt_next; - vectors.av_opt_ptr = av_opt_ptr; vectors.av_opt_query_ranges = av_opt_query_ranges; vectors.av_opt_query_ranges_default = av_opt_query_ranges_default; vectors.av_opt_serialize = av_opt_serialize; @@ -5676,6 +5694,8 @@ public unsafe static void Initialize() vectors.av_probe_input_format2 = av_probe_input_format2; vectors.av_probe_input_format3 = av_probe_input_format3; vectors.av_program_add_stream_index = av_program_add_stream_index; + vectors.av_program_add_stream_index2 = av_program_add_stream_index2; + vectors.av_program_copy = av_program_copy; vectors.av_q2intfloat = av_q2intfloat; vectors.av_read_frame = av_read_frame; vectors.av_read_image_line = av_read_image_line; @@ -5707,7 +5727,6 @@ public unsafe static void Initialize() vectors.av_size_mult = av_size_mult; vectors.av_strdup = av_strdup; vectors.av_stream_get_class = av_stream_get_class; - vectors.av_stream_get_codec_timebase = av_stream_get_codec_timebase; vectors.av_stream_get_parser = av_stream_get_parser; vectors.av_stream_group_get_class = av_stream_group_get_class; vectors.av_strerror = av_strerror; @@ -5864,7 +5883,6 @@ public unsafe static void Initialize() vectors.avformat_stream_group_add_stream = avformat_stream_group_add_stream; vectors.avformat_stream_group_create = avformat_stream_group_create; vectors.avformat_stream_group_name = avformat_stream_group_name; - vectors.avformat_transfer_internal_stream_timing_info = avformat_transfer_internal_stream_timing_info; vectors.avformat_version = avformat_version; vectors.avformat_write_header = avformat_write_header; vectors.avio_accept = avio_accept; diff --git a/FFmpeg.AutoGen.CppSharpUnsafeGenerator/Processing/StructureProcessor.cs b/FFmpeg.AutoGen.CppSharpUnsafeGenerator/Processing/StructureProcessor.cs index ddc8df2c..e4142a77 100644 --- a/FFmpeg.AutoGen.CppSharpUnsafeGenerator/Processing/StructureProcessor.cs +++ b/FFmpeg.AutoGen.CppSharpUnsafeGenerator/Processing/StructureProcessor.cs @@ -60,6 +60,7 @@ private void MakeDefinition(Class @class, string name) var bitFieldComments = new List(); long bitCounter = 0; var fields = new List(); + var anonymousFieldCount = 0; foreach (var field in @class.Fields) { @@ -80,10 +81,16 @@ private void MakeDefinition(Class @class, string name) continue; } - var typeName = $"{field.Class.Name}_{field.Name}"; + // Anonymous struct/union members carry no name in C; C# has no equivalent, + // so they are exposed as a regular nested field under a synthesized name. + var fieldName = string.IsNullOrEmpty(field.Name) + ? $"{(IsUnion(field.Type) ? "union" : "struct")}{anonymousFieldCount++}" + : field.Name; + + var typeName = $"{field.Class.Name}_{fieldName}"; fields.Add(new StructureField { - Name = field.Name, + Name = fieldName, FieldType = GetTypeDefinition(field.Type, typeName), Content = field.Comment?.BriefText, Obsoletion = ObsoletionHelper.CreateObsoletion(field) @@ -110,6 +117,8 @@ internal TypeDefinition GetTypeDefinition(Type type, string name = null) }; } + private static bool IsUnion(Type type) => type.TryGetClass(out var @class) && @class.IsUnion; + private static StructureField GetBitField(IEnumerable names, long bitCounter, List comments) { var fieldName = string.Join("_", names); diff --git a/FFmpeg.AutoGen.Example/Program.cs b/FFmpeg.AutoGen.Example/Program.cs index 5397bba8..af7c35c2 100644 --- a/FFmpeg.AutoGen.Example/Program.cs +++ b/FFmpeg.AutoGen.Example/Program.cs @@ -14,6 +14,9 @@ namespace FFmpeg.AutoGen.Example; internal class Program { + // 854x480 H.264, 52 s, ~4 MB. Might also be a local resource, e.g. "../../sample_mpeg4.mp4". + private const string SampleVideoUrl = "https://media.w3.org/2010/05/sintel/trailer.mp4"; + private static void Main(string[] args) { Console.WriteLine("Current directory: " + Environment.CurrentDirectory); @@ -98,10 +101,7 @@ private static unsafe void SetupLogging() private static unsafe void DecodeAllFramesToImages(AVHWDeviceType HWDevice) { - // decode all frames from url, please not it might local resorce, e.g. string url = "../../sample_mpeg4.mp4"; - - var url = "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4"; // ~1 MB, 10 s, 1080p H.264 - using var vsd = new VideoStreamDecoder(url, HWDevice); + using var vsd = new VideoStreamDecoder(SampleVideoUrl, HWDevice); Console.WriteLine($"codec name: {vsd.CodecName}"); diff --git a/FFmpeg.AutoGen/generated/Arrays.g.cs b/FFmpeg.AutoGen/generated/Arrays.g.cs index 1d53f82e..0c8f586d 100644 --- a/FFmpeg.AutoGen/generated/Arrays.g.cs +++ b/FFmpeg.AutoGen/generated/Arrays.g.cs @@ -244,6 +244,28 @@ public void UpdateFrom(byte[] array) public static implicit operator byte[](byte_array4 @struct) => @struct.ToArray(); } +public unsafe struct byte_array4x6 : IFixedArray +{ + public static readonly int Size = 4; + public int Length => 4; + byte_array6 _0; byte_array6 _1; byte_array6 _2; byte_array6 _3; + + public byte_array6 this[uint i] + { + get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (byte_array6* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (byte_array6* p0 = &_0) { *(p0 + i) = value; } } + } + public byte_array6[] ToArray() + { + fixed (byte_array6* p0 = &_0) { var a = new byte_array6[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(byte_array6[] array) + { + fixed (byte_array6* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 4) return; } } + } + public static implicit operator byte_array6[](byte_array4x6 @struct) => @struct.ToArray(); +} + public unsafe struct int_array4 : IFixedArray { public static readonly int Size = 4; @@ -332,26 +354,136 @@ public void UpdateFrom(ulong[] array) public static implicit operator ulong[](ulong_array4 @struct) => @struct.ToArray(); } -public unsafe struct int_array7 : IFixedArray +public unsafe struct ushort_array4 : IFixedArray { - public static readonly int Size = 7; - public int Length => 7; - fixed int _[7]; + public static readonly int Size = 4; + public int Length => 4; + fixed ushort _[4]; - public int this[uint i] + public ushort this[uint i] { get => _[i]; set => _[i] = value; } - public int[] ToArray() + public ushort[] ToArray() { - var a = new int[7]; for (uint i = 0; i < 7; i++) a[i] = _[i]; return a; + var a = new ushort[4]; for (uint i = 0; i < 4; i++) a[i] = _[i]; return a; } - public void UpdateFrom(int[] array) + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 4) return; } + } + public static implicit operator ushort[](ushort_array4 @struct) => @struct.ToArray(); +} + +public unsafe struct ushort_array4x32 : IFixedArray +{ + public static readonly int Size = 4; + public int Length => 4; + ushort_array32 _0; ushort_array32 _1; ushort_array32 _2; ushort_array32 _3; + + public ushort_array32 this[uint i] + { + get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort_array32* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort_array32* p0 = &_0) { *(p0 + i) = value; } } + } + public ushort_array32[] ToArray() + { + fixed (ushort_array32* p0 = &_0) { var a = new ushort_array32[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(ushort_array32[] array) + { + fixed (ushort_array32* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 4) return; } } + } + public static implicit operator ushort_array32[](ushort_array4x32 @struct) => @struct.ToArray(); +} + +public unsafe struct ushort_array4x6 : IFixedArray +{ + public static readonly int Size = 4; + public int Length => 4; + ushort_array6 _0; ushort_array6 _1; ushort_array6 _2; ushort_array6 _3; + + public ushort_array6 this[uint i] + { + get { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort_array6* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 4) throw new ArgumentOutOfRangeException(); fixed (ushort_array6* p0 = &_0) { *(p0 + i) = value; } } + } + public ushort_array6[] ToArray() + { + fixed (ushort_array6* p0 = &_0) { var a = new ushort_array6[4]; for (uint i = 0; i < 4; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(ushort_array6[] array) + { + fixed (ushort_array6* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 4) return; } } + } + public static implicit operator ushort_array6[](ushort_array4x6 @struct) => @struct.ToArray(); +} + +public unsafe struct byte_array6 : IFixedArray +{ + public static readonly int Size = 6; + public int Length => 6; + fixed byte _[6]; + + public byte this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public byte[] ToArray() + { + var a = new byte[6]; for (uint i = 0; i < 6; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(byte[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 6) return; } + } + public static implicit operator byte[](byte_array6 @struct) => @struct.ToArray(); +} + +public unsafe struct ushort_array6 : IFixedArray +{ + public static readonly int Size = 6; + public int Length => 6; + fixed ushort _[6]; + + public ushort this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public ushort[] ToArray() + { + var a = new ushort[6]; for (uint i = 0; i < 6; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 6) return; } + } + public static implicit operator ushort[](ushort_array6 @struct) => @struct.ToArray(); +} + +public unsafe struct AVCodecID_array7 : IFixedArray +{ + public static readonly int Size = 7; + public int Length => 7; + AVCodecID _0; AVCodecID _1; AVCodecID _2; AVCodecID _3; AVCodecID _4; AVCodecID _5; AVCodecID _6; + + public AVCodecID this[uint i] + { + get { if (i >= 7) throw new ArgumentOutOfRangeException(); fixed (AVCodecID* p0 = &_0) { return *(p0 + i); } } + set { if (i >= 7) throw new ArgumentOutOfRangeException(); fixed (AVCodecID* p0 = &_0) { *(p0 + i) = value; } } + } + public AVCodecID[] ToArray() + { + fixed (AVCodecID* p0 = &_0) { var a = new AVCodecID[7]; for (uint i = 0; i < 7; i++) a[i] = *(p0 + i); return a; } + } + public void UpdateFrom(AVCodecID[] array) { - uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 7) return; } + fixed (AVCodecID* p0 = &_0) { uint i = 0; foreach(var value in array) { *(p0 + i++) = value; if (i >= 7) return; } } } - public static implicit operator int[](int_array7 @struct) => @struct.ToArray(); + public static implicit operator AVCodecID[](AVCodecID_array7 @struct) => @struct.ToArray(); } public unsafe struct AVBufferRef_ptrArray8 : IFixedArray @@ -464,6 +596,28 @@ public void UpdateFrom(ulong[] array) public static implicit operator ulong[](ulong_array8 @struct) => @struct.ToArray(); } +public unsafe struct ushort_array8 : IFixedArray +{ + public static readonly int Size = 8; + public int Length => 8; + fixed ushort _[8]; + + public ushort this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public ushort[] ToArray() + { + var a = new ushort[8]; for (uint i = 0; i < 8; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 8) return; } + } + public static implicit operator ushort[](ushort_array8 @struct) => @struct.ToArray(); +} + public unsafe struct int_array9 : IFixedArray { public static readonly int Size = 9; @@ -596,3 +750,25 @@ public void UpdateFrom(AVRational_array25[] array) public static implicit operator AVRational_array25[](AVRational_array25x25 @struct) => @struct.ToArray(); } +public unsafe struct ushort_array32 : IFixedArray +{ + public static readonly int Size = 32; + public int Length => 32; + fixed ushort _[32]; + + public ushort this[uint i] + { + get => _[i]; + set => _[i] = value; + } + public ushort[] ToArray() + { + var a = new ushort[32]; for (uint i = 0; i < 32; i++) a[i] = _[i]; return a; + } + public void UpdateFrom(ushort[] array) + { + uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 32) return; } + } + public static implicit operator ushort[](ushort_array32 @struct) => @struct.ToArray(); +} + diff --git a/FFmpeg.AutoGen/generated/Delegates.g.cs b/FFmpeg.AutoGen/generated/Delegates.g.cs index a4c168ef..9a7226a3 100644 --- a/FFmpeg.AutoGen/generated/Delegates.g.cs +++ b/FFmpeg.AutoGen/generated/Delegates.g.cs @@ -191,38 +191,6 @@ public unsafe struct AVCodecContext_get_format_func public static implicit operator AVCodecContext_get_format_func(AVCodecContext_get_format func) => new AVCodecContext_get_format_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; } -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate void AVCodecParser_parser_close (AVCodecParserContext* @s); -public unsafe struct AVCodecParser_parser_close_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_parser_close_func(AVCodecParser_parser_close func) => new AVCodecParser_parser_close_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVCodecParser_parser_init (AVCodecParserContext* @s); -public unsafe struct AVCodecParser_parser_init_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_parser_init_func(AVCodecParser_parser_init func) => new AVCodecParser_parser_init_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVCodecParser_parser_parse (AVCodecParserContext* @s, AVCodecContext* @avctx, byte** @poutbuf, int* @poutbuf_size, byte* @buf, int @buf_size); -public unsafe struct AVCodecParser_parser_parse_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_parser_parse_func(AVCodecParser_parser_parse func) => new AVCodecParser_parser_parse_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVCodecParser_split (AVCodecContext* @avctx, byte* @buf, int @buf_size); -public unsafe struct AVCodecParser_split_func -{ - public IntPtr Pointer; - public static implicit operator AVCodecParser_split_func(AVCodecParser_split func) => new AVCodecParser_split_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public unsafe delegate void AVD3D11VADeviceContext_lock (void* @lock_ctx); public unsafe struct AVD3D11VADeviceContext_lock_func diff --git a/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs b/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs index 5791431d..d2272cd3 100644 --- a/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs +++ b/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs @@ -936,6 +936,30 @@ public unsafe static void Initialize() return vectors.av_dynamic_hdr_plus_to_t35(@s, @data, @size); }; + vectors.av_dynamic_hdr_smpte2094_app5_alloc = (ulong* @size) => + { + vectors.av_dynamic_hdr_smpte2094_app5_alloc = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_alloc(@size); + }; + + vectors.av_dynamic_hdr_smpte2094_app5_create_side_data = (AVFrame* @frame) => + { + vectors.av_dynamic_hdr_smpte2094_app5_create_side_data = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_create_side_data", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_create_side_data(@frame); + }; + + vectors.av_dynamic_hdr_smpte2094_app5_from_t35 = (AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size) => + { + vectors.av_dynamic_hdr_smpte2094_app5_from_t35 = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_from_t35", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_from_t35(@s, @data, @size); + }; + + vectors.av_dynamic_hdr_smpte2094_app5_to_t35 = (AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size) => + { + vectors.av_dynamic_hdr_smpte2094_app5_to_t35 = FunctionResolver.GetFunctionDelegate("avutil", "av_dynamic_hdr_smpte2094_app5_to_t35", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dynamic_hdr_smpte2094_app5_to_t35(@s, @data, @size); + }; + vectors.av_dynarray_add = (void* @tab_ptr, int* @nb_ptr, void* @elem) => { vectors.av_dynarray_add = FunctionResolver.GetFunctionDelegate("avutil", "av_dynarray_add", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -1704,12 +1728,6 @@ public unsafe static void Initialize() return vectors.av_input_video_device_next(@d); }; - vectors.av_int_list_length_for_size = (uint @elsize, void* @list, ulong @term) => - { - vectors.av_int_list_length_for_size = FunctionResolver.GetFunctionDelegate("avutil", "av_int_list_length_for_size", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_int_list_length_for_size(@elsize, @list, @term); - }; - vectors.av_interleaved_write_frame = (AVFormatContext* @s, AVPacket* @pkt) => { vectors.av_interleaved_write_frame = FunctionResolver.GetFunctionDelegate("avformat", "av_interleaved_write_frame", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2076,12 +2094,6 @@ public unsafe static void Initialize() return vectors.av_opt_next(@obj, @prev); }; - vectors.av_opt_ptr = (AVClass* @avclass, void* @obj, string @name) => - { - vectors.av_opt_ptr = FunctionResolver.GetFunctionDelegate("avutil", "av_opt_ptr", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_opt_ptr(@avclass, @obj, @name); - }; - vectors.av_opt_query_ranges = (AVOptionRanges** @p0, void* @obj, string @key, int @flags) => { vectors.av_opt_query_ranges = FunctionResolver.GetFunctionDelegate("avutil", "av_opt_query_ranges", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2388,7 +2400,7 @@ public unsafe static void Initialize() vectors.av_parser_close(@s); }; - vectors.av_parser_init = (int @codec_id) => + vectors.av_parser_init = (AVCodecID @codec_id) => { vectors.av_parser_init = FunctionResolver.GetFunctionDelegate("avcodec", "av_parser_init", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; return vectors.av_parser_init(@codec_id); @@ -2490,6 +2502,18 @@ public unsafe static void Initialize() vectors.av_program_add_stream_index(@ac, @progid, @idx); }; + vectors.av_program_add_stream_index2 = (AVFormatContext* @ac, int @progid, uint @idx) => + { + vectors.av_program_add_stream_index2 = FunctionResolver.GetFunctionDelegate("avformat", "av_program_add_stream_index2", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_program_add_stream_index2(@ac, @progid, @idx); + }; + + vectors.av_program_copy = (AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags) => + { + vectors.av_program_copy = FunctionResolver.GetFunctionDelegate("avformat", "av_program_copy", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_program_copy(@dst, @src, @progid, @flags); + }; + vectors.av_q2intfloat = (AVRational @q) => { vectors.av_q2intfloat = FunctionResolver.GetFunctionDelegate("avutil", "av_q2intfloat", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2676,12 +2700,6 @@ public unsafe static void Initialize() return vectors.av_stream_get_class(); }; - vectors.av_stream_get_codec_timebase = (AVStream* @st) => - { - vectors.av_stream_get_codec_timebase = FunctionResolver.GetFunctionDelegate("avformat", "av_stream_get_codec_timebase", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_stream_get_codec_timebase(@st); - }; - vectors.av_stream_get_parser = (AVStream* @s) => { vectors.av_stream_get_parser = FunctionResolver.GetFunctionDelegate("avformat", "av_stream_get_parser", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3618,12 +3636,6 @@ public unsafe static void Initialize() return vectors.avformat_stream_group_name(@type); }; - vectors.avformat_transfer_internal_stream_timing_info = (AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb) => - { - vectors.avformat_transfer_internal_stream_timing_info = FunctionResolver.GetFunctionDelegate("avformat", "avformat_transfer_internal_stream_timing_info", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avformat_transfer_internal_stream_timing_info(@ofmt, @ost, @ist, @copy_tb); - }; - vectors.avformat_version = () => { vectors.avformat_version = FunctionResolver.GetFunctionDelegate("avformat", "avformat_version", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; diff --git a/FFmpeg.AutoGen/generated/Enums.g.cs b/FFmpeg.AutoGen/generated/Enums.g.cs index 55259abd..90659a81 100644 --- a/FFmpeg.AutoGen/generated/Enums.g.cs +++ b/FFmpeg.AutoGen/generated/Enums.g.cs @@ -417,126 +417,124 @@ public enum AVCodecID : int @AV_CODEC_ID_BMV_VIDEO = 153, @AV_CODEC_ID_VBLE = 154, @AV_CODEC_ID_DXTORY = 155, - @AV_CODEC_ID_V410 = 156, - @AV_CODEC_ID_XWD = 157, - @AV_CODEC_ID_CDXL = 158, - @AV_CODEC_ID_XBM = 159, - @AV_CODEC_ID_ZEROCODEC = 160, - @AV_CODEC_ID_MSS1 = 161, - @AV_CODEC_ID_MSA1 = 162, - @AV_CODEC_ID_TSCC2 = 163, - @AV_CODEC_ID_MTS2 = 164, - @AV_CODEC_ID_CLLC = 165, - @AV_CODEC_ID_MSS2 = 166, - @AV_CODEC_ID_VP9 = 167, - @AV_CODEC_ID_AIC = 168, - @AV_CODEC_ID_ESCAPE130 = 169, - @AV_CODEC_ID_G2M = 170, - @AV_CODEC_ID_WEBP = 171, - @AV_CODEC_ID_HNM4_VIDEO = 172, - @AV_CODEC_ID_HEVC = 173, - @AV_CODEC_ID_FIC = 174, - @AV_CODEC_ID_ALIAS_PIX = 175, - @AV_CODEC_ID_BRENDER_PIX = 176, - @AV_CODEC_ID_PAF_VIDEO = 177, - @AV_CODEC_ID_EXR = 178, - @AV_CODEC_ID_VP7 = 179, - @AV_CODEC_ID_SANM = 180, - @AV_CODEC_ID_SGIRLE = 181, - @AV_CODEC_ID_MVC1 = 182, - @AV_CODEC_ID_MVC2 = 183, - @AV_CODEC_ID_HQX = 184, - @AV_CODEC_ID_TDSC = 185, - @AV_CODEC_ID_HQ_HQA = 186, - @AV_CODEC_ID_HAP = 187, - @AV_CODEC_ID_DDS = 188, - @AV_CODEC_ID_DXV = 189, - @AV_CODEC_ID_SCREENPRESSO = 190, - @AV_CODEC_ID_RSCC = 191, - @AV_CODEC_ID_AVS2 = 192, - @AV_CODEC_ID_PGX = 193, - @AV_CODEC_ID_AVS3 = 194, - @AV_CODEC_ID_MSP2 = 195, - @AV_CODEC_ID_VVC = 196, - @AV_CODEC_ID_Y41P = 197, - @AV_CODEC_ID_AVRP = 198, - @AV_CODEC_ID_012V = 199, - @AV_CODEC_ID_AVUI = 200, - @AV_CODEC_ID_TARGA_Y216 = 201, - @AV_CODEC_ID_V308 = 202, - @AV_CODEC_ID_V408 = 203, - @AV_CODEC_ID_YUV4 = 204, - @AV_CODEC_ID_AVRN = 205, - @AV_CODEC_ID_CPIA = 206, - @AV_CODEC_ID_XFACE = 207, - @AV_CODEC_ID_SNOW = 208, - @AV_CODEC_ID_SMVJPEG = 209, - @AV_CODEC_ID_APNG = 210, - @AV_CODEC_ID_DAALA = 211, - @AV_CODEC_ID_CFHD = 212, - @AV_CODEC_ID_TRUEMOTION2RT = 213, - @AV_CODEC_ID_M101 = 214, - @AV_CODEC_ID_MAGICYUV = 215, - @AV_CODEC_ID_SHEERVIDEO = 216, - @AV_CODEC_ID_YLC = 217, - @AV_CODEC_ID_PSD = 218, - @AV_CODEC_ID_PIXLET = 219, - @AV_CODEC_ID_SPEEDHQ = 220, - @AV_CODEC_ID_FMVC = 221, - @AV_CODEC_ID_SCPR = 222, - @AV_CODEC_ID_CLEARVIDEO = 223, - @AV_CODEC_ID_XPM = 224, - @AV_CODEC_ID_AV1 = 225, - @AV_CODEC_ID_BITPACKED = 226, - @AV_CODEC_ID_MSCC = 227, - @AV_CODEC_ID_SRGC = 228, - @AV_CODEC_ID_SVG = 229, - @AV_CODEC_ID_GDV = 230, - @AV_CODEC_ID_FITS = 231, - @AV_CODEC_ID_IMM4 = 232, - @AV_CODEC_ID_PROSUMER = 233, - @AV_CODEC_ID_MWSC = 234, - @AV_CODEC_ID_WCMV = 235, - @AV_CODEC_ID_RASC = 236, - @AV_CODEC_ID_HYMT = 237, - @AV_CODEC_ID_ARBC = 238, - @AV_CODEC_ID_AGM = 239, - @AV_CODEC_ID_LSCR = 240, - @AV_CODEC_ID_VP4 = 241, - @AV_CODEC_ID_IMM5 = 242, - @AV_CODEC_ID_MVDV = 243, - @AV_CODEC_ID_MVHA = 244, - @AV_CODEC_ID_CDTOONS = 245, - @AV_CODEC_ID_MV30 = 246, - @AV_CODEC_ID_NOTCHLC = 247, - @AV_CODEC_ID_PFM = 248, - @AV_CODEC_ID_MOBICLIP = 249, - @AV_CODEC_ID_PHOTOCD = 250, - @AV_CODEC_ID_IPU = 251, - @AV_CODEC_ID_ARGO = 252, - @AV_CODEC_ID_CRI = 253, - @AV_CODEC_ID_SIMBIOSIS_IMX = 254, - @AV_CODEC_ID_SGA_VIDEO = 255, - @AV_CODEC_ID_GEM = 256, - @AV_CODEC_ID_VBN = 257, - @AV_CODEC_ID_JPEGXL = 258, - @AV_CODEC_ID_QOI = 259, - @AV_CODEC_ID_PHM = 260, - @AV_CODEC_ID_RADIANCE_HDR = 261, - @AV_CODEC_ID_WBMP = 262, - @AV_CODEC_ID_MEDIA100 = 263, - @AV_CODEC_ID_VQC = 264, - @AV_CODEC_ID_PDV = 265, - @AV_CODEC_ID_EVC = 266, - @AV_CODEC_ID_RTV1 = 267, - @AV_CODEC_ID_VMIX = 268, - @AV_CODEC_ID_LEAD = 269, - @AV_CODEC_ID_DNXUC = 270, - @AV_CODEC_ID_RV60 = 271, - @AV_CODEC_ID_JPEGXL_ANIM = 272, - @AV_CODEC_ID_APV = 273, - @AV_CODEC_ID_PRORES_RAW = 274, - @AV_CODEC_ID_JPEGXS = 275, + @AV_CODEC_ID_XWD = 156, + @AV_CODEC_ID_CDXL = 157, + @AV_CODEC_ID_XBM = 158, + @AV_CODEC_ID_ZEROCODEC = 159, + @AV_CODEC_ID_MSS1 = 160, + @AV_CODEC_ID_MSA1 = 161, + @AV_CODEC_ID_TSCC2 = 162, + @AV_CODEC_ID_MTS2 = 163, + @AV_CODEC_ID_CLLC = 164, + @AV_CODEC_ID_MSS2 = 165, + @AV_CODEC_ID_VP9 = 166, + @AV_CODEC_ID_AIC = 167, + @AV_CODEC_ID_ESCAPE130 = 168, + @AV_CODEC_ID_G2M = 169, + @AV_CODEC_ID_WEBP = 170, + @AV_CODEC_ID_HNM4_VIDEO = 171, + @AV_CODEC_ID_HEVC = 172, + @AV_CODEC_ID_FIC = 173, + @AV_CODEC_ID_ALIAS_PIX = 174, + @AV_CODEC_ID_BRENDER_PIX = 175, + @AV_CODEC_ID_PAF_VIDEO = 176, + @AV_CODEC_ID_EXR = 177, + @AV_CODEC_ID_VP7 = 178, + @AV_CODEC_ID_SANM = 179, + @AV_CODEC_ID_SGIRLE = 180, + @AV_CODEC_ID_MVC1 = 181, + @AV_CODEC_ID_MVC2 = 182, + @AV_CODEC_ID_HQX = 183, + @AV_CODEC_ID_TDSC = 184, + @AV_CODEC_ID_HQ_HQA = 185, + @AV_CODEC_ID_HAP = 186, + @AV_CODEC_ID_DDS = 187, + @AV_CODEC_ID_DXV = 188, + @AV_CODEC_ID_SCREENPRESSO = 189, + @AV_CODEC_ID_RSCC = 190, + @AV_CODEC_ID_AVS2 = 191, + @AV_CODEC_ID_PGX = 192, + @AV_CODEC_ID_AVS3 = 193, + @AV_CODEC_ID_MSP2 = 194, + @AV_CODEC_ID_VVC = 195, + @AV_CODEC_ID_Y41P = 196, + @AV_CODEC_ID_AVRP = 197, + @AV_CODEC_ID_012V = 198, + @AV_CODEC_ID_AVUI = 199, + @AV_CODEC_ID_TARGA_Y216 = 200, + @AV_CODEC_ID_YUV4 = 201, + @AV_CODEC_ID_AVRN = 202, + @AV_CODEC_ID_CPIA = 203, + @AV_CODEC_ID_XFACE = 204, + @AV_CODEC_ID_SNOW = 205, + @AV_CODEC_ID_SMVJPEG = 206, + @AV_CODEC_ID_APNG = 207, + @AV_CODEC_ID_DAALA = 208, + @AV_CODEC_ID_CFHD = 209, + @AV_CODEC_ID_TRUEMOTION2RT = 210, + @AV_CODEC_ID_M101 = 211, + @AV_CODEC_ID_MAGICYUV = 212, + @AV_CODEC_ID_SHEERVIDEO = 213, + @AV_CODEC_ID_YLC = 214, + @AV_CODEC_ID_PSD = 215, + @AV_CODEC_ID_PIXLET = 216, + @AV_CODEC_ID_SPEEDHQ = 217, + @AV_CODEC_ID_FMVC = 218, + @AV_CODEC_ID_SCPR = 219, + @AV_CODEC_ID_CLEARVIDEO = 220, + @AV_CODEC_ID_XPM = 221, + @AV_CODEC_ID_AV1 = 222, + @AV_CODEC_ID_BITPACKED = 223, + @AV_CODEC_ID_MSCC = 224, + @AV_CODEC_ID_SRGC = 225, + @AV_CODEC_ID_SVG = 226, + @AV_CODEC_ID_GDV = 227, + @AV_CODEC_ID_FITS = 228, + @AV_CODEC_ID_IMM4 = 229, + @AV_CODEC_ID_PROSUMER = 230, + @AV_CODEC_ID_MWSC = 231, + @AV_CODEC_ID_WCMV = 232, + @AV_CODEC_ID_RASC = 233, + @AV_CODEC_ID_HYMT = 234, + @AV_CODEC_ID_ARBC = 235, + @AV_CODEC_ID_AGM = 236, + @AV_CODEC_ID_LSCR = 237, + @AV_CODEC_ID_VP4 = 238, + @AV_CODEC_ID_IMM5 = 239, + @AV_CODEC_ID_MVDV = 240, + @AV_CODEC_ID_MVHA = 241, + @AV_CODEC_ID_CDTOONS = 242, + @AV_CODEC_ID_MV30 = 243, + @AV_CODEC_ID_NOTCHLC = 244, + @AV_CODEC_ID_PFM = 245, + @AV_CODEC_ID_MOBICLIP = 246, + @AV_CODEC_ID_PHOTOCD = 247, + @AV_CODEC_ID_IPU = 248, + @AV_CODEC_ID_ARGO = 249, + @AV_CODEC_ID_CRI = 250, + @AV_CODEC_ID_SIMBIOSIS_IMX = 251, + @AV_CODEC_ID_SGA_VIDEO = 252, + @AV_CODEC_ID_GEM = 253, + @AV_CODEC_ID_VBN = 254, + @AV_CODEC_ID_JPEGXL = 255, + @AV_CODEC_ID_QOI = 256, + @AV_CODEC_ID_PHM = 257, + @AV_CODEC_ID_RADIANCE_HDR = 258, + @AV_CODEC_ID_WBMP = 259, + @AV_CODEC_ID_MEDIA100 = 260, + @AV_CODEC_ID_VQC = 261, + @AV_CODEC_ID_PDV = 262, + @AV_CODEC_ID_EVC = 263, + @AV_CODEC_ID_RTV1 = 264, + @AV_CODEC_ID_VMIX = 265, + @AV_CODEC_ID_LEAD = 266, + @AV_CODEC_ID_DNXUC = 267, + @AV_CODEC_ID_RV60 = 268, + @AV_CODEC_ID_JPEGXL_ANIM = 269, + @AV_CODEC_ID_APV = 270, + @AV_CODEC_ID_PRORES_RAW = 271, + @AV_CODEC_ID_JPEGXS = 272, + @AV_CODEC_ID_WEBP_ANIM = 273, /// A dummy id pointing at the start of audio codecs @AV_CODEC_ID_FIRST_AUDIO = 65536, @AV_CODEC_ID_PCM_S16LE = 65536, @@ -762,6 +760,7 @@ public enum AVCodecID : int @AV_CODEC_ID_LC3 = 86122, @AV_CODEC_ID_G728 = 86123, @AV_CODEC_ID_AHX = 86124, + @AV_CODEC_ID_APPLE_APAC = 86125, /// A dummy ID pointing at the start of subtitle codecs. @AV_CODEC_ID_FIRST_SUBTITLE = 94208, @AV_CODEC_ID_DVD_SUBTITLE = 94208, @@ -1122,8 +1121,18 @@ public enum AVFrameSideDataType : int @AV_FRAME_DATA_VIEW_ID = 29, /// This side data contains information about the reference display width(s) and reference viewing distance(s) as well as information about the corresponding reference stereo pair(s), i.e., the pair(s) of views to be displayed for the viewer's left and right eyes on the reference display at the reference viewing distance. The payload is the AV3DReferenceDisplaysInfo struct defined in libavutil/tdrdi.h. @AV_FRAME_DATA_3D_REFERENCE_DISPLAYS = 30, - /// Extensible image file format metadata. The payload is a buffer containing EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. + /// Exchangeable image file format metadata. The payload is a buffer containing EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. These four bytes signify the endianness, and occur as the first part of the TIFF header. @AV_FRAME_DATA_EXIF = 31, + /// HDR dynamic metadata associated with a video frame. The payload is an AVDynamicHDRSmpte2094App5 type and contains information for color volume transform as specified in the SMPTE 2094-50 standard. + @AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5 = 32, + /// IAMF Mix Gain Parameter Data associated with the audio frame. This metadata is in the form of the AVIAMFParamDefinition struct and contains information defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and Formats standard. + @AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM = 33, + /// IAMF Demixing Info Parameter Data associated with the audio frame. This metadata is in the form of the AVIAMFParamDefinition struct and contains information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model and Formats standard. + @AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM = 34, + /// IAMF Recon Gain Info Parameter Data associated with the audio frame. This metadata is in the form of the AVIAMFParamDefinition struct and contains information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model and Formats standard. + @AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM = 35, + /// Color information from a RAW camera codecs, needed to correctly process the video data. The payload is an AVRawColorParams struct defined in libavutil/raw_color_params.h. + @AV_FRAME_DATA_RAW_COLOR_PARAMS = 36, } /// Option for overlapping elliptical pixel selectors in an image. @@ -1371,8 +1380,12 @@ public enum AVPacketSideDataType : int @AV_PKT_DATA_RTCP_SR = 39, /// Extensible image file format metadata. The payload is a buffer containing EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. @AV_PKT_DATA_EXIF = 40, + /// HDR dynamic metadata associated with a video frame. The payload is an AVDynamicHDRSmpte2094App5 type and contains information for color volume transform as specified in the SMPTE 2094-50 standard. + @AV_PKT_DATA_DYNAMIC_HDR_SMPTE_2094_APP5 = 41, + /// Dolby Vision enhancement-layer HEVC decoder configuration. Parsed from the hvcE box in ISOM-based containers or the corresponding BlockAdditionMapping in Matroska. The data is a raw HEVCDecoderConfigurationRecord as defined in ISO 14496-15. + @AV_PKT_DATA_HEVC_CONF = 42, /// The number of side data types. This is not part of the public API/ABI in the sense that it may change when new side data types are added. This must stay the last enum value. 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 = 41, + @AV_PKT_DATA_NB = 43, } /// @{ @@ -2031,6 +2044,8 @@ public enum AVStreamGroupParamsType : int @AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION = 2, @AV_STREAM_GROUP_PARAMS_TILE_GRID = 3, @AV_STREAM_GROUP_PARAMS_LCEVC = 4, + @AV_STREAM_GROUP_PARAMS_TREF = 5, + @AV_STREAM_GROUP_PARAMS_DOLBY_VISION = 6, } /// @} @@ -2061,14 +2076,6 @@ public enum AVSubtitleType : int @SUBTITLE_ASS = 3, } -public enum AVTimebaseSource : int -{ - @AVFMT_TBCF_AUTO = -1, - @AVFMT_TBCF_DECODER = 0, - @AVFMT_TBCF_DEMUXER = 1, - @AVFMT_TBCF_R_FRAMERATE = 2, -} - public enum AVTimecodeFlag : int { /// timecode is drop frame @@ -2130,6 +2137,27 @@ public enum SwsAlphaBlend : int @SWS_ALPHA_BLEND_MAX_ENUM = 2147483647, } +public enum SwsBackend : int +{ + /// Legacy bespoke format-specific code + @SWS_BACKEND_LEGACY = 1, + @SWS_BACKEND_STABLE = 1, + /// Template-based C reference implementation + @SWS_BACKEND_C = 2, + /// Fast path using libc memcpy() / memset() + @SWS_BACKEND_MEMCPY = 4, + /// Chained x86 SIMD kernels + @SWS_BACKEND_X86 = 8, + /// Chained AArch64 NEON kernels + @SWS_BACKEND_AARCH64 = 16, + /// Vulkan SPIR-V backend + @SWS_BACKEND_SPIRV = 32, + @SWS_BACKEND_UNSTABLE = 62, + @SWS_BACKEND_ALL = 63, + /// force size to 32 bits, not a valid backend + @SWS_BACKEND_MAX_ENUM = 2147483647, +} + /// **************************** Flags and quality settings * **************************** public enum SwsDither : int { @@ -2145,6 +2173,24 @@ public enum SwsDither : int public enum SwsFlags : int { + /// Return an error on underspecified conversions. Without this flag, unspecified fields are defaulted to sensible values. + @SWS_STRICT = 2048, + /// Emit verbose log of scaling parameters. + @SWS_PRINT_INFO = 4096, + /// Perform full chroma upsampling when upscaling to RGB. + @SWS_FULL_CHR_H_INT = 8192, + /// Perform full chroma interpolation when downscaling RGB sources. + @SWS_FULL_CHR_H_INP = 16384, + /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. + @SWS_ACCURATE_RND = 262144, + /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. + @SWS_BITEXACT = 524288, + /// Allow/prefer using experimental new code paths. This may be faster, slower, or produce different output, with semantics subject to change at any point in time. For testing and debugging purposes only. + @SWS_UNSTABLE = 1048576, + /// This flag has no effect + @SWS_DIRECT_BGR = 32768, + /// Set `SwsContext.dither` instead + @SWS_ERROR_DIFFUSION = 8388608, /// fast bilinear filtering @SWS_FAST_BILINEAR = 1, /// bilinear filtering @@ -2165,26 +2211,8 @@ public enum SwsFlags : int @SWS_SINC = 256, /// 3-tap sinc/sinc @SWS_LANCZOS = 512, - /// cubic Keys spline + /// unwindowed natural cubic spline @SWS_SPLINE = 1024, - /// Return an error on underspecified conversions. Without this flag, unspecified fields are defaulted to sensible values. - @SWS_STRICT = 2048, - /// Emit verbose log of scaling parameters. - @SWS_PRINT_INFO = 4096, - /// Perform full chroma upsampling when upscaling to RGB. - @SWS_FULL_CHR_H_INT = 8192, - /// Perform full chroma interpolation when downscaling RGB sources. - @SWS_FULL_CHR_H_INP = 16384, - /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. - @SWS_ACCURATE_RND = 262144, - /// Force bit-exact output. This will prevent the use of platform-specific optimizations that may lead to slight difference in rounding, in favor of always maintaining exact bit output compatibility with the reference C code. - @SWS_BITEXACT = 524288, - /// Allow using experimental new code paths. This may be faster, slower, or produce different output, with semantics subject to change at any point in time. For testing and debugging purposes only. - @SWS_UNSTABLE = 1048576, - /// This flag has no effect - @SWS_DIRECT_BGR = 32768, - /// Set `SwsContext.dither` instead - @SWS_ERROR_DIFFUSION = 8388608, } public enum SwsIntent : int @@ -2201,3 +2229,28 @@ public enum SwsIntent : int @SWS_INTENT_NB = 4, } +public enum SwsScaler : int +{ + @SWS_SCALE_AUTO = 0, + /// bilinear filtering + @SWS_SCALE_BILINEAR = 1, + /// 2-tap cubic BC-spline + @SWS_SCALE_BICUBIC = 2, + /// nearest neighbor (point sampling) + @SWS_SCALE_POINT = 3, + /// area averaging + @SWS_SCALE_AREA = 4, + /// 2-tap gaussian approximation + @SWS_SCALE_GAUSSIAN = 5, + /// unwindowed sinc + @SWS_SCALE_SINC = 6, + /// 3-tap sinc/sinc + @SWS_SCALE_LANCZOS = 7, + /// unwindowned natural cubic spline + @SWS_SCALE_SPLINE = 8, + /// not part of the ABI + @SWS_SCALE_NB = 9, + /// force size to 32 bits, not a valid filter type + @SWS_SCALE_MAX_ENUM = 2147483647, +} + diff --git a/FFmpeg.AutoGen/generated/Structs.g.cs b/FFmpeg.AutoGen/generated/Structs.g.cs index 4f0ffb6a..e30079b4 100644 --- a/FFmpeg.AutoGen/generated/Structs.g.cs +++ b/FFmpeg.AutoGen/generated/Structs.g.cs @@ -171,23 +171,12 @@ public unsafe partial struct AVCodec public int @capabilities; /// maximum value for lowres supported by the decoder public byte @max_lowres; - [Obsolete("use avcodec_get_supported_config()")] - public AVRational* @supported_framerates; - [Obsolete("use avcodec_get_supported_config()")] - public AVPixelFormat* @pix_fmts; - [Obsolete("use avcodec_get_supported_config()")] - public int* @supported_samplerates; - [Obsolete("use avcodec_get_supported_config()")] - public AVSampleFormat* @sample_fmts; /// AVClass for the private context public AVClass* @priv_class; /// array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN} public AVProfile* @profiles; /// Group name of the codec implementation. This is a short symbolic name of the wrapper backing this codec. A wrapper uses some kind of external implementation for the codec, such as an external library, or a codec implementation provided by the OS or the hardware. If this field is NULL, this is a builtin, libavcodec native codec. If non-NULL, this will be the suffix in AVCodec.name in most cases (usually AVCodec.name will be of the form "<codec_name>_<wrapper_name>"). public byte* @wrapper_name; - /// Array of supported channel layouts, terminated with a zeroed layout. - [Obsolete("use avcodec_get_supported_config()")] - public AVChannelLayout* @ch_layouts; } /// main external API structure. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user applications. The name string for AVOptions options matches the associated command line parameter name and can be found in libavcodec/options_table.h The AVOption/command line parameter names differ in some cases from the C structure field names for historic reasons or brevity. sizeof(AVCodecContext) must not be used outside libav*. @@ -433,8 +422,6 @@ public unsafe partial struct AVCodecContext public int @profile; /// Encoding level descriptor. - encoding: Set by user, corresponds to a specific level defined by the codec, usually corresponding to the profile level, if not specified it is set to AV_LEVEL_UNKNOWN. - decoding: Set by libavcodec. See AV_LEVEL_* in defs.h. public int @level; - /// Properties of the stream that gets decoded - encoding: unused - decoding: set by libavcodec - public uint @properties; /// Skip loop filtering for selected frames. - encoding: unused - decoding: Set by user. public AVDiscard @skip_loop_filter; /// Skip IDCT/dequantization for selected frames. - encoding: unused - decoding: Set by user. @@ -532,49 +519,50 @@ public unsafe partial struct AVCodecParameters public int @extradata_size; /// Additional data associated with the entire stream. public AVPacketSideData* @coded_side_data; - /// Amount of entries in coded_side_data. + /// Amount of entries in #coded_side_data. public int @nb_coded_side_data; - /// - video: the pixel format, the value corresponds to enum AVPixelFormat. - audio: the sample format, the value corresponds to enum AVSampleFormat. + /// - Video: the pixel format, the value corresponds to enum ::AVPixelFormat. - Audio: the sample format, the value corresponds to enum ::AVSampleFormat. public int @format; /// The average bitrate of the encoded data (in bits per second). public long @bit_rate; /// The number of bits per sample in the codedwords. public int @bits_per_coded_sample; - /// This is the number of valid bits in each output sample. If the sample format has more bits, the least significant bits are additional padding bits, which are always 0. Use right shifts to reduce the sample to its actual size. For example, audio formats with 24 bit samples will have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32. To get the original sample use "(int32_t)sample >> 8"." + /// The number of valid bits in each output sample. public int @bits_per_raw_sample; /// Codec-specific bitstream restrictions that the stream conforms to. public int @profile; public int @level; - /// Video only. The dimensions of the video frame in pixels. + /// The width of the video frame in pixels. public int @width; + /// The height of the video frame in pixels. public int @height; - /// Video only. The aspect ratio (width / height) which a single pixel should have when displayed. + /// The aspect ratio (width/height) which a single pixel should have when displayed. public AVRational @sample_aspect_ratio; - /// Video only. Number of frames per second, for streams with constant frame durations. Should be set to { 0, 1 } when some frames have differing durations or if the value is not known. + /// Number of frames per second, for streams with constant frame durations. Should be set to `{ 0, 1 }` when some frames have differing durations or if the value is not known. public AVRational @framerate; - /// Video only. The order of the fields in interlaced video. + /// The order of the fields in interlaced video. public AVFieldOrder @field_order; - /// Video only. Additional colorspace characteristics. + /// Additional colorspace characteristics. public AVColorRange @color_range; public AVColorPrimaries @color_primaries; public AVColorTransferCharacteristic @color_trc; public AVColorSpace @color_space; public AVChromaLocation @chroma_location; - /// Video only. Number of delayed frames. + /// Number of delayed frames. public int @video_delay; - /// Audio only. The channel layout and number of channels. + /// The channel layout and number of channels. public AVChannelLayout @ch_layout; - /// Audio only. The number of audio samples per second. + /// The number of audio samples per second. public int @sample_rate; - /// Audio only. The number of bytes per coded audio frame, required by some formats. + /// The number of bytes per coded audio frame, required by some formats. public int @block_align; - /// Audio only. Audio frame size, if known. Required by some formats to be static. + /// Audio frame size, if known. Required by some formats to be static. public int @frame_size; - /// Audio only. The amount of padding (in samples) inserted by the encoder at the beginning of the audio. I.e. this number of leading decoded samples must be discarded by the caller to get the original audio without leading padding. + /// Number of padding audio samples at the start. public int @initial_padding; - /// Audio only. The amount of padding (in samples) appended by the encoder to the end of the audio. I.e. this number of decoded samples must be discarded by the caller from the end of the stream to get the original audio without any trailing padding. + /// Number of padding audio samples at the end. public int @trailing_padding; - /// Audio only. Number of samples to skip after a discontinuity. + /// Number of audio samples to skip after a discontinuity. public int @seek_preroll; /// Video with alpha channel only. Alpha channel handling public AVAlphaMode @alpha_mode; @@ -582,13 +570,7 @@ public unsafe partial struct AVCodecParameters public unsafe partial struct AVCodecParser { - public int_array7 @codec_ids; - /// *************************************************************** All fields below this line are not part of the public API. They may not be used outside of libavcodec and can be changed and removed at will. New public fields should be added right above. **************************************************************** - public int @priv_data_size; - public AVCodecParser_parser_init_func @parser_init; - public AVCodecParser_parser_parse_func @parser_parse; - public AVCodecParser_parser_close_func @parser_close; - public AVCodecParser_split_func @split; + public AVCodecID_array7 @codec_ids; } public unsafe partial struct AVCodecParserContext @@ -839,6 +821,37 @@ public unsafe partial struct AVDynamicHDRPlus public AVRational_array25x25 @mastering_display_actual_peak_luminance; } +/// This struct represents dynamic metadata for color volume transform as specified in the SMPTE 2094-50 standard. +public unsafe partial struct AVDynamicHDRSmpte2094App5 +{ + /// Section C.2.1. smpte_st_2094_50_application_info() + public byte @application_version; + public byte @minimum_application_version; + /// Section C.2.2 smpte_st_2094_50_color_volume_transform() + public byte @has_custom_hdr_reference_white_flag; + public byte @has_adaptive_tone_map_flag; + public ushort @hdr_reference_white; + /// Section C.2.3 smpte_st_2094_50_adaptive_tone_map() + public ushort @baseline_hdr_headroom; + public byte @use_reference_white_tone_mapping_flag; + public byte @num_alternate_images; + public byte @gain_application_space_chromaticities_flag; + public byte @has_common_component_mix_params_flag; + public byte @has_common_curve_params_flag; + public ushort_array8 @gain_application_space_chromaticities; + public ushort_array4 @alternate_hdr_headrooms; + /// Section C.2.4 smpte_st_2094_50_component_mixing() + public byte_array4 @component_mixing_type; + public byte_array4x6 @has_component_mixing_coefficient_flag; + public ushort_array4x6 @component_mixing_coefficient; + /// Section C.2.5 smpte_st_2094_50_gain_curve() + public byte_array4 @gain_curve_num_control_points_minus_1; + public byte_array4 @gain_curve_use_pchip_slope_flag; + public ushort_array4x32 @gain_curve_control_points_x; + public ushort_array4x32 @gain_curve_control_points_y; + public ushort_array4x32 @gain_curve_control_points_theta; +} + /// Filter definition. This defines the pads a filter contains, and all the callback functions used to interact with the filter. public unsafe partial struct AVFilter { @@ -892,20 +905,12 @@ public unsafe partial struct AVFilterContext public int @thread_type; /// Max number of threads allowed in this filter instance. If <= 0, its value is ignored. Overrides global number of threads set per filter graph. public int @nb_threads; - [Obsolete("unused")] - public AVFilterCommand* @command_queue; /// enable expression string public byte* @enable_str; - [Obsolete("unused")] - public void* @enable; - [Obsolete("unused")] - public double* @var_values; /// MUST NOT be accessed from outside avfilter. public int @is_disabled; /// For filters which will create hardware frames, sets the device the filter should create them in. All other filters will ignore this field: in particular, a filter which consumes or processes hardware frames will instead use the hw_frames_ctx field in AVFilterLink to carry the hardware context information. public AVBufferRef* @hw_device_ctx; - [Obsolete("this field should never have been accessed by callers")] - public uint @ready; /// Sets the number of extra hardware frames which the filter will allocate on its output links for use in following filters or by the caller. public int @extra_hw_frames; } @@ -1424,7 +1429,7 @@ public unsafe partial struct AVInputFormat public byte* @name; /// Descriptive name for the format, meant to be more human-readable than name. You should use the NULL_IF_CONFIG_SMALL() macro to define it. public byte* @long_name; - /// Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. + /// Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. public int @flags; /// If extensions are defined, then no probe is done. You should usually not use extension format guessing because it is not reliable enough public byte* @extensions; @@ -1632,7 +1637,7 @@ public unsafe partial struct AVOutputFormat public AVCodecID @video_codec; /// default subtitle codec public AVCodecID @subtitle_codec; - /// can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE + /// can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE, AVFMT_FIXED_FRAMESIZE public int @flags; /// List of supported codec_id-codec_tag pairs, ordered by "better choice first". The arrays are all terminated by AV_CODEC_ID_NONE. public AVCodecTag** @codec_tag; @@ -1669,12 +1674,6 @@ public unsafe partial struct AVPacket public AVRational @time_base; } -public unsafe partial struct AVPacketList -{ - public AVPacket @pkt; - public AVPacketList* @next; -} - /// This structure stores auxiliary information for decoding, presenting, or otherwise processing the coded stream. It is typically exported by demuxers and encoders and can be fed to decoders and muxers either in a per packet basis, or as global side data (applying to the entire coded stream). public unsafe partial struct AVPacketSideData { @@ -1905,21 +1904,35 @@ public unsafe partial struct AVStreamGroup_params [FieldOffset(0)] public AVStreamGroupTileGrid* @tile_grid; [FieldOffset(0)] - public AVStreamGroupLCEVC* @lcevc; + public AVStreamGroupLayeredVideo* @layered_video; + /// deprecated, use layered_video. + [FieldOffset(0)] + public AVStreamGroupLayeredVideo* @lcevc; + [FieldOffset(0)] + public AVStreamGroupTREF* @tref; } -/// AVStreamGroupLCEVC is meant to define the relation between video streams and a data stream containing LCEVC enhancement layer NALUs. -public unsafe partial struct AVStreamGroupLCEVC +/// AVStreamGroupLayeredVideo is meant to define the relation between a base layer video stream and a separate enhancement layer stream that together form a single layered video presentation (for example a video stream and a data stream containing LCEVC enhancement layer NALUs, or Dolby Vision Profile 7 dual-layer encoding). +public unsafe partial struct AVStreamGroupLayeredVideo { public AVClass* @av_class; - /// Index of the LCEVC data stream in AVStreamGroup. - public uint @lcevc_index; + public AVStreamGroupLayeredVideo_union0 @union0; /// Width of the final stream for presentation. public int @width; /// Height of the final image for presentation. public int @height; } +[StructLayout(LayoutKind.Explicit)] +public unsafe partial struct AVStreamGroupLayeredVideo_union0 +{ + [FieldOffset(0)] + public uint @el_index; + /// Alias for el_index, kept for backward compatibility. + [FieldOffset(0)] + public uint @lcevc_index; +} + /// AVStreamGroupTileGrid holds information on how to combine several independent images on a single canvas for presentation. public unsafe partial struct AVStreamGroupTileGrid { @@ -1958,6 +1971,14 @@ public unsafe partial struct AVStreamGroupTileGrid_offsets public int @vertical; } +/// AVStreamGroupTREF is meant to define the relation between video, audio, or subtitle streams, and a data stream containing metadata. +public unsafe partial struct AVStreamGroupTREF +{ + public AVClass* @av_class; + /// Index of the metadata stream in the AVStreamGroup. + public uint @metadata_index; +} + public unsafe partial struct AVSubtitle { public ushort @format; @@ -2440,7 +2461,6 @@ public unsafe partial struct SwsContext public void* @opaque; /// Bitmask of SWS_*. See `SwsFlags` for details. public uint @flags; - /// Extra parameters for fine-tuning certain scalers. public double_array2 @scaler_params; /// How many threads to use for processing, or 0 for automatic selection. public int @threads; @@ -2476,6 +2496,12 @@ public unsafe partial struct SwsContext public int @dst_h_chr_pos; /// Desired ICC intent for color space conversions. public int @intent; + /// Scaling filter. If set to something other than SWS_SCALE_AUTO, this will override the filter implied by `SwsContext.flags`. + public SwsScaler @scaler; + /// Scaler used specifically for up/downsampling subsampled (chroma) planes. If set to something other than SWS_SCALE_AUTO, this will override the filter implied by `SwsContext.scaler`. Otherwise, the same filter will be used for both main scaling and chroma subsampling. + public SwsScaler @scaler_sub; + /// Bitmask of SWS_BACKEND_*. If non-zero, this will restrict the available backends to the specified set. If left as zero, a default set of backends will be selected automatically (based on SWS_UNSTABLE). + public SwsBackend @backends; } public unsafe partial struct SwsFilter @@ -2550,11 +2576,6 @@ public unsafe partial struct AVFilterChannelLayouts { } -/// This struct is incomplete. -public unsafe partial struct AVFilterCommand -{ -} - /// This struct is incomplete. public unsafe partial struct AVFilterFormats { diff --git a/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs index dae7475b..b3ed8e2f 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs @@ -740,6 +740,29 @@ public static unsafe partial class ffmpeg /// >= 0 on success. Otherwise, returns the appropriate AVERROR. public static int av_dynamic_hdr_plus_to_t35(AVDynamicHDRPlus* @s, byte** @data, ulong* @size) => vectors.av_dynamic_hdr_plus_to_t35(@s, @data, @size); + /// Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to default values. The resulting struct can be freed using av_freep(). + /// An AVDynamicHDRSmpte2094App5 filled with default values or NULL on failure. + public static AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc(ulong* @size) => vectors.av_dynamic_hdr_smpte2094_app5_alloc(@size); + + /// Allocate a complete AVDynamicHDRSmpte2094App5 and add it to the frame. + /// The frame which side data is added to. + /// The AVDynamicHDRSmpte2094App5 structure to be filled by caller or NULL on failure. + public static AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data(AVFrame* @frame) => vectors.av_dynamic_hdr_smpte2094_app5_create_side_data(@frame); + + /// Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5. + /// A pointer containing the decoded AVDynamicHDRSmpte2094App5 structure. + /// The byte array containing the raw ITU-T T.35 data. + /// Size of the data array in bytes. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + public static int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size) => vectors.av_dynamic_hdr_smpte2094_app5_from_t35(@s, @data, @size); + + /// Serialize dynamic SMPTE-2094-50 metadata to a ITU-T T.35 message. Excluding the country_code, provider_code and provider_oriented_code. + /// A pointer containing the AVDynamicHDRSmpte2094App5 data. + /// A pointer to pointer to a byte buffer to be filled with the serialized metadata. If *data is NULL, a buffer be will be allocated and a pointer to it stored in its place. The caller assumes ownership of the buffer. May be NULL, in which case the function will only store the required buffer size in *size. + /// A pointer to a size to be set to the returned buffer's size. If *data is not NULL, *size must contain the size of the input buffer. May be NULL only if *data is NULL. + /// >= 0 on success. Otherwise, returns the appropriate AVERROR. + public static int av_dynamic_hdr_smpte2094_app5_to_t35(AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size) => vectors.av_dynamic_hdr_smpte2094_app5_to_t35(@s, @data, @size); + /// Add the pointer to an element to a dynamic array. /// Pointer to the array to grow /// Pointer to the number of elements in the array @@ -1008,7 +1031,7 @@ public static unsafe partial class ffmpeg /// frame duration, in samples, if known. 0 if not able to determine. public static int av_get_audio_frame_duration(AVCodecContext* @avctx, int @frame_bytes) => vectors.av_get_audio_frame_duration(@avctx, @frame_bytes); - /// This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters instead of an AVCodecContext. + /// This function is the same as ::av_get_audio_frame_duration(), except it works with ::AVCodecParameters instead of an ::AVCodecContext. public static int av_get_audio_frame_duration2(AVCodecParameters* @par, int @frame_bytes) => vectors.av_get_audio_frame_duration2(@par, @frame_bytes); /// Return the number of bits per pixel used by the pixel format described by pixdesc. Note that this is not the same as the number of bits per sample. @@ -1116,7 +1139,7 @@ public static unsafe partial class ffmpeg /// the buffer where to write the string /// the size of buf /// the number of the sample format to print the corresponding info string, or a negative value to print the corresponding header. - /// the pointer to the filled buffer or NULL if sample_fmt is unknown or in case of other errors + /// the pointer to the filled buffer or NULL in case of other errors public static byte* av_get_sample_fmt_string(byte* @buf, int @buf_size, AVSampleFormat @sample_fmt) => vectors.av_get_sample_fmt_string(@buf, @buf_size, @sample_fmt); /// Return the fractional representation of the internal time base. @@ -1449,14 +1472,6 @@ public static unsafe partial class ffmpeg /// Video input devices iterator. public static AVInputFormat* av_input_video_device_next(AVInputFormat* @d) => vectors.av_input_video_device_next(@d); - /// Compute the length of an integer list. - /// size in bytes of each list element (only 1, 2, 4 or 8) - /// pointer to the list - /// list terminator (usually 0 or -1) - /// length of the list, in elements, not counting the terminator - [Obsolete()] - public static uint av_int_list_length_for_size(uint @elsize, void* @list, ulong @term) => vectors.av_int_list_length_for_size(@elsize, @list, @term); - /// Write a packet to an output media file ensuring correct interleaving. /// media file handle /// The packet containing the data to be written. If the packet is reference-counted, this function will take ownership of this reference and unreference it later when it sees 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. Packet's "stream_index" field must be set to the index of the corresponding stream in "s->streams". The timestamps ( "pts", "dts") must be set to correct values in the stream's timebase (unless the output format is flagged with the AVFMT_NOTIMESTAMPS flag, then they can be set to AV_NOPTS_VALUE). 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). "duration" should also be set if known. @@ -1737,10 +1752,6 @@ public static unsafe partial class ffmpeg /// next AVOption or NULL public static AVOption* av_opt_next(void* @obj, AVOption* @prev) => vectors.av_opt_next(@obj, @prev); - /// Gets a pointer to the requested field in a struct. This function allows accessing a struct even when its fields are moved or renamed since the application making the access has been compiled, - [Obsolete("direct access to AVOption-exported fields is not supported")] - public static void* av_opt_ptr(AVClass* @avclass, void* @obj, string @name) => vectors.av_opt_ptr(@avclass, @obj, @name); - /// Get a list of allowed ranges for the given option. /// is a bitmask of flags, undefined flags should not be set and should be ignored AV_OPT_SEARCH_FAKE_OBJ indicates that the obj is a double pointer to a AVClass instead of a full instance AV_OPT_MULTI_COMPONENT_RANGE indicates that function may return more than one component, /// number of components returned on success, a negative error code otherwise @@ -1993,7 +2004,7 @@ public static unsafe partial class ffmpeg public static void av_parser_close(AVCodecParserContext* @s) => vectors.av_parser_close(@s); - public static AVCodecParserContext* av_parser_init(int @codec_id) => vectors.av_parser_init(@codec_id); + public static AVCodecParserContext* av_parser_init(AVCodecID @codec_id) => vectors.av_parser_init(@codec_id); /// Iterate over all registered codec parsers. /// a pointer where libavcodec will store the iteration state. Must point to NULL to start the iteration. @@ -2088,6 +2099,21 @@ public static unsafe partial class ffmpeg public static void av_program_add_stream_index(AVFormatContext* @ac, int @progid, uint @idx) => vectors.av_program_add_stream_index(@ac, @progid, @idx); + /// Add the supplied index of a stream to the AVProgram with matching id. + /// the format context which contains the target AVProgram + /// the ID of the AVProgram whose stream index is to be updated + /// the index of the stream to be added + /// >=0 upon successful addition or if index was already present, AVERROR if no matching program is found or stream index is invalid or the stream index array reallocation failed. + public static int av_program_add_stream_index2(AVFormatContext* @ac, int @progid, uint @idx) => vectors.av_program_add_stream_index2(@ac, @progid, @idx); + + /// Copy an AVProgram from one AVFormatContext to another. + /// pointer to the target muxer context + /// pointer to the source muxer context + /// ID of the program to be copied + /// combination of flags which determine how streams are matched and whether pre-existing AVProgram in target is overwritten. If no match condition is set, streams will be matched by ids if all source stream ids are non-zero and unique, else by index. + /// >= 0 in case of success, Error EEXIST if target already has program with same ID and overwrite flag isn't set, else a negative AVERROR code in case of other failures. + public static int av_program_copy(AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags) => vectors.av_program_copy(@dst, @src, @progid, @flags); + /// Convert an AVRational to a IEEE 32-bit `float` expressed in fixed-point format. /// Rational to be converted /// Equivalent floating-point value, expressed as an unsigned 32-bit integer. @@ -2275,9 +2301,6 @@ public static unsafe partial class ffmpeg /// Get the AVClass for AVStream. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. public static AVClass* av_stream_get_class() => vectors.av_stream_get_class(); - [Obsolete("do not call this function")] - public static AVRational av_stream_get_codec_timebase(AVStream* @st) => vectors.av_stream_get_codec_timebase(@st); - public static AVCodecParserContext* av_stream_get_parser(AVStream* @s) => vectors.av_stream_get_parser(@s); /// Get the AVClass for AVStreamGroup. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. @@ -2615,14 +2638,14 @@ public static unsafe partial class ffmpeg /// zero on success, a negative value on error public static int avcodec_open2(AVCodecContext* @avctx, AVCodec* @codec, AVDictionary** @options) => vectors.avcodec_open2(@avctx, @codec, @options); - /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with avcodec_parameters_free(). + /// Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0). The returned struct must be freed with ::avcodec_parameters_free(). public static AVCodecParameters* avcodec_parameters_alloc() => vectors.avcodec_parameters_alloc(); /// Copy the contents of src to dst. Any allocated fields in dst are freed and replaced with newly allocated duplicates of the corresponding fields in src. /// >= 0 on success, a negative AVERROR code on failure. public static int avcodec_parameters_copy(AVCodecParameters* @dst, AVCodecParameters* @src) => vectors.avcodec_parameters_copy(@dst, @src); - /// Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied pointer. + /// Free an AVCodecParameters instance and everything associated with it and write `NULL` to the supplied pointer. public static void avcodec_parameters_free(AVCodecParameters** @par) => vectors.avcodec_parameters_free(@par); /// Fill the parameters struct based on the values from the supplied codec context. Any allocated fields in par are freed and replaced with duplicates of the corresponding fields in codec. @@ -3072,9 +3095,6 @@ public static unsafe partial class ffmpeg /// a string identifying the stream group type, or NULL if unknown public static string avformat_stream_group_name(AVStreamGroupParamsType @type) => vectors.avformat_stream_group_name(@type); - [Obsolete("do not call this function")] - public static int avformat_transfer_internal_stream_timing_info(AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb) => vectors.avformat_transfer_internal_stream_timing_info(@ofmt, @ost, @ist, @copy_tb); - /// Return the LIBAVFORMAT_VERSION_INT constant. public static uint avformat_version() => vectors.avformat_version(); @@ -3615,7 +3635,7 @@ public static unsafe partial class ffmpeg /// A positive integer if supported, 0 otherwise. public static int sws_test_colorspace(AVColorSpace @colorspace, int @output) => vectors.sws_test_colorspace(@colorspace, @output); - /// Test if a given (software) pixel format is supported. + /// Test if a given (software) pixel format is supported by any backend, excluding unstable backends. /// The format to check. /// If 0, test if compatible with the source/input frame; otherwise, with the destination/output frame. /// A positive integer if supported, 0 otherwise. @@ -3624,7 +3644,7 @@ public static unsafe partial class ffmpeg /// Helper function to run all sws_test_* against a frame, as well as testing the basic frame properties for sanity. Ignores irrelevant properties - for example, AVColorSpace is not checked for RGB frames. public static int sws_test_frame(AVFrame* @frame, int @output) => vectors.sws_test_frame(@frame, @output); - /// Test if a given hardware pixel format is supported. + /// Test if a given hardware pixel format is supported by any backend, excluding unstable backends. /// The hardware format to check, or AV_PIX_FMT_NONE. /// A positive integer if supported or AV_PIX_FMT_NONE, 0 otherwise. public static int sws_test_hw_format(AVPixelFormat @format) => vectors.sws_test_hw_format(@format); diff --git a/FFmpeg.AutoGen/generated/ffmpeg.functions.inline.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.functions.inline.g.cs index 8554f5fd..efa7fde4 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.functions.inline.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.functions.inline.g.cs @@ -243,13 +243,6 @@ public static AVRational av_make_q(int @num, int @den) } // original body hash: IAPYNNcg3GX0PGxINeLQhb41dH921lPVKcnqxCk7ERA= - [Obsolete()] - public static uint av_mod_uintp2_c(uint @a, uint @p) -{ - return av_zero_extend_c(a, p); -} - // original body hash: MfDd5KRKGNiwvccdrrbME05wNKCRzGTF1T24OggAyp0= - public static int av_parity_c(uint @v) { return av_popcount_c(v) & 1; diff --git a/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs index 1cc13b04..c0453d09 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs @@ -6,12 +6,12 @@ public static unsafe partial class ffmpeg { public static Dictionary LibraryVersionMap = new Dictionary { - {"avcodec", 62}, - {"avdevice", 62}, - {"avfilter", 11}, - {"avformat", 62}, - {"avutil", 60}, - {"swresample", 6}, - {"swscale", 9}, + {"avcodec", 63}, + {"avdevice", 63}, + {"avfilter", 12}, + {"avformat", 63}, + {"avutil", 61}, + {"swresample", 7}, + {"swscale", 10}, }; } diff --git a/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs index d1cfcbe4..20276826 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs @@ -319,6 +319,8 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_FLAG2_EXPORT_MVS = 0x1 << 0x1c; /// AV_CODEC_FLAG2_FAST = 0x1 << 0x0 public const int AV_CODEC_FLAG2_FAST = 0x1 << 0x0; + /// AV_CODEC_FLAG2_FIXED_FRAME_SIZE = 0x1 << 0x11 + public const int AV_CODEC_FLAG2_FIXED_FRAME_SIZE = 0x1 << 0x11; /// AV_CODEC_FLAG2_ICC_PROFILES = 0x1U << 0x1f public const uint AV_CODEC_FLAG2_ICC_PROFILES = 0x1U << 0x1f; /// AV_CODEC_FLAG2_IGNORE_CROP = 0x1 << 0x10 @@ -334,9 +336,9 @@ public static unsafe partial class ffmpeg /// AV_CODEC_FLAG2_SKIP_MANUAL = 0x1 << 0x1d public const int AV_CODEC_FLAG2_SKIP_MANUAL = 0x1 << 0x1d; /// AV_CODEC_ID_H265 = AV_CODEC_ID_HEVC - public static readonly int AV_CODEC_ID_H265 = 173; + public static readonly int AV_CODEC_ID_H265 = 172; /// AV_CODEC_ID_H266 = AV_CODEC_ID_VVC - public static readonly int AV_CODEC_ID_H266 = 196; + public static readonly int AV_CODEC_ID_H266 = 195; /// AV_CODEC_ID_IFF_BYTERUN1 = AV_CODEC_ID_IFF_ILBM public static readonly int AV_CODEC_ID_IFF_BYTERUN1 = 136; /// AV_CODEC_PROP_BITMAP_SUB = 0x1 << 0x10 @@ -399,6 +401,8 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_CMOV = 0x1000; /// AV_CPU_FLAG_DOTPROD = 0x1 << 0x8 public const int AV_CPU_FLAG_DOTPROD = 0x1 << 0x8; + /// AV_CPU_FLAG_EOR3 = 0x1 << 0x12 + public const int AV_CPU_FLAG_EOR3 = 0x1 << 0x12; /// AV_CPU_FLAG_FMA3 = 0x10000 public const int AV_CPU_FLAG_FMA3 = 0x10000; /// AV_CPU_FLAG_FMA4 = 0x800 @@ -423,6 +427,8 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_MSA = 0x1 << 0x1; /// AV_CPU_FLAG_NEON = 0x1 << 0x5 public const int AV_CPU_FLAG_NEON = 0x1 << 0x5; + /// AV_CPU_FLAG_PMULL = 0x1 << 0x11 + public const int AV_CPU_FLAG_PMULL = 0x1 << 0x11; /// AV_CPU_FLAG_POWER8 = 0x4 public const int AV_CPU_FLAG_POWER8 = 0x4; /// AV_CPU_FLAG_RV_MISALIGNED = 0x1 << 0xa @@ -431,14 +437,8 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_RV_ZVBB = 0x1 << 0x9; /// AV_CPU_FLAG_RVB = 0x1 << 0xb public const int AV_CPU_FLAG_RVB = 0x1 << 0xb; - /// AV_CPU_FLAG_RVB_ADDR = 0x1 << 0x8 - public const int AV_CPU_FLAG_RVB_ADDR = 0x1 << 0x8; /// AV_CPU_FLAG_RVB_BASIC = 0x1 << 0x7 public const int AV_CPU_FLAG_RVB_BASIC = 0x1 << 0x7; - /// AV_CPU_FLAG_RVD = 0x1 << 0x2 - public const int AV_CPU_FLAG_RVD = 0x1 << 0x2; - /// AV_CPU_FLAG_RVF = 0x1 << 0x1 - public const int AV_CPU_FLAG_RVF = 0x1 << 0x1; /// AV_CPU_FLAG_RVI = 0x1 << 0x0 public const int AV_CPU_FLAG_RVI = 0x1 << 0x0; /// AV_CPU_FLAG_RVV_F32 = 0x1 << 0x4 @@ -567,6 +567,12 @@ public static unsafe partial class ffmpeg /// AV_ERROR_MAX_STRING_SIZE = 64 public const int AV_ERROR_MAX_STRING_SIZE = 0x40; // public static av_extern_inline = inline; + // public static av_fallthrough = __attribute__((fallthrough)); + /// AV_FDEBUG_ID3V2 = 0x0002 + public const int AV_FDEBUG_ID3V2 = 0x2; + /// AV_FDEBUG_TS = 0x0001 + public const int AV_FDEBUG_TS = 0x1; + // public static av_flatten = __attribute__((flatten)); /// AV_FOURCC_MAX_STRING_SIZE = 32 public const int AV_FOURCC_MAX_STRING_SIZE = 0x20; // public static av_fourcc2str = (fourcc) av_fourcc_make_string((char[AV_FOURCC_MAX_STRING_SIZE]){0}, fourcc); @@ -620,7 +626,6 @@ public static unsafe partial class ffmpeg public const int AV_HWACCEL_FLAG_UNSAFE_OUTPUT = 0x1 << 0x3; /// AV_INPUT_BUFFER_PADDING_SIZE = 64 public const int AV_INPUT_BUFFER_PADDING_SIZE = 0x40; - // public static av_int_list_length = list; // public static AV_IS_INPUT_DEVICE = (category)((category)(==41) || (category)(==43) || (category)(==45)); // public static AV_IS_OUTPUT_DEVICE = (category)((category)(==40) || (category)(==42) || (category)(==44)); // public static AV_JOIN = a; @@ -655,7 +660,6 @@ public static unsafe partial class ffmpeg public const int AV_LOG_VERBOSE = 0x28; /// AV_LOG_WARNING = 24 public const int AV_LOG_WARNING = 0x18; - // public static av_mod_uintp2 = av_mod_uintp2_c; // public static AV_NE = be; // public static av_noinline = __attribute__((noinline)); /// AV_NOPTS_VALUE = ((int64_t)UINT64_C(0x8000000000000000)) @@ -704,7 +708,6 @@ public static unsafe partial class ffmpeg public const int AV_OPT_SERIALIZE_SEARCH_CHILDREN = 0x4; /// AV_OPT_SERIALIZE_SKIP_DEFAULTS = 0x00000001 public const int AV_OPT_SERIALIZE_SKIP_DEFAULTS = 0x1; - // public static av_opt_set_int_list = (obj, name, val, term, flags) (av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? AVERROR(EINVAL) : av_opt_set_bin(obj, name, (const uint8_t *)(val), av_int_list_length(val, term) * sizeof(*(val)), flags)); // public static av_parity = av_parity_c; /// AV_PARSER_PTS_NB = 0x4 public const int AV_PARSER_PTS_NB = 0x4; @@ -1320,6 +1323,8 @@ public static unsafe partial class ffmpeg public const int AVFMT_EVENT_FLAG_METADATA_UPDATED = 0x1; /// AVFMT_EXPERIMENTAL = 0x0004 public const int AVFMT_EXPERIMENTAL = 0x4; + /// AVFMT_FIXED_FRAMESIZE = 0x80000 + public const int AVFMT_FIXED_FRAMESIZE = 0x80000; /// AVFMT_FLAG_AUTO_BSF = 0x200000 public const int AVFMT_FLAG_AUTO_BSF = 0x200000; /// AVFMT_FLAG_BITEXACT = 0x0400 @@ -1368,6 +1373,12 @@ public static unsafe partial class ffmpeg public const int AVFMT_NOSTREAMS = 0x1000; /// AVFMT_NOTIMESTAMPS = 0x0080 public const int AVFMT_NOTIMESTAMPS = 0x80; + /// AVFMT_PROGCOPY_MATCH_BY_ID = (1 << 0) + public const int AVFMT_PROGCOPY_MATCH_BY_ID = 0x1 << 0x0; + /// AVFMT_PROGCOPY_MATCH_BY_INDEX = (1 << 1) + public const int AVFMT_PROGCOPY_MATCH_BY_INDEX = 0x1 << 0x1; + /// AVFMT_PROGCOPY_OVERWRITE = (1 << 8) + public const int AVFMT_PROGCOPY_OVERWRITE = 0x1 << 0x8; /// AVFMT_SEEK_TO_PTS = 0x4000000 public const int AVFMT_SEEK_TO_PTS = 0x4000000; /// AVFMT_SHOW_IDS = 0x0008 @@ -1439,55 +1450,28 @@ public static unsafe partial class ffmpeg public const int AVSTREAM_INIT_IN_INIT_OUTPUT = 0x1; /// AVSTREAM_INIT_IN_WRITE_HEADER = 0 public const int AVSTREAM_INIT_IN_WRITE_HEADER = 0x0; + // public static AVStreamGroupLCEVC = AVStreamGroupLayeredVideo; // public static AVUNERROR = (e) (-(e)); - /// FF_API_ALSA_CHANNELS = (LIBAVDEVICE_VERSION_MAJOR < 63) - public const bool FF_API_ALSA_CHANNELS = LIBAVDEVICE_VERSION_MAJOR < 0x3f; - /// FF_API_ASSERT_FPU = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_ASSERT_FPU = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_BUFFERSINK_OPTS = LIBAVFILTER_VERSION_MAJOR < 0xc - public const bool FF_API_BUFFERSINK_OPTS = LIBAVFILTER_VERSION_MAJOR < 0xc; - /// FF_API_CODEC_PROPS = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_CODEC_PROPS = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 63) - public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x3f; - /// FF_API_CONTEXT_PUBLIC = LIBAVFILTER_VERSION_MAJOR < 0xc - public const bool FF_API_CONTEXT_PUBLIC = LIBAVFILTER_VERSION_MAJOR < 0xc; - /// FF_API_CPU_FLAG_FORCE = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_CPU_FLAG_FORCE = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_DOVI_L11_INVALID_PROPS = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_DOVI_L11_INVALID_PROPS = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_EXR_GAMMA = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_EXR_GAMMA = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_INTERNAL_TIMING = (LIBAVFORMAT_VERSION_MAJOR < 63) - public const bool FF_API_INTERNAL_TIMING = LIBAVFORMAT_VERSION_MAJOR < 0x3f; - /// FF_API_INTRA_DC_PRECISION = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_INTRA_DC_PRECISION = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_LIBNPP_SUPPORT = LIBAVFILTER_VERSION_MAJOR < 0xc - public const bool FF_API_LIBNPP_SUPPORT = LIBAVFILTER_VERSION_MAJOR < 0xc; - /// FF_API_MOD_UINTP2 = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_MOD_UINTP2 = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_NO_DEFAULT_TLS_VERIFY = (LIBAVFORMAT_VERSION_MAJOR < 63) - public const bool FF_API_NO_DEFAULT_TLS_VERIFY = LIBAVFORMAT_VERSION_MAJOR < 0x3f; - /// FF_API_NVDEC_OLD_PIX_FMTS = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_NVDEC_OLD_PIX_FMTS = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_OPT_INT_LIST = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_OPT_INT_LIST = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_OPT_PTR = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_OPT_PTR = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_PARSER_CODECID = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_PARSER_CODECID = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_PARSER_PRIVATE = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_PARSER_PRIVATE = LIBAVCODEC_VERSION_MAJOR < 0x3f; + /// FF_API_ASSERT_FPU = (LIBAVUTIL_VERSION_MAJOR < 62) + public const bool FF_API_ASSERT_FPU = LIBAVUTIL_VERSION_MAJOR < 0x3e; + /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 64) + public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x40; + /// FF_API_CPU_FLAG_FORCE = (LIBAVUTIL_VERSION_MAJOR < 62) + public const bool FF_API_CPU_FLAG_FORCE = LIBAVUTIL_VERSION_MAJOR < 0x3e; + /// FF_API_DOVI_L11_INVALID_PROPS = (LIBAVUTIL_VERSION_MAJOR < 62) + public const bool FF_API_DOVI_L11_INVALID_PROPS = LIBAVUTIL_VERSION_MAJOR < 0x3e; + /// FF_API_FDEBUG_TS = (LIBAVFORMAT_VERSION_MAJOR < 64) + public const bool FF_API_FDEBUG_TS = LIBAVFORMAT_VERSION_MAJOR < 0x40; + /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 64) + public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x40; + /// FF_API_INTRA_DC_PRECISION = (LIBAVCODEC_VERSION_MAJOR < 64) + public const bool FF_API_INTRA_DC_PRECISION = LIBAVCODEC_VERSION_MAJOR < 0x40; + /// FF_API_LCEVC_STRUCT = (LIBAVFORMAT_VERSION_MAJOR < 64) + public const bool FF_API_LCEVC_STRUCT = LIBAVFORMAT_VERSION_MAJOR < 0x40; + /// FF_API_MJPEG_EXTERN_HUFF = (LIBAVCODEC_VERSION_MAJOR < 64) + public const bool FF_API_MJPEG_EXTERN_HUFF = LIBAVCODEC_VERSION_MAJOR < 0x40; /// FF_API_R_FRAME_RATE = 1 public const int FF_API_R_FRAME_RATE = 0x1; - /// FF_API_RISCV_FD_ZBA = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_RISCV_FD_ZBA = LIBAVUTIL_VERSION_MAJOR < 0x3d; - /// FF_API_V408_CODECID = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_API_V408_CODECID = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_API_VULKAN_FIXED_QUEUES = (LIBAVUTIL_VERSION_MAJOR < 61) - public const bool FF_API_VULKAN_FIXED_QUEUES = LIBAVUTIL_VERSION_MAJOR < 0x3d; /// FF_API_VULKAN_SYNC_QUEUES = (LIBAVUTIL_VERSION_MAJOR < 62) public const bool FF_API_VULKAN_SYNC_QUEUES = LIBAVUTIL_VERSION_MAJOR < 0x3e; // public static FF_ARRAY_ELEMS = (a) (sizeof(a) / sizeof((a)[0])); @@ -1556,18 +1540,6 @@ public static unsafe partial class ffmpeg public const int FF_CMP_W97 = 0xc; /// FF_CMP_ZERO = 0x7 public const int FF_CMP_ZERO = 0x7; - /// FF_CODEC_OMX = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_CODEC_OMX = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_CODEC_PROPERTY_CLOSED_CAPTIONS = 0x2 - public const int FF_CODEC_PROPERTY_CLOSED_CAPTIONS = 0x2; - /// FF_CODEC_PROPERTY_FILM_GRAIN = 0x4 - public const int FF_CODEC_PROPERTY_FILM_GRAIN = 0x4; - /// FF_CODEC_PROPERTY_LOSSLESS = 0x1 - public const int FF_CODEC_PROPERTY_LOSSLESS = 0x1; - /// FF_CODEC_SONIC_DEC = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_CODEC_SONIC_DEC = LIBAVCODEC_VERSION_MAJOR < 0x3f; - /// FF_CODEC_SONIC_ENC = (LIBAVCODEC_VERSION_MAJOR < 63) - public const bool FF_CODEC_SONIC_ENC = LIBAVCODEC_VERSION_MAJOR < 0x3f; /// FF_COMPLIANCE_EXPERIMENTAL = -2 public const int FF_COMPLIANCE_EXPERIMENTAL = -0x2; /// FF_COMPLIANCE_NORMAL = 0 @@ -1638,8 +1610,8 @@ public static unsafe partial class ffmpeg public const int FF_EC_FAVOR_INTER = 0x100; /// FF_EC_GUESS_MVS = 0x1 public const int FF_EC_GUESS_MVS = 0x1; - /// FF_FDEBUG_TS = 0x0001 - public const int FF_FDEBUG_TS = 0x1; + /// FF_FDEBUG_TS = AV_FDEBUG_TS + public const int FF_FDEBUG_TS = AV_FDEBUG_TS; /// FF_IDCT_ALTIVEC = 0x8 public const int FF_IDCT_ALTIVEC = 0x8; /// FF_IDCT_ARM = 0x7 @@ -1735,12 +1707,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVCODEC_VERSION = AV_VERSION(LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO); /// LIBAVCODEC_VERSION_INT = AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) public static readonly int LIBAVCODEC_VERSION_INT = AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO); - /// LIBAVCODEC_VERSION_MAJOR = 62 - public const int LIBAVCODEC_VERSION_MAJOR = 0x3e; - /// LIBAVCODEC_VERSION_MICRO = 0x64 - public const int LIBAVCODEC_VERSION_MICRO = 0x64; - /// LIBAVCODEC_VERSION_MINOR = 0x1c - public const int LIBAVCODEC_VERSION_MINOR = 0x1c; + /// LIBAVCODEC_VERSION_MAJOR = 63 + public const int LIBAVCODEC_VERSION_MAJOR = 0x3f; + /// LIBAVCODEC_VERSION_MICRO = 0x65 + public const int LIBAVCODEC_VERSION_MICRO = 0x65; + /// LIBAVCODEC_VERSION_MINOR = 0x1 + public const int LIBAVCODEC_VERSION_MINOR = 0x1; /// LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT public static readonly int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT; /// LIBAVDEVICE_IDENT = "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) @@ -1749,12 +1721,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVDEVICE_VERSION = AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO); /// LIBAVDEVICE_VERSION_INT = AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO) public static readonly int LIBAVDEVICE_VERSION_INT = AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO); - /// LIBAVDEVICE_VERSION_MAJOR = 62 - public const int LIBAVDEVICE_VERSION_MAJOR = 0x3e; - /// LIBAVDEVICE_VERSION_MICRO = 100 - public const int LIBAVDEVICE_VERSION_MICRO = 0x64; - /// LIBAVDEVICE_VERSION_MINOR = 3 - public const int LIBAVDEVICE_VERSION_MINOR = 0x3; + /// LIBAVDEVICE_VERSION_MAJOR = 63 + public const int LIBAVDEVICE_VERSION_MAJOR = 0x3f; + /// LIBAVDEVICE_VERSION_MICRO = 101 + public const int LIBAVDEVICE_VERSION_MICRO = 0x65; + /// LIBAVDEVICE_VERSION_MINOR = 1 + public const int LIBAVDEVICE_VERSION_MINOR = 0x1; /// LIBAVFILTER_BUILD = LIBAVFILTER_VERSION_INT public static readonly int LIBAVFILTER_BUILD = LIBAVFILTER_VERSION_INT; /// LIBAVFILTER_IDENT = "Lavfi" @@ -1763,12 +1735,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVFILTER_VERSION = AV_VERSION(LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO); /// LIBAVFILTER_VERSION_INT = AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO) public static readonly int LIBAVFILTER_VERSION_INT = AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO); - /// LIBAVFILTER_VERSION_MAJOR = 0xb - public const int LIBAVFILTER_VERSION_MAJOR = 0xb; - /// LIBAVFILTER_VERSION_MICRO = 0x64 - public const int LIBAVFILTER_VERSION_MICRO = 0x64; - /// LIBAVFILTER_VERSION_MINOR = 0xe - public const int LIBAVFILTER_VERSION_MINOR = 0xe; + /// LIBAVFILTER_VERSION_MAJOR = 0xc + public const int LIBAVFILTER_VERSION_MAJOR = 0xc; + /// LIBAVFILTER_VERSION_MICRO = 0x65 + public const int LIBAVFILTER_VERSION_MICRO = 0x65; + /// LIBAVFILTER_VERSION_MINOR = 0x1 + public const int LIBAVFILTER_VERSION_MINOR = 0x1; /// LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT public static readonly int LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT; /// LIBAVFORMAT_IDENT = "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -1777,12 +1749,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVFORMAT_VERSION = AV_VERSION(LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO); /// LIBAVFORMAT_VERSION_INT = AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO) public static readonly int LIBAVFORMAT_VERSION_INT = AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO); - /// LIBAVFORMAT_VERSION_MAJOR = 62 - public const int LIBAVFORMAT_VERSION_MAJOR = 0x3e; - /// LIBAVFORMAT_VERSION_MICRO = 100 - public const int LIBAVFORMAT_VERSION_MICRO = 0x64; - /// LIBAVFORMAT_VERSION_MINOR = 12 - public const int LIBAVFORMAT_VERSION_MINOR = 0xc; + /// LIBAVFORMAT_VERSION_MAJOR = 63 + public const int LIBAVFORMAT_VERSION_MAJOR = 0x3f; + /// LIBAVFORMAT_VERSION_MICRO = 101 + public const int LIBAVFORMAT_VERSION_MICRO = 0x65; + /// LIBAVFORMAT_VERSION_MINOR = 1 + public const int LIBAVFORMAT_VERSION_MINOR = 0x1; /// LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT public static readonly int LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT; /// LIBAVUTIL_IDENT = "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) @@ -1791,12 +1763,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBAVUTIL_VERSION = AV_VERSION(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO); /// LIBAVUTIL_VERSION_INT = AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO) public static readonly int LIBAVUTIL_VERSION_INT = AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO); - /// LIBAVUTIL_VERSION_MAJOR = 60 - public const int LIBAVUTIL_VERSION_MAJOR = 0x3c; - /// LIBAVUTIL_VERSION_MICRO = 100 - public const int LIBAVUTIL_VERSION_MICRO = 0x64; - /// LIBAVUTIL_VERSION_MINOR = 26 - public const int LIBAVUTIL_VERSION_MINOR = 0x1a; + /// LIBAVUTIL_VERSION_MAJOR = 61 + public const int LIBAVUTIL_VERSION_MAJOR = 0x3d; + /// LIBAVUTIL_VERSION_MICRO = 101 + public const int LIBAVUTIL_VERSION_MICRO = 0x65; + /// LIBAVUTIL_VERSION_MINOR = 1 + public const int LIBAVUTIL_VERSION_MINOR = 0x1; /// LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT public static readonly int LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT; /// LIBSWRESAMPLE_IDENT = "SwR" @@ -1805,12 +1777,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBSWRESAMPLE_VERSION = AV_VERSION(LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO); /// LIBSWRESAMPLE_VERSION_INT = AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO) public static readonly int LIBSWRESAMPLE_VERSION_INT = AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO); - /// LIBSWRESAMPLE_VERSION_MAJOR = 0x6 - public const int LIBSWRESAMPLE_VERSION_MAJOR = 0x6; - /// LIBSWRESAMPLE_VERSION_MICRO = 0x64 - public const int LIBSWRESAMPLE_VERSION_MICRO = 0x64; - /// LIBSWRESAMPLE_VERSION_MINOR = 0x3 - public const int LIBSWRESAMPLE_VERSION_MINOR = 0x3; + /// LIBSWRESAMPLE_VERSION_MAJOR = 0x7 + public const int LIBSWRESAMPLE_VERSION_MAJOR = 0x7; + /// LIBSWRESAMPLE_VERSION_MICRO = 0x65 + public const int LIBSWRESAMPLE_VERSION_MICRO = 0x65; + /// LIBSWRESAMPLE_VERSION_MINOR = 0x1 + public const int LIBSWRESAMPLE_VERSION_MINOR = 0x1; /// LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT public static readonly int LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT; /// LIBSWSCALE_IDENT = "SwS" @@ -1819,12 +1791,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBSWSCALE_VERSION = AV_VERSION(LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO); /// LIBSWSCALE_VERSION_INT = AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO) public static readonly int LIBSWSCALE_VERSION_INT = AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO); - /// LIBSWSCALE_VERSION_MAJOR = 0x9 - public const int LIBSWSCALE_VERSION_MAJOR = 0x9; - /// LIBSWSCALE_VERSION_MICRO = 0x64 - public const int LIBSWSCALE_VERSION_MICRO = 0x64; - /// LIBSWSCALE_VERSION_MINOR = 0x5 - public const int LIBSWSCALE_VERSION_MINOR = 0x5; + /// LIBSWSCALE_VERSION_MAJOR = 0xa + public const int LIBSWSCALE_VERSION_MAJOR = 0xa; + /// LIBSWSCALE_VERSION_MICRO = 0x65 + public const int LIBSWSCALE_VERSION_MICRO = 0x65; + /// LIBSWSCALE_VERSION_MINOR = 0x1 + public const int LIBSWSCALE_VERSION_MINOR = 0x1; /// M_1_PI = 0.31830988618379067154 public const double M_1_PI = 0.3183098861837907D; /// M_1_PIf = 0.31830988618379067154f @@ -1917,6 +1889,8 @@ public static unsafe partial class ffmpeg public const int SWS_CS_SMPTE240M = 0x7; /// SWS_MAX_REDUCE_CUTOFF = 0.002D public const double SWS_MAX_REDUCE_CUTOFF = 0.002D; + /// SWS_NUM_SCALER_PARAMS = 0x2 + public const int SWS_NUM_SCALER_PARAMS = 0x2; /// SWS_PARAM_DEFAULT = 0x1e240 public const int SWS_PARAM_DEFAULT = 0x1e240; /// SWS_SRC_V_CHR_DROP_MASK = 0x30000 diff --git a/FFmpeg.AutoGen/generated/vectors.g.cs b/FFmpeg.AutoGen/generated/vectors.g.cs index 01cf4551..eaf583b5 100644 --- a/FFmpeg.AutoGen/generated/vectors.g.cs +++ b/FFmpeg.AutoGen/generated/vectors.g.cs @@ -761,6 +761,22 @@ public delegate void av_dump_format_delegate(AVFormatContext* @ic, int @index, public delegate int av_dynamic_hdr_plus_to_t35_delegate(AVDynamicHDRPlus* @s, byte** @data, ulong* @size); public static av_dynamic_hdr_plus_to_t35_delegate av_dynamic_hdr_plus_to_t35; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc_delegate(ulong* @size); + public static av_dynamic_hdr_smpte2094_app5_alloc_delegate av_dynamic_hdr_smpte2094_app5_alloc; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data_delegate(AVFrame* @frame); + public static av_dynamic_hdr_smpte2094_app5_create_side_data_delegate av_dynamic_hdr_smpte2094_app5_create_side_data; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_dynamic_hdr_smpte2094_app5_from_t35_delegate(AVDynamicHDRSmpte2094App5* @s, byte* @data, ulong @size); + public static av_dynamic_hdr_smpte2094_app5_from_t35_delegate av_dynamic_hdr_smpte2094_app5_from_t35; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_dynamic_hdr_smpte2094_app5_to_t35_delegate(AVDynamicHDRSmpte2094App5* @s, byte** @data, ulong* @size); + public static av_dynamic_hdr_smpte2094_app5_to_t35_delegate av_dynamic_hdr_smpte2094_app5_to_t35; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void av_dynarray_add_delegate(void* @tab_ptr, int* @nb_ptr, void* @elem); public static av_dynarray_add_delegate av_dynarray_add; @@ -1369,10 +1385,6 @@ public delegate AVHWDeviceType av_hwdevice_find_type_by_name_delegate( public delegate AVInputFormat* av_input_video_device_next_delegate(AVInputFormat* @d); public static av_input_video_device_next_delegate av_input_video_device_next; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate uint av_int_list_length_for_size_delegate(uint @elsize, void* @list, ulong @term); - public static av_int_list_length_for_size_delegate av_int_list_length_for_size; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_interleaved_write_frame_delegate(AVFormatContext* @s, AVPacket* @pkt); public static av_interleaved_write_frame_delegate av_interleaved_write_frame; @@ -1827,16 +1839,6 @@ public delegate int av_opt_is_set_to_default_by_name_delegate(void* @obj, public delegate AVOption* av_opt_next_delegate(void* @obj, AVOption* @prev); public static av_opt_next_delegate av_opt_next; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void* av_opt_ptr_delegate(AVClass* @avclass, void* @obj, - #if NETSTANDARD2_1_OR_GREATER - [MarshalAs(UnmanagedType.LPUTF8Str)] - #else - [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] - #endif - string @name); - public static av_opt_ptr_delegate av_opt_ptr; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_opt_query_ranges_delegate(AVOptionRanges** @p0, void* @obj, #if NETSTANDARD2_1_OR_GREATER @@ -2157,7 +2159,7 @@ public delegate int av_parse_cpu_caps_delegate(uint* @flags, public static av_parser_close_delegate av_parser_close; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVCodecParserContext* av_parser_init_delegate(int @codec_id); + public delegate AVCodecParserContext* av_parser_init_delegate(AVCodecID @codec_id); public static av_parser_init_delegate av_parser_init; [UnmanagedFunctionPointer(CallingConvention.Cdecl)] @@ -2236,6 +2238,14 @@ public delegate int av_probe_input_buffer2_delegate(AVIOContext* @pb, AVInputFor public delegate void av_program_add_stream_index_delegate(AVFormatContext* @ac, int @progid, uint @idx); public static av_program_add_stream_index_delegate av_program_add_stream_index; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_program_add_stream_index2_delegate(AVFormatContext* @ac, int @progid, uint @idx); + public static av_program_add_stream_index2_delegate av_program_add_stream_index2; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_program_copy_delegate(AVFormatContext* @dst, AVFormatContext* @src, int @progid, int @flags); + public static av_program_copy_delegate av_program_copy; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate uint av_q2intfloat_delegate(AVRational @q); public static av_q2intfloat_delegate av_q2intfloat; @@ -2384,10 +2394,6 @@ public delegate int av_set_options_string_delegate(void* @ctx, public delegate AVClass* av_stream_get_class_delegate(); public static av_stream_get_class_delegate av_stream_get_class; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVRational av_stream_get_codec_timebase_delegate(AVStream* @st); - public static av_stream_get_codec_timebase_delegate av_stream_get_codec_timebase; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVCodecParserContext* av_stream_get_parser_delegate(AVStream* @s); public static av_stream_get_parser_delegate av_stream_get_parser; @@ -3217,10 +3223,6 @@ public delegate int avformat_open_input_delegate(AVFormatContext** @ps, public delegate string avformat_stream_group_name_delegate(AVStreamGroupParamsType @type); public static avformat_stream_group_name_delegate avformat_stream_group_name; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int avformat_transfer_internal_stream_timing_info_delegate(AVOutputFormat* @ofmt, AVStream* @ost, AVStream* @ist, AVTimebaseSource @copy_tb); - public static avformat_transfer_internal_stream_timing_info_delegate avformat_transfer_internal_stream_timing_info; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate uint avformat_version_delegate(); public static avformat_version_delegate avformat_version; diff --git a/FFmpeg/download-ffmpeg.ps1 b/FFmpeg/download-ffmpeg.ps1 index 9e212c19..03762f12 100644 --- a/FFmpeg/download-ffmpeg.ps1 +++ b/FFmpeg/download-ffmpeg.ps1 @@ -7,18 +7,18 @@ and extracts headers to FFmpeg/include/ and DLLs to FFmpeg/bin/x64/. .PARAMETER Version - FFmpeg release tag on GyanD/codexffmpeg (default: 8.1). + FFmpeg release tag on GyanD/codexffmpeg (default: 9.0.1). .PARAMETER Force Overwrite existing headers and DLLs. .EXAMPLE .\download-ffmpeg.ps1 - .\download-ffmpeg.ps1 -Version 8.1 -Force + .\download-ffmpeg.ps1 -Version 9.0.1 -Force #> param( - [string]$Version = "8.1", + [string]$Version = "9.0.1", [switch]$Force ) diff --git a/FFmpeg/include/libavcodec/avcodec.h b/FFmpeg/include/libavcodec/avcodec.h index 6824bfc9..6bce0d38 100644 --- a/FFmpeg/include/libavcodec/avcodec.h +++ b/FFmpeg/include/libavcodec/avcodec.h @@ -353,6 +353,10 @@ typedef struct RcOverride{ * Discard cropping information from SPS. */ #define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16) +/** + * Force audio encoders to use a fixed frame size. + */ +#define AV_CODEC_FLAG2_FIXED_FRAME_SIZE (1 << 17) /** * Show all frames before the first keyframe @@ -1050,18 +1054,20 @@ typedef struct AVCodecContext { */ AVChannelLayout ch_layout; - /* The following data should not be initialized. */ /** * Number of samples per channel in an audio frame. * - * - encoding: set by libavcodec in avcodec_open2(). Each submitted frame + * - encoding: may be set by the user before calling avcodec_open2(), and + * libavcodec may then overwrite it if needed. Each submitted frame * except the last must contain exactly frame_size samples per channel. - * May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the + * May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, except + * when AV_CODEC_FLAG2_FIXED_FRAME_SIZE is requested, then the * frame size is not restricted. * - decoding: may be set by some decoders to indicate constant frame size */ int frame_size; + /* The following data should not be initialized. */ /** * number of bytes per packet if constant and known or 0 * Used by some WAV based audio codecs. @@ -1639,19 +1645,6 @@ typedef struct AVCodecContext { */ int level; -#if FF_API_CODEC_PROPS - /** - * Properties of the stream that gets decoded - * - encoding: unused - * - decoding: set by libavcodec - */ - attribute_deprecated - unsigned properties; -#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001 -#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002 -#define FF_CODEC_PROPERTY_FILM_GRAIN 0x00000004 -#endif - /** * Skip loop filtering for selected frames. * - encoding: unused @@ -2158,6 +2151,8 @@ const AVClass *avcodec_get_subtitle_rect_class(void); * of the corresponding fields in codec. * * @return >= 0 on success, a negative AVERROR code on failure + * + * @relates AVCodecParameters */ int avcodec_parameters_from_context(struct AVCodecParameters *par, const AVCodecContext *codec); @@ -2169,6 +2164,8 @@ int avcodec_parameters_from_context(struct AVCodecParameters *par, * Fields in codec that do not have a counterpart in par are not touched. * * @return >= 0 on success, a negative AVERROR code on failure. + * + * @relates AVCodecParameters */ int avcodec_parameters_to_context(AVCodecContext *codec, const struct AVCodecParameters *par); @@ -2410,7 +2407,8 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame); * For audio: * 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 + * If it is not set, or AV_CODEC_FLAG2_FIXED_FRAME_SIZE was + * requested, then 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. * @retval 0 success @@ -2750,35 +2748,7 @@ typedef struct AVCodecParserContext { } AVCodecParserContext; typedef struct AVCodecParser { -#if FF_API_PARSER_CODECID - int codec_ids[7]; /* several codec IDs are permitted */ -#else enum AVCodecID codec_ids[7]; /* several codec IDs are permitted */ -#endif -#if FF_API_PARSER_PRIVATE - /***************************************************************** - * All fields below this line are not part of the public API. They - * may not be used outside of libavcodec and can be changed and - * removed at will. - * New public fields should be added right above. - ***************************************************************** - */ - attribute_deprecated - int priv_data_size; - attribute_deprecated - int (*parser_init)(AVCodecParserContext *s); - /* This callback never returns an error, a negative value means that - * the frame start was in a previous packet. */ - attribute_deprecated - int (*parser_parse)(AVCodecParserContext *s, - AVCodecContext *avctx, - const uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size); - attribute_deprecated - void (*parser_close)(AVCodecParserContext *s); - attribute_deprecated - int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); -#endif } AVCodecParser; /** @@ -2792,11 +2762,7 @@ typedef struct AVCodecParser { */ const AVCodecParser *av_parser_iterate(void **opaque); -#if FF_API_PARSER_CODECID -AVCodecParserContext *av_parser_init(int codec_id); -#else AVCodecParserContext *av_parser_init(enum AVCodecID codec_id); -#endif /** * Parse a packet. diff --git a/FFmpeg/include/libavcodec/avdct.h b/FFmpeg/include/libavcodec/avdct.h index 6411fab6..f110ba72 100644 --- a/FFmpeg/include/libavcodec/avdct.h +++ b/FFmpeg/include/libavcodec/avdct.h @@ -19,6 +19,9 @@ #ifndef AVCODEC_AVDCT_H #define AVCODEC_AVDCT_H +#include +#include + #include "libavutil/opt.h" /** diff --git a/FFmpeg/include/libavcodec/codec.h b/FFmpeg/include/libavcodec/codec.h index f509e5d9..0966d2e6 100644 --- a/FFmpeg/include/libavcodec/codec.h +++ b/FFmpeg/include/libavcodec/codec.h @@ -27,11 +27,8 @@ #include "libavutil/hwcontext.h" #include "libavutil/log.h" #include "libavutil/pixfmt.h" -#include "libavutil/rational.h" -#include "libavutil/samplefmt.h" #include "libavcodec/codec_id.h" -#include "libavcodec/version_major.h" /** * @addtogroup lavc_core @@ -191,18 +188,6 @@ typedef struct AVCodec { int capabilities; uint8_t max_lowres; ///< maximum value for lowres supported by the decoder - /** - * Deprecated codec capabilities. - */ - attribute_deprecated - const AVRational *supported_framerates; ///< @deprecated use avcodec_get_supported_config() - attribute_deprecated - const enum AVPixelFormat *pix_fmts; ///< @deprecated use avcodec_get_supported_config() - attribute_deprecated - const int *supported_samplerates; ///< @deprecated use avcodec_get_supported_config() - attribute_deprecated - const enum AVSampleFormat *sample_fmts; ///< @deprecated use avcodec_get_supported_config() - const AVClass *priv_class; ///< AVClass for the private context const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {AV_PROFILE_UNKNOWN} @@ -217,13 +202,6 @@ typedef struct AVCodec { * (usually AVCodec.name will be of the form "_"). */ const char *wrapper_name; - - /** - * Array of supported channel layouts, terminated with a zeroed layout. - * @deprecated use avcodec_get_supported_config() - */ - attribute_deprecated - const AVChannelLayout *ch_layouts; } AVCodec; /** diff --git a/FFmpeg/include/libavcodec/codec_id.h b/FFmpeg/include/libavcodec/codec_id.h index 6529f0a6..668a068e 100644 --- a/FFmpeg/include/libavcodec/codec_id.h +++ b/FFmpeg/include/libavcodec/codec_id.h @@ -24,8 +24,6 @@ #include "libavutil/avutil.h" #include "libavutil/samplefmt.h" -#include "version_major.h" - /** * @addtogroup lavc_core * @{ @@ -206,9 +204,6 @@ enum AVCodecID { AV_CODEC_ID_BMV_VIDEO, AV_CODEC_ID_VBLE, AV_CODEC_ID_DXTORY, -#if FF_API_V408_CODECID - AV_CODEC_ID_V410, -#endif AV_CODEC_ID_XWD, AV_CODEC_ID_CDXL, AV_CODEC_ID_XBM, @@ -256,10 +251,6 @@ enum AVCodecID { AV_CODEC_ID_012V, AV_CODEC_ID_AVUI, AV_CODEC_ID_TARGA_Y216, -#if FF_API_V408_CODECID - AV_CODEC_ID_V308, - AV_CODEC_ID_V408, -#endif AV_CODEC_ID_YUV4, AV_CODEC_ID_AVRN, AV_CODEC_ID_CPIA, @@ -332,6 +323,7 @@ enum AVCodecID { AV_CODEC_ID_APV, AV_CODEC_ID_PRORES_RAW, AV_CODEC_ID_JPEGXS, + AV_CODEC_ID_WEBP_ANIM, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs @@ -566,6 +558,7 @@ enum AVCodecID { AV_CODEC_ID_LC3, AV_CODEC_ID_G728, AV_CODEC_ID_AHX, + AV_CODEC_ID_APPLE_APAC, /* subtitle codecs */ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. diff --git a/FFmpeg/include/libavcodec/codec_par.h b/FFmpeg/include/libavcodec/codec_par.h index 2697605d..d880e3a8 100644 --- a/FFmpeg/include/libavcodec/codec_par.h +++ b/FFmpeg/include/libavcodec/codec_par.h @@ -33,16 +33,18 @@ #include "packet.h" /** - * @addtogroup lavc_core + * @defgroup lavc_codec_params Codec parameters + * @ingroup lavc_core * @{ */ /** * This struct describes the properties of an encoded stream. * - * sizeof(AVCodecParameters) is not a part of the public ABI, this struct must - * be allocated with avcodec_parameters_alloc() and freed with - * avcodec_parameters_free(). + * @note + * The `sizeof(AVCodecParameters)` is not a part of the public ABI, + * therefore this struct must be allocated with ::avcodec_parameters_alloc() + * and freed with ::avcodec_parameters_free(). */ typedef struct AVCodecParameters { /** @@ -61,9 +63,9 @@ typedef struct AVCodecParameters { /** * Extra binary data needed for initializing the decoder, codec-dependent. * - * Must be allocated with av_malloc() and will be freed by - * avcodec_parameters_free(). The allocated size of extradata must be at - * least extradata_size + AV_INPUT_BUFFER_PADDING_SIZE, with the padding + * Must be allocated with ::av_malloc() and will be freed by + * ::avcodec_parameters_free(). The allocated size of extradata must be at + * least #extradata_size + ::AV_INPUT_BUFFER_PADDING_SIZE, with the padding * bytes zeroed. */ uint8_t *extradata; @@ -75,19 +77,19 @@ typedef struct AVCodecParameters { /** * Additional data associated with the entire stream. * - * Should be allocated with av_packet_side_data_new() or - * av_packet_side_data_add(), and will be freed by avcodec_parameters_free(). + * Should be allocated with ::av_packet_side_data_new() or + * ::av_packet_side_data_add(), and will be freed by ::avcodec_parameters_free(). */ AVPacketSideData *coded_side_data; /** - * Amount of entries in @ref coded_side_data. + * Amount of entries in #coded_side_data. */ int nb_coded_side_data; /** - * - video: the pixel format, the value corresponds to enum AVPixelFormat. - * - audio: the sample format, the value corresponds to enum AVSampleFormat. + * - Video: the pixel format, the value corresponds to enum ::AVPixelFormat. + * - Audio: the sample format, the value corresponds to enum ::AVSampleFormat. */ int format; @@ -103,22 +105,27 @@ typedef struct AVCodecParameters { * formats to actually decode them. It's the number of bits for one sample in * the actual coded bitstream. * - * This could be for example 4 for ADPCM - * For PCM formats this matches bits_per_raw_sample - * Can be 0 + * This could be, for example, 4, for ADPCM. + * For PCM formats this matches #bits_per_raw_sample. + * + * Can be 0. */ int bits_per_coded_sample; /** - * This is the number of valid bits in each output sample. If the - * sample format has more bits, the least significant bits are additional + * The number of valid bits in each output sample. + * + * If the sample format has more bits, the least significant bits are additional * padding bits, which are always 0. Use right shifts to reduce the sample - * to its actual size. For example, audio formats with 24 bit samples will - * have bits_per_raw_sample set to 24, and format set to AV_SAMPLE_FMT_S32. - * To get the original sample use "(int32_t)sample >> 8"." + * to its actual size. + * + * For example, audio formats with 24-bit samples will have #bits_per_raw_sample + * set to 24, and ::format set to ::AV_SAMPLE_FMT_S32. To get the original sample, + * use: `(int32_t)sample >> 8`. + * + * For ADPCM, this might be 12 or 16, or similar. * - * For ADPCM this might be 12 or 16 or similar - * Can be 0 + * Can be 0. */ int bits_per_raw_sample; @@ -129,39 +136,55 @@ typedef struct AVCodecParameters { int level; /** - * Video only. The dimensions of the video frame in pixels. + * The width of the video frame in pixels. + * + * Video only. */ int width; + + /** + * The height of the video frame in pixels. + * + * Video only. + */ int height; /** - * Video only. The aspect ratio (width / height) which a single pixel + * The aspect ratio (width/height) which a single pixel * should have when displayed. * - * When the aspect ratio is unknown / undefined, the numerator should be + * When the aspect ratio is unknown or undefined, the numerator should be * set to 0 (the denominator may have any value). + * + * Video only. */ AVRational sample_aspect_ratio; /** - * Video only. Number of frames per second, for streams with constant frame - * durations. Should be set to { 0, 1 } when some frames have differing + * Number of frames per second, for streams with constant frame + * durations. Should be set to `{ 0, 1 }` when some frames have differing * durations or if the value is not known. * * @note This field corresponds to values that are stored in codec-level * headers and is typically overridden by container/transport-layer * timestamps, when available. It should thus be used only as a last resort, * when no higher-level timing information is available. + * + * Video only. */ AVRational framerate; /** - * Video only. The order of the fields in interlaced video. + * The order of the fields in interlaced video. + * + * Video only. */ enum AVFieldOrder field_order; /** - * Video only. Additional colorspace characteristics. + * Additional colorspace characteristics. + * + * Video only. */ enum AVColorRange color_range; enum AVColorPrimaries color_primaries; @@ -170,46 +193,65 @@ typedef struct AVCodecParameters { enum AVChromaLocation chroma_location; /** - * Video only. Number of delayed frames. + * Number of delayed frames. + * + * Video only. */ int video_delay; /** - * Audio only. The channel layout and number of channels. + * The channel layout and number of channels. + * + * Audio only. */ AVChannelLayout ch_layout; /** - * Audio only. The number of audio samples per second. + * The number of audio samples per second. + * + * Audio only. */ int sample_rate; /** - * Audio only. The number of bytes per coded audio frame, required by some - * formats. + * The number of bytes per coded audio frame, required by some formats. + * + * Audio only. * * Corresponds to nBlockAlign in WAVEFORMATEX. */ int block_align; /** - * Audio only. Audio frame size, if known. Required by some formats to be static. + * Audio frame size, if known. Required by some formats to be static. + * + * Audio only. */ int frame_size; /** - * Audio only. The amount of padding (in samples) inserted by the encoder at + * Number of padding audio samples at the start. + * + * The amount of padding (in samples) inserted by the encoder at * the beginning of the audio. I.e. this number of leading decoded samples - * must be discarded by the caller to get the original audio without leading + * must be discarded to get the original audio without leading * padding. + * + * Audio only. */ int initial_padding; /** - * Audio only. The amount of padding (in samples) appended by the encoder to + * Number of padding audio samples at the end. + * + * The amount of padding (in samples) appended by the encoder to * the end of the audio. I.e. this number of decoded samples must be - * discarded by the caller from the end of the stream to get the original + * discarded from the end of the stream to get the original * audio without any trailing padding. + * + * Audio only. */ int trailing_padding; /** - * Audio only. Number of samples to skip after a discontinuity. + * Number of audio samples to skip after a discontinuity. + * + * Audio only. */ int seek_preroll; @@ -219,21 +261,26 @@ typedef struct AVCodecParameters { enum AVAlphaMode alpha_mode; } AVCodecParameters; +/** + * @relates AVCodecParameters + * @{ + */ + /** * Allocate a new AVCodecParameters and set its fields to default values * (unknown/invalid/0). The returned struct must be freed with - * avcodec_parameters_free(). + * ::avcodec_parameters_free(). */ AVCodecParameters *avcodec_parameters_alloc(void); /** * Free an AVCodecParameters instance and everything associated with it and - * write NULL to the supplied pointer. + * write `NULL` to the supplied pointer. */ void avcodec_parameters_free(AVCodecParameters **par); /** - * Copy the contents of src to dst. Any allocated fields in dst are freed and + * Copy the contents of \p src to \p dst. Any allocated fields in dst are freed and * replaced with newly allocated duplicates of the corresponding fields in src. * * @return >= 0 on success, a negative AVERROR code on failure. @@ -241,11 +288,13 @@ void avcodec_parameters_free(AVCodecParameters **par); 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. + * This function is the same as ::av_get_audio_frame_duration(), except it works + * with ::AVCodecParameters instead of an ::AVCodecContext. */ int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes); +/** @} */ + /** * @} */ diff --git a/FFmpeg/include/libavcodec/exif.h b/FFmpeg/include/libavcodec/exif.h index 1824a38d..a2308336 100644 --- a/FFmpeg/include/libavcodec/exif.h +++ b/FFmpeg/include/libavcodec/exif.h @@ -36,7 +36,6 @@ #include "libavutil/buffer.h" #include "libavutil/dict.h" #include "libavutil/rational.h" -#include "version_major.h" /** Data type identifiers for TIFF tags */ enum AVTiffDataType { @@ -138,7 +137,7 @@ int32_t av_exif_get_tag_id(const char *name); * ID, it will set the existing one to have the other information provided. Otherwise, it * will allocate a new entry. * - * This function reallocates ifd->entries using av_realloc and allocates (using av_malloc) + * This function reallocates ifd->entries using av_fast_realloc and allocates (using av_malloc) * a new value member of the entry, then copies the contents of value into that buffer. */ int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTiffDataType type, @@ -154,8 +153,14 @@ int av_exif_set_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, enum AVTif * will be written into *value. * * If the entry was present and returned successfully, a positive number is returned. + * + * The positive number is equal to 1 plus the offset at which the entry was found. If the + * entry was found at the top level, this will be in the range of 1 to the number of entries + * in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater + * than the number of entries in the top-level IFD. + * * If the entry was not found, *value is left untouched and zero is returned. - * If an error occurred, a negative number is returned. + * If an error occurred, a negative AVERROR is returned. */ int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, AVExifEntry **value); @@ -163,8 +168,16 @@ int av_exif_get_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags, * Remove an entry from the provided EXIF metadata struct. * * If the entry was present and removed successfully, a positive number is returned. - * If the entry was not found, zero is returned. - * If an error occurred, a negative number is returned. + * + * The positive number is equal to 1 plus the offset at which the entry was found. If the + * entry was found at the top level, this will be in the range of 1 to the number of entries + * in the IFD (inclusive). If the entry was found in a sub-IFD, then it will be a number greater + * than the number of entries in the top-level IFD. This refers to the state of the IFD before + * the entry was removed, e.g. if the last entry is removed, a 1 is returned, but the IFD has + * no entries anymore. + * + * If the entry was not found, zero is returned and the IFD is left untouched. + * If an error occurred, a negative AVERROR is returned. */ int av_exif_remove_entry(void *logctx, AVExifMetadata *ifd, uint16_t id, int flags); diff --git a/FFmpeg/include/libavcodec/packet.h b/FFmpeg/include/libavcodec/packet.h index 59bfddf4..00774a70 100644 --- a/FFmpeg/include/libavcodec/packet.h +++ b/FFmpeg/include/libavcodec/packet.h @@ -368,6 +368,21 @@ enum AVPacketSideDataType { */ AV_PKT_DATA_EXIF, + /** + * HDR dynamic metadata associated with a video frame. The payload is an + * AVDynamicHDRSmpte2094App5 type and contains information for color volume + * transform as specified in the SMPTE 2094-50 standard. + */ + AV_PKT_DATA_DYNAMIC_HDR_SMPTE_2094_APP5, + + /** + * Dolby Vision enhancement-layer HEVC decoder configuration. + * Parsed from the @c hvcE box in ISOM-based containers or the + * corresponding BlockAdditionMapping in Matroska. The data is a raw + * HEVCDecoderConfigurationRecord as defined in ISO 14496-15. + */ + AV_PKT_DATA_HEVC_CONF, + /** * The number of side data types. * This is not part of the public API/ABI in the sense that it may @@ -632,14 +647,6 @@ typedef struct AVPacket { AVRational time_base; } AVPacket; -#if FF_API_INIT_PACKET -attribute_deprecated -typedef struct AVPacketList { - AVPacket pkt; - struct AVPacketList *next; -} AVPacketList; -#endif - #define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe #define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted /** @@ -817,7 +824,7 @@ uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType * @param size pointer to store the size of the returned data * @return pointer to data if successful, NULL otherwise */ -uint8_t *av_packet_pack_dictionary(AVDictionary *dict, size_t *size); +uint8_t *av_packet_pack_dictionary(const AVDictionary *dict, size_t *size); /** * Unpack a dictionary from side_data. * diff --git a/FFmpeg/include/libavcodec/version.h b/FFmpeg/include/libavcodec/version.h index 87b7284a..b4616ccc 100644 --- a/FFmpeg/include/libavcodec/version.h +++ b/FFmpeg/include/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 28 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MINOR 1 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/FFmpeg/include/libavcodec/version_major.h b/FFmpeg/include/libavcodec/version_major.h index 6c652374..166646eb 100644 --- a/FFmpeg/include/libavcodec/version_major.h +++ b/FFmpeg/include/libavcodec/version_major.h @@ -25,7 +25,7 @@ * Libavcodec version macros. */ -#define LIBAVCODEC_VERSION_MAJOR 62 +#define LIBAVCODEC_VERSION_MAJOR 63 /** * FF_API_* defines may be placed below to indicate public API that will be @@ -37,23 +37,9 @@ * at once through the bump. This improves the git bisect-ability of the change. */ -#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 63) +#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 64) -#define FF_API_V408_CODECID (LIBAVCODEC_VERSION_MAJOR < 63) -#define FF_API_CODEC_PROPS (LIBAVCODEC_VERSION_MAJOR < 63) -#define FF_API_EXR_GAMMA (LIBAVCODEC_VERSION_MAJOR < 63) -#define FF_API_INTRA_DC_PRECISION (LIBAVCODEC_VERSION_MAJOR < 63) - -#define FF_API_NVDEC_OLD_PIX_FMTS (LIBAVCODEC_VERSION_MAJOR < 63) - -#define FF_API_PARSER_PRIVATE (LIBAVCODEC_VERSION_MAJOR < 63) -#define FF_API_PARSER_CODECID (LIBAVCODEC_VERSION_MAJOR < 63) - -// reminder to remove the OMX encoder on next major bump -#define FF_CODEC_OMX (LIBAVCODEC_VERSION_MAJOR < 63) -// reminder to remove Sonic Lossy/Lossless encoders on next major bump -#define FF_CODEC_SONIC_ENC (LIBAVCODEC_VERSION_MAJOR < 63) -// reminder to remove Sonic decoder on next-next major bump -#define FF_CODEC_SONIC_DEC (LIBAVCODEC_VERSION_MAJOR < 63) +#define FF_API_INTRA_DC_PRECISION (LIBAVCODEC_VERSION_MAJOR < 64) +#define FF_API_MJPEG_EXTERN_HUFF (LIBAVCODEC_VERSION_MAJOR < 64) #endif /* AVCODEC_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libavdevice/version.h b/FFmpeg/include/libavdevice/version.h index 7608a860..92de9d3b 100644 --- a/FFmpeg/include/libavdevice/version.h +++ b/FFmpeg/include/libavdevice/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVDEVICE_VERSION_MINOR 3 -#define LIBAVDEVICE_VERSION_MICRO 100 +#define LIBAVDEVICE_VERSION_MINOR 1 +#define LIBAVDEVICE_VERSION_MICRO 101 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ LIBAVDEVICE_VERSION_MINOR, \ diff --git a/FFmpeg/include/libavdevice/version_major.h b/FFmpeg/include/libavdevice/version_major.h index 191511cd..f7b8652e 100644 --- a/FFmpeg/include/libavdevice/version_major.h +++ b/FFmpeg/include/libavdevice/version_major.h @@ -25,7 +25,7 @@ * Libavdevice version macros */ -#define LIBAVDEVICE_VERSION_MAJOR 62 +#define LIBAVDEVICE_VERSION_MAJOR 63 /** * FF_API_* defines may be placed below to indicate public API that will be @@ -33,6 +33,4 @@ * the public API and may change, break or disappear at any time. */ -#define FF_API_ALSA_CHANNELS (LIBAVDEVICE_VERSION_MAJOR < 63) - #endif /* AVDEVICE_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libavfilter/avfilter.h b/FFmpeg/include/libavfilter/avfilter.h index 02b58c42..1363a861 100644 --- a/FFmpeg/include/libavfilter/avfilter.h +++ b/FFmpeg/include/libavfilter/avfilter.h @@ -37,7 +37,6 @@ #include -#include "libavutil/attributes.h" #include "libavutil/avutil.h" #include "libavutil/buffer.h" #include "libavutil/dict.h" @@ -315,26 +314,7 @@ typedef struct AVFilterContext { */ int nb_threads; -#if FF_API_CONTEXT_PUBLIC - /** - * @deprecated unused - */ - attribute_deprecated - struct AVFilterCommand *command_queue; -#endif - char *enable_str; ///< enable expression string -#if FF_API_CONTEXT_PUBLIC - /** - * @deprecated unused - */ - attribute_deprecated - void *enable; - /** - * @deprecated unused - */ - double *var_values; -#endif /** * MUST NOT be accessed from outside avfilter. * @@ -355,14 +335,6 @@ typedef struct AVFilterContext { */ AVBufferRef *hw_device_ctx; -#if FF_API_CONTEXT_PUBLIC - /** - * @deprecated this field should never have been accessed by callers - */ - attribute_deprecated - unsigned ready; -#endif - /** * Sets the number of extra hardware frames which the filter will * allocate on its output links for use in following filters or by diff --git a/FFmpeg/include/libavfilter/buffersrc.h b/FFmpeg/include/libavfilter/buffersrc.h index c7225b67..75824d96 100644 --- a/FFmpeg/include/libavfilter/buffersrc.h +++ b/FFmpeg/include/libavfilter/buffersrc.h @@ -38,19 +38,19 @@ enum { /** * Do not check for format changes. */ - AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1, + AV_BUFFERSRC_FLAG_NO_CHECK_FORMAT = 1 << 0, /** * Immediately push the frame to the output. */ - AV_BUFFERSRC_FLAG_PUSH = 4, + AV_BUFFERSRC_FLAG_PUSH = 1 << 2, /** * Keep a reference to the frame. * If the frame if reference-counted, create a new reference; otherwise * copy the frame data. */ - AV_BUFFERSRC_FLAG_KEEP_REF = 8, + AV_BUFFERSRC_FLAG_KEEP_REF = 1 << 3, }; diff --git a/FFmpeg/include/libavfilter/version.h b/FFmpeg/include/libavfilter/version.h index 7642b670..3c1762dd 100644 --- a/FFmpeg/include/libavfilter/version.h +++ b/FFmpeg/include/libavfilter/version.h @@ -31,8 +31,8 @@ #include "version_major.h" -#define LIBAVFILTER_VERSION_MINOR 14 -#define LIBAVFILTER_VERSION_MICRO 100 +#define LIBAVFILTER_VERSION_MINOR 1 +#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libavfilter/version_major.h b/FFmpeg/include/libavfilter/version_major.h index 539d5caa..a5d93410 100644 --- a/FFmpeg/include/libavfilter/version_major.h +++ b/FFmpeg/include/libavfilter/version_major.h @@ -27,7 +27,7 @@ * Libavfilter version macros */ -#define LIBAVFILTER_VERSION_MAJOR 11 +#define LIBAVFILTER_VERSION_MAJOR 12 /** * FF_API_* defines may be placed below to indicate public API that will be @@ -35,8 +35,4 @@ * the public API and may change, break or disappear at any time. */ -#define FF_API_BUFFERSINK_OPTS (LIBAVFILTER_VERSION_MAJOR < 12) -#define FF_API_CONTEXT_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 12) -#define FF_API_LIBNPP_SUPPORT (LIBAVFILTER_VERSION_MAJOR < 12) - #endif /* AVFILTER_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libavformat/avformat.h b/FFmpeg/include/libavformat/avformat.h index ee0ddddf..ef2b08c4 100644 --- a/FFmpeg/include/libavformat/avformat.h +++ b/FFmpeg/include/libavformat/avformat.h @@ -386,6 +386,7 @@ struct AVFrame; creation_time-- date when the file was created, preferably in ISO 8601. date -- date when the work was created, preferably in ISO 8601. disc -- number of a subset, e.g. disc in a multi-disc collection. + disc_subtitle-- title of a subset, e.g. disc subtitle in a multi-disc collection. encoder -- name/settings of the software/hardware that produced the file. encoded_by -- person/group who created the file. filename -- original name of the file. @@ -495,6 +496,7 @@ typedef struct AVProbeData { The user or muxer can override this through AVFormatContext.avoid_negative_ts */ +#define AVFMT_FIXED_FRAMESIZE 0x80000 /**< Format wants @ref AVCodecParameters.frame_size "fixed size audio frames." */ #define AVFMT_SEEK_TO_PTS 0x4000000 /**< Seeking is based on PTS */ @@ -517,10 +519,10 @@ typedef struct AVOutputFormat { enum AVCodecID video_codec; /**< default video codec */ enum AVCodecID subtitle_codec; /**< default subtitle codec */ /** - * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, + * can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL, * AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS, * AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS, - * AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE + * AVFMT_TS_NONSTRICT, AVFMT_TS_NEGATIVE, AVFMT_FIXED_FRAMESIZE */ int flags; @@ -556,9 +558,10 @@ typedef struct AVInputFormat { const char *long_name; /** - * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, - * AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, - * AVFMT_NOGENSEARCH, AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. + * Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_EXPERIMENTAL, + * AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS, AVFMT_GENERIC_INDEX, + * AVFMT_TS_DISCONT, AVFMT_NOBINSEARCH, AVFMT_NOGENSEARCH, + * AVFMT_NO_BYTE_SEEK, AVFMT_SEEK_TO_PTS. */ int flags; @@ -1062,19 +1065,32 @@ typedef struct AVStreamGroupTileGrid { } AVStreamGroupTileGrid; /** - * AVStreamGroupLCEVC is meant to define the relation between video streams - * and a data stream containing LCEVC enhancement layer NALUs. + * AVStreamGroupLayeredVideo is meant to define the relation between a base + * layer video stream and a separate enhancement layer stream that together + * form a single layered video presentation (for example a video stream and a + * data stream containing LCEVC enhancement layer NALUs, or Dolby Vision + * Profile 7 dual-layer encoding). * - * No more than one stream of - * @ref AVCodecParameters.codec_id "codec_id" AV_CODEC_ID_LCEVC shall be present. + * The enhancement layer stream is identified by @ref el_index. */ -typedef struct AVStreamGroupLCEVC { +typedef struct AVStreamGroupLayeredVideo { const AVClass *av_class; /** - * Index of the LCEVC data stream in AVStreamGroup. + * Index of the enhancement layer stream in AVStreamGroup. */ - unsigned int lcevc_index; +#if FF_API_LCEVC_STRUCT + union { +#endif + unsigned int el_index; +#if FF_API_LCEVC_STRUCT + /** + * Alias for @ref el_index, kept for backward compatibility. + */ + attribute_deprecated + unsigned int lcevc_index; + }; +#endif /** * Width of the final stream for presentation. */ @@ -1083,7 +1099,32 @@ typedef struct AVStreamGroupLCEVC { * Height of the final image for presentation. */ int height; -} AVStreamGroupLCEVC; +} AVStreamGroupLayeredVideo; + +#if FF_API_LCEVC_STRUCT +/** + * Alias kept for backward compatibility. + * + * AVStreamGroupLCEVC was renamed to @ref AVStreamGroupLayeredVideo. + */ +#define AVStreamGroupLCEVC AVStreamGroupLayeredVideo +#endif + +/** + * AVStreamGroupTREF is meant to define the relation between video, audio, + * or subtitle streams, and a data stream containing metadata. + * + * No more than one stream of @ref AVCodecParameters.codec_type "codec_type" + * AVMEDIA_TYPE_DATA shall be present. + */ +typedef struct AVStreamGroupTREF { + const AVClass *av_class; + + /** + * Index of the metadata stream in the AVStreamGroup. + */ + unsigned int metadata_index; +} AVStreamGroupTREF; enum AVStreamGroupParamsType { AV_STREAM_GROUP_PARAMS_NONE, @@ -1091,6 +1132,8 @@ enum AVStreamGroupParamsType { AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION, AV_STREAM_GROUP_PARAMS_TILE_GRID, AV_STREAM_GROUP_PARAMS_LCEVC, + AV_STREAM_GROUP_PARAMS_TREF, + AV_STREAM_GROUP_PARAMS_DOLBY_VISION, }; struct AVIAMFAudioElement; @@ -1132,7 +1175,15 @@ typedef struct AVStreamGroup { struct AVIAMFAudioElement *iamf_audio_element; struct AVIAMFMixPresentation *iamf_mix_presentation; struct AVStreamGroupTileGrid *tile_grid; + struct AVStreamGroupLayeredVideo *layered_video; +#if FF_API_LCEVC_STRUCT + /** + * deprecated, use layered_video. + */ + attribute_deprecated struct AVStreamGroupLCEVC *lcevc; +#endif + struct AVStreamGroupTREF *tref; } params; /** @@ -1538,7 +1589,12 @@ typedef struct AVFormatContext { * Flags to enable debugging. */ int debug; -#define FF_FDEBUG_TS 0x0001 +#define AV_FDEBUG_TS 0x0001 +#define AV_FDEBUG_ID3V2 0x0002 + +#if FF_API_FDEBUG_TS +#define FF_FDEBUG_TS AV_FDEBUG_TS +#endif /** * The maximum number of streams. @@ -2069,6 +2125,37 @@ int avformat_stream_group_add_stream(AVStreamGroup *stg, AVStream *st); AVProgram *av_new_program(AVFormatContext *s, int id); + +#define AVFMT_PROGCOPY_MATCH_BY_ID (1 << 0) ///< match streams using stream id +#define AVFMT_PROGCOPY_MATCH_BY_INDEX (1 << 1) ///< match streams using stream index +#define AVFMT_PROGCOPY_OVERWRITE (1 << 8) ///< overwrite pre-existing program having same ID + +/** + * Copy an AVProgram from one AVFormatContext to another. + * + * Streams in the destination context whose designated attribute match the attribute of + * the streams in the source AVProgram index are added to the stream index of the copied + * AVProgram. The attribute is designated using AVFMT_PROGCOPY_MATCH_ flags. + * + * If a new program has to be added, the function expects and requires any existing buffer + * holding the array of pointers to AVPrograms in the destination context to have its size + * be a power-of-two value. This should be the case if all earlier programs were created + * using av_new_program or this function. + * + * @param dst pointer to the target muxer context + * @param src pointer to the source muxer context + * @param progid ID of the program to be copied + * @param flags combination of flags which determine how streams are matched and + * whether pre-existing AVProgram in target is overwritten. + * If no match condition is set, streams will be matched by ids if + * all source stream ids are non-zero and unique, else by index. + * + * @return >= 0 in case of success, Error EEXIST if target already has program with same ID + * and overwrite flag isn't set, else a negative AVERROR code in case of other + * failures. + */ +int av_program_copy(AVFormatContext *dst, const AVFormatContext *src, int progid, int flags); + /** * @} */ @@ -2230,6 +2317,19 @@ AVProgram *av_find_program_from_stream(AVFormatContext *ic, AVProgram *last, int void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int idx); +/** + * Add the supplied index of a stream to the AVProgram with matching id. + * + * @param ac the format context which contains the target AVProgram + * @param progid the ID of the AVProgram whose stream index is to be updated + * @param idx the index of the stream to be added + * + * @return >=0 upon successful addition or if index was already present, + * AVERROR if no matching program is found or stream index is invalid or + * the stream index array reallocation failed. + */ +int av_program_add_stream_index2(AVFormatContext *ac, int progid, unsigned int idx); + /** * Find the "best" stream in the file. * The best stream is determined according to various heuristics as the most @@ -3085,32 +3185,6 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, int avformat_queue_attached_pictures(AVFormatContext *s); -#if FF_API_INTERNAL_TIMING -enum AVTimebaseSource { - AVFMT_TBCF_AUTO = -1, - AVFMT_TBCF_DECODER, - AVFMT_TBCF_DEMUXER, -#if FF_API_R_FRAME_RATE - AVFMT_TBCF_R_FRAMERATE, -#endif -}; - -/** - * @deprecated do not call this function - */ -attribute_deprecated -int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt, - AVStream *ost, const AVStream *ist, - enum AVTimebaseSource copy_tb); - -/** - * @deprecated do not call this function - */ -attribute_deprecated -AVRational av_stream_get_codec_timebase(const AVStream *st); -#endif - - /** * @} */ diff --git a/FFmpeg/include/libavformat/version.h b/FFmpeg/include/libavformat/version.h index cb67e0a1..b32ddb36 100644 --- a/FFmpeg/include/libavformat/version.h +++ b/FFmpeg/include/libavformat/version.h @@ -31,8 +31,8 @@ #include "version_major.h" -#define LIBAVFORMAT_VERSION_MINOR 12 -#define LIBAVFORMAT_VERSION_MICRO 100 +#define LIBAVFORMAT_VERSION_MINOR 1 +#define LIBAVFORMAT_VERSION_MICRO 101 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ diff --git a/FFmpeg/include/libavformat/version_major.h b/FFmpeg/include/libavformat/version_major.h index c2f6e161..1e431290 100644 --- a/FFmpeg/include/libavformat/version_major.h +++ b/FFmpeg/include/libavformat/version_major.h @@ -29,7 +29,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here -#define LIBAVFORMAT_VERSION_MAJOR 62 +#define LIBAVFORMAT_VERSION_MAJOR 63 /** * FF_API_* defines may be placed below to indicate public API that will be @@ -41,11 +41,11 @@ * at once through the bump. This improves the git bisect-ability of the change. * */ -#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 63) +#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 64) -#define FF_API_INTERNAL_TIMING (LIBAVFORMAT_VERSION_MAJOR < 63) +#define FF_API_FDEBUG_TS (LIBAVFORMAT_VERSION_MAJOR < 64) -#define FF_API_NO_DEFAULT_TLS_VERIFY (LIBAVFORMAT_VERSION_MAJOR < 63) +#define FF_API_LCEVC_STRUCT (LIBAVFORMAT_VERSION_MAJOR < 64) #define FF_API_R_FRAME_RATE 1 diff --git a/FFmpeg/include/libavutil/attributes.h b/FFmpeg/include/libavutil/attributes.h index 0e49b22b..cd4c4338 100644 --- a/FFmpeg/include/libavutil/attributes.h +++ b/FFmpeg/include/libavutil/attributes.h @@ -59,6 +59,14 @@ # define AV_HAS_STD_ATTRIBUTE(x) 0 #endif +#if AV_HAS_STD_ATTRIBUTE(fallthrough) +# define av_fallthrough [[fallthrough]] +#elif AV_HAS_ATTRIBUTE(fallthrough) +# define av_fallthrough __attribute__((fallthrough)) +#else +# define av_fallthrough do {} while(0) +#endif + #ifndef av_always_inline #if AV_GCC_VERSION_AT_LEAST(3,1) || defined(__clang__) # define av_always_inline __attribute__((always_inline)) inline @@ -111,7 +119,7 @@ # define av_cold #endif -#if AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__llvm__) +#if (AV_GCC_VERSION_AT_LEAST(4,1) && !defined(__clang__ )) || AV_HAS_ATTRIBUTE(flatten) # define av_flatten __attribute__((flatten)) #else # define av_flatten diff --git a/FFmpeg/include/libavutil/avutil.h b/FFmpeg/include/libavutil/avutil.h index c8ae114a..003a63b7 100644 --- a/FFmpeg/include/libavutil/avutil.h +++ b/FFmpeg/include/libavutil/avutil.h @@ -313,30 +313,6 @@ static inline void *av_x_if_null(const void *p, const void *x) return (void *)(intptr_t)(p ? p : x); } -#if FF_API_OPT_INT_LIST -/** - * Compute the length of an integer list. - * - * @param elsize size in bytes of each list element (only 1, 2, 4 or 8) - * @param term list terminator (usually 0 or -1) - * @param list pointer to the list - * @return length of the list, in elements, not counting the terminator - */ -attribute_deprecated -unsigned av_int_list_length_for_size(unsigned elsize, - const void *list, uint64_t term) av_pure; - -/** - * Compute the length of an integer list. - * - * @param term list terminator (usually 0 or -1) - * @param list pointer to the list - * @return length of the list, in elements, not counting the terminator - */ -#define av_int_list_length(list, term) \ - av_int_list_length_for_size(sizeof(*(list)), list, term) -#endif - /** * Return the fractional representation of the internal time base. */ diff --git a/FFmpeg/include/libavutil/bswap.h b/FFmpeg/include/libavutil/bswap.h index f53e5768..c1e6591c 100644 --- a/FFmpeg/include/libavutil/bswap.h +++ b/FFmpeg/include/libavutil/bswap.h @@ -68,7 +68,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x) #ifndef av_bswap64 static inline uint64_t av_const av_bswap64(uint64_t x) { - return (uint64_t)av_bswap32(x) << 32 | av_bswap32(x >> 32); + return (uint64_t)av_bswap32((uint32_t)x) << 32 | av_bswap32((uint32_t)(x >> 32)); } #endif diff --git a/FFmpeg/include/libavutil/common.h b/FFmpeg/include/libavutil/common.h index bf23aa50..cba78c5f 100644 --- a/FFmpeg/include/libavutil/common.h +++ b/FFmpeg/include/libavutil/common.h @@ -297,17 +297,6 @@ static av_always_inline av_const unsigned av_zero_extend_c(unsigned a, unsigned return a & ((1U << p) - 1); } -#if FF_API_MOD_UINTP2 -#ifndef av_mod_uintp2 -# define av_mod_uintp2 av_mod_uintp2_c -#endif -attribute_deprecated -static av_always_inline av_const unsigned av_mod_uintp2_c(unsigned a, unsigned p) -{ - return av_zero_extend_c(a, p); -} -#endif - /** * Add two signed 32-bit values with saturation. * diff --git a/FFmpeg/include/libavutil/cpu.h b/FFmpeg/include/libavutil/cpu.h index 464d4cd5..c4168634 100644 --- a/FFmpeg/include/libavutil/cpu.h +++ b/FFmpeg/include/libavutil/cpu.h @@ -82,6 +82,8 @@ #define AV_CPU_FLAG_SME2 (1 <<14) #define AV_CPU_FLAG_SME_I16I64 (1 <<15) #define AV_CPU_FLAG_SETEND (1 <<16) +#define AV_CPU_FLAG_PMULL (1 <<17) +#define AV_CPU_FLAG_EOR3 (1 <<18) #define AV_CPU_FLAG_MMI (1 << 0) #define AV_CPU_FLAG_MSA (1 << 1) @@ -92,18 +94,11 @@ // RISC-V extensions #define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank) -#if FF_API_RISCV_FD_ZBA -#define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP) -#define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP) -#endif #define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */ #define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */ #define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */ #define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's #define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations -#if FF_API_RISCV_FD_ZBA -#define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations -#endif #define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations #define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses #define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations) diff --git a/FFmpeg/include/libavutil/ffversion.h b/FFmpeg/include/libavutil/ffversion.h index 365872aa..9e8b8c60 100644 --- a/FFmpeg/include/libavutil/ffversion.h +++ b/FFmpeg/include/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "8.1-full_build-www.gyan.dev" +#define FFMPEG_VERSION "9.0.1-full_build-www.gyan.dev" #endif /* AVUTIL_FFVERSION_H */ diff --git a/FFmpeg/include/libavutil/frame.h b/FFmpeg/include/libavutil/frame.h index 771c9ce4..52adbc62 100644 --- a/FFmpeg/include/libavutil/frame.h +++ b/FFmpeg/include/libavutil/frame.h @@ -256,10 +256,49 @@ enum AVFrameSideDataType { AV_FRAME_DATA_3D_REFERENCE_DISPLAYS, /** - * Extensible image file format metadata. The payload is a buffer containing - * EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. + * Exchangeable image file format metadata. The payload is a buffer containing + * EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. These four + * bytes signify the endianness, and occur as the first part of the TIFF header. */ - AV_FRAME_DATA_EXIF, + AV_FRAME_DATA_EXIF, + + /** + * HDR dynamic metadata associated with a video frame. The payload is + * an AVDynamicHDRSmpte2094App5 type and contains information for color + * volume transform as specified in the SMPTE 2094-50 standard. + */ + AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5, + + /** + * IAMF Mix Gain Parameter Data associated with the audio frame. This metadata + * is in the form of the AVIAMFParamDefinition struct and contains information + * defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and + * Formats standard. + */ + AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM, + + /** + * IAMF Demixing Info Parameter Data associated with the audio frame. This + * metadata is in the form of the AVIAMFParamDefinition struct and contains + * information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model + * and Formats standard. + */ + AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM, + + /** + * IAMF Recon Gain Info Parameter Data associated with the audio frame. This + * metadata is in the form of the AVIAMFParamDefinition struct and contains + * information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model + * and Formats standard. + */ + AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM, + + /** + * Color information from a RAW camera codecs, needed to correctly process + * the video data. The payload is an AVRawColorParams struct defined in + * libavutil/raw_color_params.h. + */ + AV_FRAME_DATA_RAW_COLOR_PARAMS, }; enum AVActiveFormatDescription { diff --git a/FFmpeg/include/libavutil/hdr_dynamic_metadata.h b/FFmpeg/include/libavutil/hdr_dynamic_metadata.h index 5100ed6f..a051ac74 100644 --- a/FFmpeg/include/libavutil/hdr_dynamic_metadata.h +++ b/FFmpeg/include/libavutil/hdr_dynamic_metadata.h @@ -373,4 +373,108 @@ int av_dynamic_hdr_plus_from_t35(AVDynamicHDRPlus *s, const uint8_t *data, */ int av_dynamic_hdr_plus_to_t35(const AVDynamicHDRPlus *s, uint8_t **data, size_t *size); +/** + * This struct represents dynamic metadata for color volume transform as + * specified in the SMPTE 2094-50 standard. + * + * To be used as payload of a AVFrameSideData or AVPacketSideData with the + * appropriate type. + * + * @note The struct should be allocated with + * av_dynamic_smpte2094_app5_alloc() and its size is not a part of + * the public ABI. + */ +typedef struct AVDynamicHDRSmpte2094App5 { + /** + * Section C.2.1. smpte_st_2094_50_application_info() + */ + uint8_t application_version; + uint8_t minimum_application_version; + + /** + * Section C.2.2 smpte_st_2094_50_color_volume_transform() + */ + uint8_t has_custom_hdr_reference_white_flag; + uint8_t has_adaptive_tone_map_flag; + uint16_t hdr_reference_white; + + /** + * Section C.2.3 smpte_st_2094_50_adaptive_tone_map() + */ + uint16_t baseline_hdr_headroom; + uint8_t use_reference_white_tone_mapping_flag; + uint8_t num_alternate_images; + uint8_t gain_application_space_chromaticities_flag; + uint8_t has_common_component_mix_params_flag; + uint8_t has_common_curve_params_flag; + uint16_t gain_application_space_chromaticities[8]; + uint16_t alternate_hdr_headrooms[4]; + + /** + * Section C.2.4 smpte_st_2094_50_component_mixing() + */ + uint8_t component_mixing_type[4]; + uint8_t has_component_mixing_coefficient_flag[4][6]; + uint16_t component_mixing_coefficient[4][6]; + + /** + * Section C.2.5 smpte_st_2094_50_gain_curve() + */ + uint8_t gain_curve_num_control_points_minus_1[4]; + uint8_t gain_curve_use_pchip_slope_flag[4]; + uint16_t gain_curve_control_points_x[4][32]; + uint16_t gain_curve_control_points_y[4][32]; + uint16_t gain_curve_control_points_theta[4][32]; +} AVDynamicHDRSmpte2094App5; + +/** + * Allocate an AVDynamicHDRSmpte2094App5 structure and set its fields to + * default values. The resulting struct can be freed using av_freep(). + * + * @return An AVDynamicHDRSmpte2094App5 filled with default values or NULL + * on failure. + */ +AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_alloc(size_t* size); + +/** + * Allocate a complete AVDynamicHDRSmpte2094App5 and add it to the frame. + * + * @param frame The frame which side data is added to. + * + * @return The AVDynamicHDRSmpte2094App5 structure to be filled by caller or + * NULL on failure. + */ +AVDynamicHDRSmpte2094App5* av_dynamic_hdr_smpte2094_app5_create_side_data(AVFrame* frame); + +/** + * Parse the user data formatted as ITU-T T.35 message to AVDynamicHDRSmpte2094App5. + * + * @param s A pointer containing the decoded AVDynamicHDRSmpte2094App5 structure. + * @param data The byte array containing the raw ITU-T T.35 data. + * @param size Size of the data array in bytes. + * + * @return >= 0 on success. Otherwise, returns the appropriate AVERROR. + */ +int av_dynamic_hdr_smpte2094_app5_from_t35(AVDynamicHDRSmpte2094App5* s, const uint8_t* data, + size_t size); + +/** + * Serialize dynamic SMPTE-2094-50 metadata to a ITU-T T.35 message. Excluding + * the country_code, provider_code and provider_oriented_code. + * + * @param s A pointer containing the AVDynamicHDRSmpte2094App5 data. + * @param[in,out] data A pointer to pointer to a byte buffer to be filled with + * the serialized metadata. If *data is NULL, a buffer be will be allocated and + * a pointer to it stored in its place. The caller assumes ownership of the + * buffer. May be NULL, in which case the function will only store the required + * buffer size in *size. + * @param[in,out] size A pointer to a size to be set to the returned buffer's + * size. If *data is not NULL, *size must contain the size of the input buffer. + * May be NULL only if *data is NULL. + * + * @return >= 0 on success. Otherwise, returns the appropriate AVERROR. + */ +int av_dynamic_hdr_smpte2094_app5_to_t35(const AVDynamicHDRSmpte2094App5* s, uint8_t** data, + size_t* size); + #endif /* AVUTIL_HDR_DYNAMIC_METADATA_H */ diff --git a/FFmpeg/include/libavutil/hwcontext_amf.h b/FFmpeg/include/libavutil/hwcontext_amf.h index 6f2cabc8..918eec97 100644 --- a/FFmpeg/include/libavutil/hwcontext_amf.h +++ b/FFmpeg/include/libavutil/hwcontext_amf.h @@ -26,6 +26,8 @@ #include #include #include +#include +#include "libavutil/mastering_display_metadata.h" /** * This struct is allocated as AVHWDeviceContext.hwctx @@ -47,4 +49,10 @@ typedef struct AVAMFDeviceContext { enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt); enum AVPixelFormat av_amf_to_av_format(enum AMF_SURFACE_FORMAT fmt); +enum AMF_VIDEO_CONVERTER_COLOR_PROFILE_ENUM av_amf_get_color_profile(enum AVColorRange color_range, enum AVColorSpace color_space); +int av_amf_display_mastering_meta_to_hdrmeta(const AVMasteringDisplayMetadata *display_meta, AMFHDRMetadata *hdrmeta); +int av_amf_light_metadata_to_hdrmeta(const AVContentLightMetadata *light_meta, AMFHDRMetadata *hdrmeta); +int av_amf_extract_hdr_metadata(const AVFrame *frame, AMFHDRMetadata *hdrmeta); +int av_amf_attach_hdr_metadata(AVFrame *frame, const AMFHDRMetadata *hdrmeta); + #endif /* AVUTIL_HWCONTEXT_AMF_H */ diff --git a/FFmpeg/include/libavutil/hwcontext_vulkan.h b/FFmpeg/include/libavutil/hwcontext_vulkan.h index b9a841a1..87c2a2d2 100644 --- a/FFmpeg/include/libavutil/hwcontext_vulkan.h +++ b/FFmpeg/include/libavutil/hwcontext_vulkan.h @@ -116,58 +116,6 @@ typedef struct AVVulkanDeviceContext { const char * const *enabled_dev_extensions; int nb_enabled_dev_extensions; -#if FF_API_VULKAN_FIXED_QUEUES - /** - * Queue family index for graphics operations, and the number of queues - * enabled for it. If unavailable, will be set to -1. Not required. - * av_hwdevice_create() will attempt to find a dedicated queue for each - * queue family, or pick the one with the least unrelated flags set. - * Queue indices here may overlap if a queue has to share capabilities. - */ - attribute_deprecated - int queue_family_index; - attribute_deprecated - int nb_graphics_queues; - - /** - * Queue family index for transfer operations and the number of queues - * enabled. Required. - */ - attribute_deprecated - int queue_family_tx_index; - attribute_deprecated - int nb_tx_queues; - - /** - * Queue family index for compute operations and the number of queues - * enabled. Required. - */ - attribute_deprecated - int queue_family_comp_index; - attribute_deprecated - int nb_comp_queues; - - /** - * Queue family index for video encode ops, and the amount of queues enabled. - * If the device doesn't support such, queue_family_encode_index will be -1. - * Not required. - */ - attribute_deprecated - int queue_family_encode_index; - attribute_deprecated - int nb_encode_queues; - - /** - * Queue family index for video decode ops, and the amount of queues enabled. - * If the device doesn't support such, queue_family_decode_index will be -1. - * Not required. - */ - attribute_deprecated - int queue_family_decode_index; - attribute_deprecated - int nb_decode_queues; -#endif - #if FF_API_VULKAN_SYNC_QUEUES /** * Locks a queue, preventing other threads from submitting any command @@ -199,6 +147,9 @@ typedef struct AVVulkanDeviceContext { */ AVVulkanDeviceQueueFamily qf[64]; int nb_qf; + + /* Queue creation flags, for vkGetDeviceQueue2. */ + VkDeviceQueueCreateFlags queue_flags; } AVVulkanDeviceContext; /** @@ -336,7 +287,7 @@ struct AVVkFrame { /** * Updated after every barrier. One per VkImage. */ - VkAccessFlagBits access[AV_NUM_DATA_POINTERS]; + VkAccessFlagBits2 access[AV_NUM_DATA_POINTERS]; VkImageLayout layout[AV_NUM_DATA_POINTERS]; /** @@ -355,11 +306,6 @@ struct AVVkFrame { */ uint64_t sem_value[AV_NUM_DATA_POINTERS]; - /** - * Internal data. - */ - struct AVVkFrameInternal *internal; - /** * Describes the binding offset of each image to the VkDeviceMemory. * One per VkImage. @@ -372,6 +318,11 @@ struct AVVkFrame { * One per VkImage. */ uint32_t queue_family[AV_NUM_DATA_POINTERS]; + + /** + * Internal data. Not to be accessed by users in any way. + */ + struct AVVkFrameInternal *internal; }; /** diff --git a/FFmpeg/include/libavutil/opt.h b/FFmpeg/include/libavutil/opt.h index ab24fae7..2a50f52f 100644 --- a/FFmpeg/include/libavutil/opt.h +++ b/FFmpeg/include/libavutil/opt.h @@ -28,7 +28,6 @@ */ #include "rational.h" -#include "avutil.h" #include "channel_layout.h" #include "dict.h" #include "log.h" @@ -886,24 +885,6 @@ int av_opt_set_chlayout(void *obj, const char *name, const AVChannelLayout *layo */ int av_opt_set_dict_val(void *obj, const char *name, const AVDictionary *val, int search_flags); -#if FF_API_OPT_INT_LIST -/** - * Set a binary option to an integer list. - * - * @param obj AVClass object to set options on - * @param name name of the binary option - * @param val pointer to an integer list (must have the correct type with - * regard to the contents of the list) - * @param term list terminator (usually 0 or -1) - * @param flags search flags - */ -#define av_opt_set_int_list(obj, name, val, term, flags) \ - (av_int_list_length(val, term) > INT_MAX / sizeof(*(val)) ? \ - AVERROR(EINVAL) : \ - av_opt_set_bin(obj, name, (const uint8_t *)(val), \ - av_int_list_length(val, term) * sizeof(*(val)), flags)) -#endif - /** * Add, replace, or remove elements for an array option. Which of these * operations is performed depends on the values of val and search_flags. @@ -1071,21 +1052,6 @@ int av_opt_eval_q (void *obj, const AVOption *o, const char *val, AVRational * @} */ -#if FF_API_OPT_PTR -/** - * Gets a pointer to the requested field in a struct. - * This function allows accessing a struct even when its fields are moved or - * renamed since the application making the access has been compiled, - * - * @returns a pointer to the field, it can be cast to the correct type and read - * or written to. - * - * @deprecated direct access to AVOption-exported fields is not supported - */ -attribute_deprecated -void *av_opt_ptr(const AVClass *avclass, void *obj, const char *name); -#endif - /** * Check if given option is set to its default value. * diff --git a/FFmpeg/include/libavutil/raw_color_params.h b/FFmpeg/include/libavutil/raw_color_params.h new file mode 100644 index 00000000..db6f8410 --- /dev/null +++ b/FFmpeg/include/libavutil/raw_color_params.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2026 Lynne + * + * 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 AVUTIL_RAW_COLOR_PARAMS_H +#define AVUTIL_RAW_COLOR_PARAMS_H + +#include +#include + +#include "frame.h" +#include "rational.h" + +enum AVRawColorParamsType { + AV_RAW_COLOR_PARAMS_NONE = 0, + + /** + * The union is valid when interpreted as AVProResRawColorParams + * (codec.prores_raw). + */ + AV_RAW_COLOR_PARAMS_PRORES_RAW, +}; + +/** + * ProRes RAW per-frame color transform, parsed from the prrf frame header. + * + * The correct rendering pipeline is: + * -> (sample - black_level) / (white_level - black_level) + * -> per-channel white balance (wb_red, 1.0 for G, wb_blue) pre-debayer + * -> debayer + * -> color_matrix (camera RGB -> CIE 1931 XYZ relative to D65) + * -> gain (scene-linear scale) + * + * Black/white levels live on the outer AVRawColorParams. The matrix output + * is linear-light CIE XYZ D65; convert to a working RGB space downstream. + * + * @note The struct must be allocated as part of AVRawColorParams using + * av_raw_color_params_alloc(). Its size is not a part of the public ABI. + */ +typedef struct AVProResRawColorParams { + /** + * White balance multiplier for the red channel, applied pre-debayer. + */ + AVRational wb_red; + + /** + * White balance multiplier for the blue channel, applied pre-debayer. + * (The green channel is implicit 1.0 for ProRes RAW) + */ + AVRational wb_blue; + + /** + * 3x3 row-major color matrix from camera RGB to linear-light CIE 1931 + * XYZ relative to the D65 illuminant, applied post-debayer. + * out[i] = sum_j color_matrix[i][j] * in[j]. + */ + AVRational color_matrix[3][3]; + + /** + * Post-matrix scene-linear scaling factor. Encodes highlight headroom the + * encoder reserved; multiply the matrixed values by this to recover + * scene-linear light. + */ + AVRational gain; +} AVProResRawColorParams; + +/** + * Per-frame color information for a RAW camera codec. Carried as side data of + * type AV_FRAME_DATA_RAW_COLOR_PARAMS. + * + * The outer struct carries the fields every RAW codec exposes: the sensor's + * valid sample range and the white-balance correlated color temperature. + * The codec union holds the codec-specific transform parameters; `type` + * selects which member of the union is valid. + * + * The codec-specific transform (color_matrix or equivalent) always lands in + * linear-light CIE 1931 XYZ relative to the D65 illuminant, cameras don't + * have standard primaries, so XYZ is the only common target. + * + * @note The struct must be allocated using av_raw_color_params_alloc() or + * av_raw_color_params_create_side_data(). Its size is not a part of the + * public ABI. + */ +typedef struct AVRawColorParams { + /** + * Selects which member of `codec` is valid. + */ + enum AVRawColorParamsType type; + + /** + * Lowest valid raw sample code (sensor black point) + */ + AVRational black_level; + + /** + * Highest valid raw sample code (sensor white point) + */ + AVRational white_level; + + /** + * Color temperature in Kelvin from with the camera's white balance. + * Informational; the math uses the codec-specific white-balance fields. + * 0 if not signaled. + */ + uint32_t wb_cct; + + /** + * Additional codec-specific fields. + */ + union { + AVProResRawColorParams prores_raw; + } codec; +} AVRawColorParams; + +/** + * Allocate an AVRawColorParams structure and zero-initialize it. + * + * @param size if non-NULL, set to sizeof(AVRawColorParams) + * @return the newly allocated struct or NULL on failure + */ +AVRawColorParams *av_raw_color_params_alloc(size_t *size); + +/** + * Allocate and add an AVRawColorParams structure to an existing AVFrame as + * AV_FRAME_DATA_RAW_COLOR_PARAMS side data. + * + * @return the newly allocated struct, or NULL on failure + */ +AVRawColorParams *av_raw_color_params_create_side_data(AVFrame *frame); + +#endif /* AVUTIL_RAW_COLOR_PARAMS_H */ diff --git a/FFmpeg/include/libavutil/samplefmt.h b/FFmpeg/include/libavutil/samplefmt.h index 43a57a42..6e55d711 100644 --- a/FFmpeg/include/libavutil/samplefmt.h +++ b/FFmpeg/include/libavutil/samplefmt.h @@ -122,8 +122,7 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt); * @param sample_fmt the number of the sample format to print the * corresponding info string, or a negative value to print the * corresponding header. - * @return the pointer to the filled buffer or NULL if sample_fmt is - * unknown or in case of other errors + * @return the pointer to the filled buffer or NULL in case of other errors */ char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt); diff --git a/FFmpeg/include/libavutil/version.h b/FFmpeg/include/libavutil/version.h index 5d69f445..610e0508 100644 --- a/FFmpeg/include/libavutil/version.h +++ b/FFmpeg/include/libavutil/version.h @@ -78,9 +78,9 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 60 -#define LIBAVUTIL_VERSION_MINOR 26 -#define LIBAVUTIL_VERSION_MICRO 100 +#define LIBAVUTIL_VERSION_MAJOR 61 +#define LIBAVUTIL_VERSION_MINOR 1 +#define LIBAVUTIL_VERSION_MICRO 101 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ @@ -105,14 +105,9 @@ * @{ */ -#define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_RISCV_FD_ZBA (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_VULKAN_FIXED_QUEUES (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_OPT_INT_LIST (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_OPT_PTR (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 61) -#define FF_API_ASSERT_FPU (LIBAVUTIL_VERSION_MAJOR < 61) +#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 62) +#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 62) +#define FF_API_ASSERT_FPU (LIBAVUTIL_VERSION_MAJOR < 62) #define FF_API_VULKAN_SYNC_QUEUES (LIBAVUTIL_VERSION_MAJOR < 62) /** diff --git a/FFmpeg/include/libswresample/version.h b/FFmpeg/include/libswresample/version.h index d1795b55..04b86446 100644 --- a/FFmpeg/include/libswresample/version.h +++ b/FFmpeg/include/libswresample/version.h @@ -30,8 +30,8 @@ #include "version_major.h" -#define LIBSWRESAMPLE_VERSION_MINOR 3 -#define LIBSWRESAMPLE_VERSION_MICRO 100 +#define LIBSWRESAMPLE_VERSION_MINOR 1 +#define LIBSWRESAMPLE_VERSION_MICRO 101 #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ LIBSWRESAMPLE_VERSION_MINOR, \ diff --git a/FFmpeg/include/libswresample/version_major.h b/FFmpeg/include/libswresample/version_major.h index 4e0bc0ab..0dc51de3 100644 --- a/FFmpeg/include/libswresample/version_major.h +++ b/FFmpeg/include/libswresample/version_major.h @@ -26,6 +26,6 @@ * Libswresample version macros */ -#define LIBSWRESAMPLE_VERSION_MAJOR 6 +#define LIBSWRESAMPLE_VERSION_MAJOR 7 #endif /* SWRESAMPLE_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libswscale/swscale.h b/FFmpeg/include/libswscale/swscale.h index 1cfd4068..c913e769 100644 --- a/FFmpeg/include/libswscale/swscale.h +++ b/FFmpeg/include/libswscale/swscale.h @@ -93,22 +93,42 @@ typedef enum SwsAlphaBlend { SWS_ALPHA_BLEND_MAX_ENUM = 0x7FFFFFFF, /* force size to 32 bits, not a valid blend mode */ } SwsAlphaBlend; -typedef enum SwsFlags { - /** - * Scaler selection options. Only one may be active at a time. - */ - SWS_FAST_BILINEAR = 1 << 0, ///< fast bilinear filtering - SWS_BILINEAR = 1 << 1, ///< bilinear filtering - SWS_BICUBIC = 1 << 2, ///< 2-tap cubic B-spline - SWS_X = 1 << 3, ///< experimental - SWS_POINT = 1 << 4, ///< nearest neighbor - SWS_AREA = 1 << 5, ///< area averaging - SWS_BICUBLIN = 1 << 6, ///< bicubic luma, bilinear chroma - SWS_GAUSS = 1 << 7, ///< gaussian approximation - SWS_SINC = 1 << 8, ///< unwindowed sinc - SWS_LANCZOS = 1 << 9, ///< 3-tap sinc/sinc - SWS_SPLINE = 1 << 10, ///< cubic Keys spline +typedef enum SwsScaler { + SWS_SCALE_AUTO = 0, + SWS_SCALE_BILINEAR, ///< bilinear filtering + SWS_SCALE_BICUBIC, ///< 2-tap cubic BC-spline + SWS_SCALE_POINT, ///< nearest neighbor (point sampling) + SWS_SCALE_AREA, ///< area averaging + SWS_SCALE_GAUSSIAN, ///< 2-tap gaussian approximation + SWS_SCALE_SINC, ///< unwindowed sinc + SWS_SCALE_LANCZOS, ///< 3-tap sinc/sinc + SWS_SCALE_SPLINE, ///< unwindowned natural cubic spline + SWS_SCALE_NB, ///< not part of the ABI + SWS_SCALE_MAX_ENUM = 0x7FFFFFFF, ///< force size to 32 bits, not a valid filter type +} SwsScaler; + +typedef enum SwsBackend { + /* Stable backends */ + SWS_BACKEND_LEGACY = (1 << 0), ///< Legacy bespoke format-specific code + SWS_BACKEND_STABLE = SWS_BACKEND_LEGACY, + + /* Unstable backends (auto-selected only if SWS_UNSTABLE is enabled) */ + SWS_BACKEND_C = (1 << 1), ///< Template-based C reference implementation + SWS_BACKEND_MEMCPY = (1 << 2), ///< Fast path using libc memcpy() / memset() + SWS_BACKEND_X86 = (1 << 3), ///< Chained x86 SIMD kernels + SWS_BACKEND_AARCH64 = (1 << 4), ///< Chained AArch64 NEON kernels + SWS_BACKEND_SPIRV = (1 << 5), ///< Vulkan SPIR-V backend + SWS_BACKEND_UNSTABLE = SWS_BACKEND_C | + SWS_BACKEND_MEMCPY | + SWS_BACKEND_X86 | + SWS_BACKEND_AARCH64 | + SWS_BACKEND_SPIRV, + + SWS_BACKEND_ALL = SWS_BACKEND_STABLE | SWS_BACKEND_UNSTABLE, + SWS_BACKEND_MAX_ENUM = 0x7FFFFFFF, ///< force size to 32 bits, not a valid backend +} SwsBackend; +typedef enum SwsFlags { /** * Return an error on underspecified conversions. Without this flag, * unspecified fields are defaulted to sensible values. @@ -158,9 +178,9 @@ typedef enum SwsFlags { SWS_BITEXACT = 1 << 19, /** - * Allow using experimental new code paths. This may be faster, slower, - * or produce different output, with semantics subject to change at any - * point in time. For testing and debugging purposes only. + * Allow/prefer using experimental new code paths. This may be faster, + * slower, or produce different output, with semantics subject to change + * at any point in time. For testing and debugging purposes only. */ SWS_UNSTABLE = 1 << 20, @@ -169,6 +189,22 @@ typedef enum SwsFlags { */ SWS_DIRECT_BGR = 1 << 15, ///< This flag has no effect SWS_ERROR_DIFFUSION = 1 << 23, ///< Set `SwsContext.dither` instead + + /** + * Scaler selection options. Only one may be active at a time. + * Deprecated in favor of `SwsContext.scaler`. + */ + SWS_FAST_BILINEAR = 1 << 0, ///< fast bilinear filtering + SWS_BILINEAR = 1 << 1, ///< bilinear filtering + SWS_BICUBIC = 1 << 2, ///< 2-tap cubic B-spline + SWS_X = 1 << 3, ///< experimental + SWS_POINT = 1 << 4, ///< nearest neighbor + SWS_AREA = 1 << 5, ///< area averaging + SWS_BICUBLIN = 1 << 6, ///< bicubic luma, bilinear chroma + SWS_GAUSS = 1 << 7, ///< gaussian approximation + SWS_SINC = 1 << 8, ///< unwindowed sinc + SWS_LANCZOS = 1 << 9, ///< 3-tap sinc/sinc + SWS_SPLINE = 1 << 10, ///< unwindowed natural cubic spline } SwsFlags; typedef enum SwsIntent { @@ -204,7 +240,8 @@ typedef struct SwsContext { /** * Extra parameters for fine-tuning certain scalers. */ - double scaler_params[2]; +#define SWS_NUM_SCALER_PARAMS 2 + double scaler_params[SWS_NUM_SCALER_PARAMS]; /** * How many threads to use for processing, or 0 for automatic selection. @@ -248,6 +285,32 @@ typedef struct SwsContext { */ int intent; + /** + * Scaling filter. If set to something other than SWS_SCALE_AUTO, this will + * override the filter implied by `SwsContext.flags`. + * + * Note: Does not affect the legacy (stateful) API. + */ + SwsScaler scaler; + + /** + * Scaler used specifically for up/downsampling subsampled (chroma) planes. + * If set to something other than SWS_SCALE_AUTO, this will override the + * filter implied by `SwsContext.scaler`. Otherwise, the same filter + * will be used for both main scaling and chroma subsampling. + */ + SwsScaler scaler_sub; + + /** + * Bitmask of SWS_BACKEND_*. If non-zero, this will restrict the available + * backends to the specified set. If left as zero, a default set of + * backends will be selected automatically (based on SWS_UNSTABLE). + * + * Note: This is only relevant for the new API (sws_scale_frame()). The + * stateful legacy API always implies SWS_BACKEND_LEGACY. + */ + SwsBackend backends; + /* Remember to add new fields to graph.c:opts_equal() */ } SwsContext; @@ -267,7 +330,8 @@ void sws_free_context(SwsContext **ctx); ***************************/ /** - * Test if a given (software) pixel format is supported. + * Test if a given (software) pixel format is supported by any backend, + * excluding unstable backends. * * @param output If 0, test if compatible with the source/input frame; * otherwise, with the destination/output frame. @@ -278,7 +342,8 @@ void sws_free_context(SwsContext **ctx); int sws_test_format(enum AVPixelFormat format, int output); /** - * Test if a given hardware pixel format is supported. + * Test if a given hardware pixel format is supported by any backend, + * excluding unstable backends. * * @param format The hardware format to check, or AV_PIX_FMT_NONE. * @@ -373,6 +438,14 @@ int sws_is_noop(const AVFrame *dst, const AVFrame *src); */ int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src); +/** + * Filter kernel cut-off value. Values below this (absolute) magnitude + * are cut off from the main filter kernel. Note that the window is + * always adjusted to the new filter radius, so there will never be + * any spectral leakage (for suitably windowed filters). + */ +#define SWS_MAX_REDUCE_CUTOFF 0.002 + /************************* * Legacy (stateful) API * *************************/ @@ -382,8 +455,6 @@ int sws_scale_frame(SwsContext *c, AVFrame *dst, const AVFrame *src); #define SWS_PARAM_DEFAULT 123456 -#define SWS_MAX_REDUCE_CUTOFF 0.002 - #define SWS_CS_ITU709 1 #define SWS_CS_FCC 4 #define SWS_CS_ITU601 5 diff --git a/FFmpeg/include/libswscale/version.h b/FFmpeg/include/libswscale/version.h index c13db31c..2eba6491 100644 --- a/FFmpeg/include/libswscale/version.h +++ b/FFmpeg/include/libswscale/version.h @@ -28,8 +28,8 @@ #include "version_major.h" -#define LIBSWSCALE_VERSION_MINOR 5 -#define LIBSWSCALE_VERSION_MICRO 100 +#define LIBSWSCALE_VERSION_MINOR 1 +#define LIBSWSCALE_VERSION_MICRO 101 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ LIBSWSCALE_VERSION_MINOR, \ diff --git a/FFmpeg/include/libswscale/version_major.h b/FFmpeg/include/libswscale/version_major.h index 0dc50792..5666f177 100644 --- a/FFmpeg/include/libswscale/version_major.h +++ b/FFmpeg/include/libswscale/version_major.h @@ -24,7 +24,7 @@ * swscale version macros */ -#define LIBSWSCALE_VERSION_MAJOR 9 +#define LIBSWSCALE_VERSION_MAJOR 10 /** * FF_API_* defines may be placed below to indicate public API that will be diff --git a/README.md b/README.md index 7fd74f3e..e91abd12 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ FFmpeg auto generated unsafe bindings for C#/.NET and Mono. The basic example of the library usage: video decoding, conversion and frame extraction to jpeg is included in ```FFmpeg.AutoGen.Example``` project. For the more sophisticated operations please refer to offical [ffmpeg Documentation](https://www.ffmpeg.org/documentation.html) expecially API section of it. -Nuget packages version uses [semantic versioning](https://semver.org/) and in sync with MAJOR and MINOR version of FFmpeg as PATCH incremets does not changing API. +Nuget packages version uses [semantic versioning](https://semver.org/) and is in sync with the FFmpeg release the bindings are generated from, e.g. package `9.0.1` targets FFmpeg 9.0.1. - on Windows: The x64 libraries source from [CODEX FFMPEG](https://www.gyan.dev/ffmpeg/builds/).