diff --git a/Directory.Build.props b/Directory.Build.props index ee449a07..dfd9a155 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ $(AssemblyName) - 5.1.2.1 + 6.0.0 Ruslan Balanukhin Rationale One FFmpeg.AutoGen diff --git a/FFmpeg.AutoGen.Abstractions/FFmpeg.AutoGen.Abstractions.csproj b/FFmpeg.AutoGen.Abstractions/FFmpeg.AutoGen.Abstractions.csproj index c1a1fda8..3c9c597f 100644 --- a/FFmpeg.AutoGen.Abstractions/FFmpeg.AutoGen.Abstractions.csproj +++ b/FFmpeg.AutoGen.Abstractions/FFmpeg.AutoGen.Abstractions.csproj @@ -1,7 +1,7 @@  - netstandard2.1;netstandard2.0;net45 + netstandard2.1;netstandard2.0 FFmpeg auto generated unsafe bindings for C#/.NET and Mono. An abstraction API has been created specifically for use in .NET MAUI scenarios. This API can be utilized in conjunction with either the FFmpeg.AutoGen.Bindings.DynamicallyLinked, FFmpeg.AutoGen.Bindings.DynamicallyLoaded or FFmpeg.AutoGen.Bindings.StaticallyLinked package. diff --git a/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs index 1e63bb6b..0d1fb612 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Delegates.g.cs @@ -255,14 +255,6 @@ public unsafe struct AVFilter_activate_func public static implicit operator AVFilter_activate_func(AVFilter_activate func) => new AVFilter_activate_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; } -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVFilter_init_dict (AVFilterContext* @ctx, AVDictionary** @options); -public unsafe struct AVFilter_init_dict_func -{ - public IntPtr Pointer; - public static implicit operator AVFilter_init_dict_func(AVFilter_init_dict func) => new AVFilter_init_dict_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public unsafe delegate int AVFilter_init (AVFilterContext* @ctx); public unsafe struct AVFilter_init_func @@ -601,102 +593,6 @@ public unsafe struct AVIOInterruptCB_callback_func public static implicit operator AVIOInterruptCB_callback_func(AVIOInterruptCB_callback func) => new AVIOInterruptCB_callback_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; } -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_check_bitstream (AVFormatContext* @s, AVStream* @st, AVPacket* @pkt); -public unsafe struct AVOutputFormat_check_bitstream_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_check_bitstream_func(AVOutputFormat_check_bitstream func) => new AVOutputFormat_check_bitstream_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_control_message (AVFormatContext* @s, int @type, void* @data, ulong @data_size); -public unsafe struct AVOutputFormat_control_message_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_control_message_func(AVOutputFormat_control_message func) => new AVOutputFormat_control_message_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate void AVOutputFormat_deinit (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_deinit_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_deinit_func(AVOutputFormat_deinit func) => new AVOutputFormat_deinit_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_get_device_list (AVFormatContext* @s, AVDeviceInfoList* @device_list); -public unsafe struct AVOutputFormat_get_device_list_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_get_device_list_func(AVOutputFormat_get_device_list func) => new AVOutputFormat_get_device_list_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate void AVOutputFormat_get_output_timestamp (AVFormatContext* @s, int @stream, long* @dts, long* @wall); -public unsafe struct AVOutputFormat_get_output_timestamp_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_get_output_timestamp_func(AVOutputFormat_get_output_timestamp func) => new AVOutputFormat_get_output_timestamp_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_init (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_init_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_init_func(AVOutputFormat_init func) => new AVOutputFormat_init_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_interleave_packet (AVFormatContext* @s, AVPacket* @pkt, int @flush, int @has_packet); -public unsafe struct AVOutputFormat_interleave_packet_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_interleave_packet_func(AVOutputFormat_interleave_packet func) => new AVOutputFormat_interleave_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_query_codec (AVCodecID @id, int @std_compliance); -public unsafe struct AVOutputFormat_query_codec_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_query_codec_func(AVOutputFormat_query_codec func) => new AVOutputFormat_query_codec_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_header (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_write_header_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_header_func(AVOutputFormat_write_header func) => new AVOutputFormat_write_header_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_packet (AVFormatContext* @p0, AVPacket* @pkt); -public unsafe struct AVOutputFormat_write_packet_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_packet_func(AVOutputFormat_write_packet func) => new AVOutputFormat_write_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_trailer (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_write_trailer_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_trailer_func(AVOutputFormat_write_trailer func) => new AVOutputFormat_write_trailer_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_uncoded_frame (AVFormatContext* @p0, int @stream_index, AVFrame** @frame, uint @flags); -public unsafe struct AVOutputFormat_write_uncoded_frame_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_uncoded_frame_func(AVOutputFormat_write_uncoded_frame func) => new AVOutputFormat_write_uncoded_frame_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public unsafe delegate int func (AVFilterContext* @ctx, void* @arg, int @jobnr, int @nb_jobs); public unsafe struct func_func diff --git a/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs index ea3a39f1..25077e32 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Enums.g.cs @@ -55,7 +55,7 @@ public enum AVAudioServiceType : int @AV_AUDIO_SERVICE_TYPE_NB = 9, } -/// @{ +/// Audio channel layout utility functions public enum AVChannel : int { @AV_CHAN_NONE = -1, @@ -429,6 +429,10 @@ public enum AVCodecID : int @AV_CODEC_ID_JPEGXL = 259, @AV_CODEC_ID_QOI = 260, @AV_CODEC_ID_PHM = 261, + @AV_CODEC_ID_RADIANCE_HDR = 262, + @AV_CODEC_ID_WBMP = 263, + @AV_CODEC_ID_MEDIA100 = 264, + @AV_CODEC_ID_VQC = 265, /// A dummy id pointing at the start of audio codecs @AV_CODEC_ID_FIRST_AUDIO = 65536, @AV_CODEC_ID_PCM_S16LE = 65536, @@ -519,6 +523,7 @@ public enum AVCodecID : int @AV_CODEC_ID_ADPCM_IMA_CUNNING = 69680, @AV_CODEC_ID_ADPCM_IMA_MOFLEX = 69681, @AV_CODEC_ID_ADPCM_IMA_ACORN = 69682, + @AV_CODEC_ID_ADPCM_XMD = 69683, @AV_CODEC_ID_AMR_NB = 73728, @AV_CODEC_ID_AMR_WB = 73729, @AV_CODEC_ID_RA_144 = 77824, @@ -530,6 +535,8 @@ public enum AVCodecID : int @AV_CODEC_ID_SDX2_DPCM = 81924, @AV_CODEC_ID_GREMLIN_DPCM = 81925, @AV_CODEC_ID_DERF_DPCM = 81926, + @AV_CODEC_ID_WADY_DPCM = 81927, + @AV_CODEC_ID_CBD2_DPCM = 81928, @AV_CODEC_ID_MP2 = 86016, /// preferred ID for decoding MPEG audio layer 1, 2 or 3 @AV_CODEC_ID_MP3 = 86017, @@ -629,6 +636,12 @@ public enum AVCodecID : int @AV_CODEC_ID_FASTAUDIO = 86110, @AV_CODEC_ID_MSNSIREN = 86111, @AV_CODEC_ID_DFPWM = 86112, + @AV_CODEC_ID_BONK = 86113, + @AV_CODEC_ID_MISC4 = 86114, + @AV_CODEC_ID_APAC = 86115, + @AV_CODEC_ID_FTR = 86116, + @AV_CODEC_ID_WAVARC = 86117, + @AV_CODEC_ID_RKA = 86118, /// A dummy ID pointing at the start of subtitle codecs. @AV_CODEC_ID_FIRST_SUBTITLE = 94208, @AV_CODEC_ID_DVD_SUBTITLE = 94208, @@ -682,6 +695,10 @@ public enum AVCodecID : int @AV_CODEC_ID_FFMETADATA = 135168, /// Passthrough codec, AVFrames wrapped in AVPacket @AV_CODEC_ID_WRAPPED_AVFRAME = 135169, + /// Dummy null video codec, useful mainly for development and debugging. Null encoder/decoder discard all input and never return any output. + @AV_CODEC_ID_VNULL = 135170, + /// Dummy null audio codec, useful mainly for development and debugging. Null encoder/decoder discard all input and never return any output. + @AV_CODEC_ID_ANULL = 135171, } /// Chromaticity coordinates of the source primaries. These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273. @@ -866,13 +883,18 @@ public enum AVDurationEstimationMethod : int @AVFMT_DURATION_FROM_BITRATE = 2, } +/// @{ public enum AVFieldOrder : int { @AV_FIELD_UNKNOWN = 0, @AV_FIELD_PROGRESSIVE = 1, + /// Top coded_first, top displayed first @AV_FIELD_TT = 2, + /// Bottom coded first, bottom displayed first @AV_FIELD_BB = 3, + /// Top coded first, bottom displayed first @AV_FIELD_TB = 4, + /// Bottom coded first, top displayed first @AV_FIELD_BT = 5, } @@ -942,6 +964,8 @@ public enum AVFrameSideDataType : int @AV_FRAME_DATA_DOVI_METADATA = 24, /// HDR Vivid dynamic metadata associated with a video frame. The payload is an AVDynamicHDRVivid type and contains information for color volume transform - CUVA 005.1-2021. @AV_FRAME_DATA_DYNAMIC_HDR_VIVID = 25, + /// Ambient viewing environment metadata, as defined by H.274. + @AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT = 26, } /// Option for overlapping elliptical pixel selectors in an image. @@ -1137,9 +1161,13 @@ public enum AVPacketSideDataType : int /// @{ public enum AVPictureStructure : int { + /// unknown @AV_PICTURE_STRUCTURE_UNKNOWN = 0, + /// coded as top field @AV_PICTURE_STRUCTURE_TOP_FIELD = 1, + /// coded as bottom field @AV_PICTURE_STRUCTURE_BOTTOM_FIELD = 2, + /// coded as frame @AV_PICTURE_STRUCTURE_FRAME = 3, } @@ -1585,8 +1613,40 @@ public enum AVPixelFormat : int @AV_PIX_FMT_P416BE = 204, /// interleaved chroma YUV 4:4:4, 48bpp, little-endian @AV_PIX_FMT_P416LE = 205, + /// packed VUYA 4:4:4, 32bpp, VUYAVUYA... + @AV_PIX_FMT_VUYA = 206, + /// IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian + @AV_PIX_FMT_RGBAF16BE = 207, + /// IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian + @AV_PIX_FMT_RGBAF16LE = 208, + /// packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined + @AV_PIX_FMT_VUYX = 209, + /// like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian + @AV_PIX_FMT_P012LE = 210, + /// like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian + @AV_PIX_FMT_P012BE = 211, + /// packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, big-endian + @AV_PIX_FMT_Y212BE = 212, + /// packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, little-endian + @AV_PIX_FMT_Y212LE = 213, + /// packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel is left undefined + @AV_PIX_FMT_XV30BE = 214, + /// packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channel is left undefined + @AV_PIX_FMT_XV30LE = 215, + /// packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian, variant of Y412 where alpha channel is left undefined + @AV_PIX_FMT_XV36BE = 216, + /// packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian, variant of Y412 where alpha channel is left undefined + @AV_PIX_FMT_XV36LE = 217, + /// IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian + @AV_PIX_FMT_RGBF32BE = 218, + /// IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian + @AV_PIX_FMT_RGBF32LE = 219, + /// IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian + @AV_PIX_FMT_RGBAF32BE = 220, + /// IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian + @AV_PIX_FMT_RGBAF32LE = 221, /// number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions - @AV_PIX_FMT_NB = 206, + @AV_PIX_FMT_NB = 222, } /// Rounding methods. diff --git a/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs index cf87a9e1..0a2e6462 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Structs.g.cs @@ -16,21 +16,6 @@ public unsafe partial struct _iobuf public void* @_Placeholder; } -/// Deprecated and unused struct to use for initializing an abuffersink context. -public unsafe partial struct AVABufferSinkParams -{ - /// list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE - public AVSampleFormat* @sample_fmts; - /// list of allowed channel layouts, terminated by -1 - public long* @channel_layouts; - /// list of allowed channel counts, terminated by -1 - public int* @channel_counts; - /// if not 0, accept any channel count or layout - public int @all_channel_counts; - /// list of allowed sample rates, terminated by -1 - public int* @sample_rates; -} - public unsafe partial struct AVBitStreamFilter { public byte* @name; @@ -69,13 +54,6 @@ public unsafe partial struct AVBufferRef public ulong @size; } -/// Deprecated and unused struct to use for initializing a buffersink context. -public unsafe partial struct AVBufferSinkParams -{ - /// list of allowed pixel formats, terminated by AV_PIX_FMT_NONE - public AVPixelFormat* @pixel_fmts; -} - /// This structure contains the parameters describing the frames that will be passed to this filter. public unsafe partial struct AVBufferSrcParameters { @@ -358,6 +336,7 @@ public unsafe partial struct AVCodecContext /// Number of samples per channel in an audio frame. public int @frame_size; /// Frame counter, set by libavcodec. + [Obsolete("use frame_num instead")] public int @frame_number; /// number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs. public int @block_align; @@ -408,19 +387,20 @@ public unsafe partial struct AVCodecContext public byte* @stats_in; /// Work around bugs in encoders which sometimes cannot be detected automatically. - encoding: Set by user - decoding: Set by user public int @workaround_bugs; - /// strictly follow the standard (MPEG-4, ...). - encoding: Set by user. - decoding: Set by user. Setting this to STRICT or higher means the encoder and decoder will generally do stupid things, whereas setting it to unofficial or lower will mean the encoder might produce output that is not supported by all spec-compliant decoders. Decoders don't differentiate between normal, unofficial and experimental (that is, they always try to decode things when they can) unless they are explicitly asked to behave stupidly (=strictly conform to the specs) + /// strictly follow the standard (MPEG-4, ...). - encoding: Set by user. - decoding: Set by user. Setting this to STRICT or higher means the encoder and decoder will generally do stupid things, whereas setting it to unofficial or lower will mean the encoder might produce output that is not supported by all spec-compliant decoders. Decoders don't differentiate between normal, unofficial and experimental (that is, they always try to decode things when they can) unless they are explicitly asked to behave stupidly (=strictly conform to the specs) This may only be set to one of the FF_COMPLIANCE_* values in defs.h. public int @strict_std_compliance; /// error concealment flags - encoding: unused - decoding: Set by user. public int @error_concealment; /// debug - encoding: Set by user. - decoding: Set by user. public int @debug; - /// Error recognition; may misdetect some more or less valid parts as errors. - encoding: Set by user. - decoding: Set by user. + /// Error recognition; may misdetect some more or less valid parts as errors. This is a bitfield of the AV_EF_* values defined in defs.h. public int @err_recognition; /// opaque 64-bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque - encoding: Set by libavcodec to the reordered_opaque of the input frame corresponding to the last returned packet. Only supported by encoders with the AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability. - decoding: Set by user. + [Obsolete("Use AV_CODEC_FLAG_COPY_OPAQUE instead")] public long @reordered_opaque; /// Hardware accelerator in use - encoding: unused. - decoding: Set by libavcodec public AVHWAccel* @hwaccel; - /// Hardware accelerator context. For some hardware accelerators, a global context needs to be provided by the user. In that case, this holds display-dependent data FFmpeg cannot instantiate itself. Please refer to the FFmpeg HW accelerator documentation to know how to fill this. - encoding: unused - decoding: Set by user + /// Legacy hardware accelerator context. public void* @hwaccel_context; /// error - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR. - decoding: unused public ulong8 @error; @@ -440,9 +420,6 @@ public unsafe partial struct AVCodecContext public int @thread_type; /// Which multithreading methods are in use by the codec. - encoding: Set by libavcodec. - decoding: Set by libavcodec. public int @active_thread_type; - /// Set by the client if its custom get_buffer() callback can be called synchronously from another thread, which allows faster multithreaded decoding. draw_horiz_band() will be called from other threads regardless of this setting. Ignored if the default get_buffer() is used. - encoding: Set by user. - decoding: Set by user. - [Obsolete("the custom get_buffer2() callback should always be thread-safe. Thread-unsafe get_buffer2() implementations will be invalid starting with LIBAVCODEC_VERSION_MAJOR=60; in other words, libavcodec will behave as if this field was always set to 1. Callers that want to be forward compatible with future libavcodec versions should wrap access to this field in #if LIBAVCODEC_VERSION_MAJOR < 60")] - public int @thread_safe_callbacks; /// The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. public AVCodecContext_execute_func @execute; /// The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. @@ -488,8 +465,6 @@ public unsafe partial struct AVCodecContext public int @skip_alpha; /// Number of samples to skip after a discontinuity - decoding: unused - encoding: set by libavcodec public int @seek_preroll; - [Obsolete("unused")] - public int @debug_mv; /// custom intra quantization matrix - encoding: Set by user, can be NULL. - decoding: unused. public ushort* @chroma_intra_matrix; /// dump format separator. can be ", " or " " or anything else - encoding: Set by user. - decoding: Set by user. @@ -503,8 +478,6 @@ public unsafe partial struct AVCodecContext public int @nb_coded_side_data; /// A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames. The reference is set by the caller and afterwards owned (and freed) by libavcodec - it should never be read by the caller after being set. public AVBufferRef* @hw_frames_ctx; - [Obsolete("unused")] - public int @sub_text_format; /// 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. public int @trailing_padding; /// The number of pixels per image to maximally accept. @@ -526,6 +499,8 @@ public unsafe partial struct AVCodecContext public AVCodecContext_get_encode_buffer_func @get_encode_buffer; /// Audio channel layout. - encoding: must be set by the caller, to one of AVCodec.ch_layouts. - decoding: may be set by the caller if known e.g. from the container. The decoder can then override during decoding as needed. public AVChannelLayout @ch_layout; + /// Frame counter, set by libavcodec. + public long @frame_num; } /// This struct describes the properties of a single codec described by an AVCodecID. @@ -778,24 +753,6 @@ public unsafe partial struct AVD3D11VAFramesContext public AVD3D11FrameDescriptor* @texture_infos; } -/// Structure describes device capabilities. -public unsafe partial struct AVDeviceCapabilitiesQuery -{ - public AVClass* @av_class; - public AVFormatContext* @device_context; - public AVCodecID @codec; - public AVSampleFormat @sample_format; - public AVPixelFormat @pixel_format; - public int @sample_rate; - public int @channels; - public long @channel_layout; - public int @window_width; - public int @window_height; - public int @frame_width; - public int @frame_height; - public AVRational @fps; -} - /// Structure describes basic parameters of the device. public unsafe partial struct AVDeviceInfo { @@ -832,6 +789,7 @@ public unsafe partial struct AVDeviceRect public int @height; } +/// @} public unsafe partial struct AVDictionaryEntry { public byte* @key; @@ -912,8 +870,6 @@ public unsafe partial struct AVFilter public AVFilter_preinit_func @preinit; /// Filter initialization function. public AVFilter_init_func @init; - /// Should be set instead of AVFilter.init "init" by the filters that want to pass a dictionary of AVOptions to nested contexts that are allocated during init. - public AVFilter_init_dict_func @init_dict; /// Filter uninitialization function. public AVFilter_uninit_func @uninit; public AVFilter_formats @formats; @@ -948,6 +904,13 @@ public unsafe partial struct AVFilter_formats public AVSampleFormat @sample_fmt; } +/// A filterchain is a list of filter specifications. +public unsafe partial struct AVFilterChain +{ + public AVFilterParams** @filters; + public ulong @nb_filters; +} + /// An instance of a filter public unsafe partial struct AVFilterContext { @@ -1032,6 +995,18 @@ public unsafe partial struct AVFilterGraph public uint @disable_auto_convert; } +/// A parsed representation of a filtergraph segment. +public unsafe partial struct AVFilterGraphSegment +{ + /// The filtergraph this segment is associated with. Set by avfilter_graph_segment_parse(). + public AVFilterGraph* @graph; + /// A list of filter chain contained in this segment. Set in avfilter_graph_segment_parse(). + public AVFilterChain** @chains; + public ulong @nb_chains; + /// A string containing a colon-separated list of key=value options applied to all scale filters in this segment. + public byte* @scale_sws_opts; +} + /// A linked-list of the inputs/outputs of the filter chain. public unsafe partial struct AVFilterInOut { @@ -1112,6 +1087,30 @@ public unsafe partial struct AVFilterLink public byte61440 @reserved; } +/// Parameters of a filter's input or output pad. +public unsafe partial struct AVFilterPadParams +{ + /// An av_malloc()'ed string containing the pad label. + public byte* @label; +} + +/// Parameters describing a filter to be created in a filtergraph. +public unsafe partial struct AVFilterParams +{ + /// The filter context. + public AVFilterContext* @filter; + /// Name of the AVFilter to be used. + public byte* @filter_name; + /// Name to be used for this filter instance. + public byte* @instance_name; + /// Options to be apllied to the filter. + public AVDictionary* @opts; + public AVFilterPadParams** @inputs; + public uint @nb_inputs; + public AVFilterPadParams** @outputs; + public uint @nb_outputs; +} + /// Format I/O context. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVFormatContext) must not be used outside libav*, use avformat_alloc_context() to create an AVFormatContext. public unsafe partial struct AVFormatContext { @@ -1243,6 +1242,7 @@ public unsafe partial struct AVFormatContext /// A callback for opening new IO streams. public AVFormatContext_io_open_func @io_open; /// A callback for closing the streams opened with AVFormatContext.io_open(). + [Obsolete("use io_close2")] public AVFormatContext_io_close_func @io_close; /// ',' separated list of disallowed protocols. - encoding: unused - decoding: set by user public byte* @protocol_blacklist; @@ -1302,6 +1302,7 @@ public unsafe partial struct AVFrame /// Tell user application that palette has changed from previous frame. public int @palette_has_changed; /// reordered opaque 64 bits (generally an integer or a double precision float PTS but can be anything). The user sets AVCodecContext.reordered_opaque to represent the input at that time, the decoder reorders values as needed and sets AVFrame.reordered_opaque to exactly one of the values provided by the user through AVCodecContext.reordered_opaque + [Obsolete("Use AV_CODEC_FLAG_COPY_OPAQUE instead")] public long @reordered_opaque; /// Sample rate of the audio data. public int @sample_rate; @@ -1330,6 +1331,7 @@ public unsafe partial struct AVFrame /// reordered pos from the last AVPacket that has been input into the decoder - encoding: unused - decoding: Read by user. public long @pkt_pos; /// duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown. - encoding: unused - decoding: Read by user. + [Obsolete("use duration instead")] public long @pkt_duration; /// metadata. - encoding: Set by user. - decoding: Set by libavcodec. public AVDictionary* @metadata; @@ -1353,6 +1355,8 @@ public unsafe partial struct AVFrame public AVBufferRef* @private_ref; /// Channel layout of the audio data. public AVChannelLayout @ch_layout; + /// Duration of the frame, in the same units as pts. 0 if unknown. + public long @duration; } /// Structure to hold side data for an AVFrame. @@ -1627,8 +1631,6 @@ public unsafe partial struct AVIOContext public AVIOContext_write_data_type_func @write_data_type; /// If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT, but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly small chunks of data returned from the callback). public int @ignore_boundary_point; - [Obsolete("field utilized privately by libavformat. For a public statistic of how many bytes were written out, see AVIOContext::bytes_written.")] - public long @written; /// Maximum reached position before a backward seek in the write buffer, used keeping track of already written data for a later flush. public byte* @buf_ptr_max; /// Read-only statistic of bytes read for this AVIOContext. @@ -1772,33 +1774,6 @@ public unsafe partial struct AVOutputFormat public AVCodecTag** @codec_tag; /// AVClass for the private context public AVClass* @priv_class; - /// *************************************************************** No fields below this line are part of the public API. They may not be used outside of libavformat and can be changed and removed at will. New public fields should be added right above. **************************************************************** - public int @priv_data_size; - /// Internal flags. See FF_FMT_FLAG_* in internal.h. - public int @flags_internal; - public AVOutputFormat_write_header_func @write_header; - /// Write a packet. If AVFMT_ALLOW_FLUSH is set in flags, pkt can be NULL in order to flush data buffered in the muxer. When flushing, return 0 if there still is more data to flush, or 1 if everything was flushed and there is no more buffered data. - public AVOutputFormat_write_packet_func @write_packet; - public AVOutputFormat_write_trailer_func @write_trailer; - /// A format-specific function for interleavement. If unset, packets will be interleaved by dts. - public AVOutputFormat_interleave_packet_func @interleave_packet; - /// Test if the given codec can be stored in this container. - public AVOutputFormat_query_codec_func @query_codec; - public AVOutputFormat_get_output_timestamp_func @get_output_timestamp; - /// Allows sending messages from application to device. - public AVOutputFormat_control_message_func @control_message; - /// Write an uncoded AVFrame. - public AVOutputFormat_write_uncoded_frame_func @write_uncoded_frame; - /// Returns device list with it properties. - public AVOutputFormat_get_device_list_func @get_device_list; - /// default data codec - public AVCodecID @data_codec; - /// Initialize format. May allocate data here, and set any AVFormatContext or AVStream parameters that need to be set before packets are sent. This method must not write output. - public AVOutputFormat_init_func @init; - /// Deinitialize format. If present, this is called whenever the muxer is being destroyed, regardless of whether or not the header has been written. - public AVOutputFormat_deinit_func @deinit; - /// Set up any necessary bitstream filtering and extract any extra data needed for the global header. - public AVOutputFormat_check_bitstream_func @check_bitstream; } /// This structure stores compressed data. It is typically exported by demuxers and then passed as input to decoders, or received as output from encoders and then passed to muxers. @@ -1950,10 +1925,14 @@ public unsafe partial struct AVRegionOfInterest /// Stream 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. sizeof(AVStream) must not be used outside libav*. public unsafe partial struct AVStream { + /// A class for avoptions. Set on stream creation. + public AVClass* @av_class; /// stream index in AVFormatContext public int @index; /// Format-specific stream ID. decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset public int @id; + /// Codec parameters associated with this stream. Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively. + public AVCodecParameters* @codecpar; public void* @priv_data; /// This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. public AVRational @time_base; @@ -1982,8 +1961,6 @@ public unsafe partial struct AVStream public int @event_flags; /// Real base framerate of the stream. This is the lowest framerate with which all timestamps can be represented accurately (it is the least common multiple of all framerates in the stream). Note, this value is just a guess! For example, if the time base is 1/90000 and all frames have either approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. public AVRational @r_frame_rate; - /// Codec parameters associated with this stream. Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively. - public AVCodecParameters* @codecpar; /// Number of bits in timestamps. Used for wrapping control. public int @pts_wrap_bits; } @@ -2484,6 +2461,7 @@ public unsafe partial struct AVAudioFifo { } +/// @} /// This struct is incomplete. public unsafe partial struct AVBPrint { diff --git a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs index 5319d7b1..99fa2387 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs @@ -5,10 +5,6 @@ namespace FFmpeg.AutoGen.Abstractions; public static unsafe partial class ffmpeg { - /// Create an AVABufferSinkParams structure. - [Obsolete()] - public static AVABufferSinkParams* av_abuffersink_params_alloc() => vectors.av_abuffersink_params_alloc(); - /// 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 public static int av_add_index_entry(AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags) => vectors.av_add_index_entry(@st, @pos, @timestamp, @size, @distance, @flags); @@ -127,6 +123,7 @@ public static unsafe partial class ffmpeg public static int av_bsf_get_null_filter(AVBSFContext** @bsf) => vectors.av_bsf_get_null_filter(@bsf); /// Prepare the filter for use, after all the parameters and options have been set. + /// a AVBSFContext previously allocated with av_bsf_alloc() public static int av_bsf_init(AVBSFContext* @ctx) => vectors.av_bsf_init(@ctx); /// Iterate over all registered bitstream filters. @@ -168,11 +165,13 @@ public static unsafe partial class ffmpeg public static int av_bsf_list_parse_str(string @str, AVBSFContext** @bsf) => vectors.av_bsf_list_parse_str(@str, @bsf); /// Retrieve a filtered packet. + /// 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. public static int av_bsf_receive_packet(AVBSFContext* @ctx, AVPacket* @pkt) => vectors.av_bsf_receive_packet(@ctx, @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. public static int av_bsf_send_packet(AVBSFContext* @ctx, AVPacket* @pkt) => vectors.av_bsf_send_packet(@ctx, @pkt); @@ -303,10 +302,6 @@ public static unsafe partial class ffmpeg public static int av_buffersink_get_w(AVFilterContext* @ctx) => vectors.av_buffersink_get_w(@ctx); - /// Create an AVBufferSinkParams structure. - [Obsolete()] - public static AVBufferSinkParams* av_buffersink_params_alloc() => vectors.av_buffersink_params_alloc(); - /// Set the frame size for an audio buffer sink. public static void av_buffersink_set_frame_size(AVFilterContext* @ctx, uint @frame_size) => vectors.av_buffersink_set_frame_size(@ctx, @frame_size); @@ -353,6 +348,7 @@ public static unsafe partial class ffmpeg /// Get a human readable string describing a given channel. /// pre-allocated buffer where to put the generated string /// 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. public static int av_channel_description(byte* @buf, ulong @buf_size, AVChannel @channel) => vectors.av_channel_description(@buf, @buf_size, @channel); @@ -365,11 +361,13 @@ public static unsafe partial class ffmpeg /// 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) public static AVChannel av_channel_layout_channel_from_index(AVChannelLayout* @channel_layout, uint @idx) => vectors.av_channel_layout_channel_from_index(@channel_layout, @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) public static AVChannel av_channel_layout_channel_from_string(AVChannelLayout* @channel_layout, string @name) => vectors.av_channel_layout_channel_from_string(@channel_layout, @name); @@ -391,6 +389,7 @@ public static unsafe partial class ffmpeg public static int av_channel_layout_copy(AVChannelLayout* @dst, AVChannelLayout* @src) => vectors.av_channel_layout_copy(@dst, @src); /// Get the default channel layout for a given number of channels. + /// the layout structure to be initialized /// number of channels public static void av_channel_layout_default(AVChannelLayout* @ch_layout, int @nb_channels) => vectors.av_channel_layout_default(@ch_layout, @nb_channels); @@ -423,11 +422,13 @@ public static unsafe partial class ffmpeg /// Get the index of a given channel in a channel layout. In case multiple channels are found, only the first match will be returned. /// 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. public static int av_channel_layout_index_from_channel(AVChannelLayout* @channel_layout, AVChannel @channel) => vectors.av_channel_layout_index_from_channel(@channel_layout, @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. public static int av_channel_layout_index_from_string(AVChannelLayout* @channel_layout, string @name) => vectors.av_channel_layout_index_from_string(@channel_layout, @name); @@ -449,12 +450,18 @@ public static unsafe partial class ffmpeg /// Get a human readable string in an abbreviated form describing a given channel. This is the inverse function of av_channel_from_string(). /// pre-allocated buffer where to put the generated string /// 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. public static int av_channel_name(byte* @buf, ulong @buf_size, AVChannel @channel) => vectors.av_channel_name(@buf, @buf_size, @channel); /// bprint variant of av_channel_name(). public static void av_channel_name_bprint(AVBPrint* @bp, AVChannel @channel_id) => vectors.av_channel_name_bprint(@bp, @channel_id); + /// Converts AVChromaLocation to swscale x/y chroma position. + /// horizontal chroma sample position + /// vertical chroma sample position + public static int av_chroma_location_enum_to_pos(int* @xpos, int* @ypos, AVChromaLocation @pos) => vectors.av_chroma_location_enum_to_pos(@xpos, @ypos, @pos); + /// Returns the AVChromaLocation value for name or an AVError if not found. /// the AVChromaLocation value for name or an AVError if not found. public static int av_chroma_location_from_name(string @name) => vectors.av_chroma_location_from_name(@name); @@ -463,6 +470,11 @@ public static unsafe partial class ffmpeg /// the name for provided chroma location or NULL if unknown. public static string av_chroma_location_name(AVChromaLocation @location) => vectors.av_chroma_location_name(@location); + /// Converts swscale x/y chroma position to AVChromaLocation. + /// horizontal chroma sample position + /// vertical chroma sample position + public static AVChromaLocation av_chroma_location_pos_to_enum(int @xpos, int @ypos) => vectors.av_chroma_location_pos_to_enum(@xpos, @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 @@ -526,6 +538,8 @@ public static unsafe partial class ffmpeg public static string av_color_transfer_name(AVColorTransferCharacteristic @transfer) => vectors.av_color_transfer_name(@transfer); /// Compare the remainders of two integer operands divided by a common divisor. + /// Operand + /// 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` public static long av_compare_mod(ulong @a, ulong @b, ulong @mod) => vectors.av_compare_mod(@a, @b, @mod); @@ -581,9 +595,9 @@ public static unsafe partial class ffmpeg public static AVInputFormat* av_demuxer_iterate(void** @opaque) => vectors.av_demuxer_iterate(@opaque); /// Copy entries from one AVDictionary struct into another. - /// pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst - /// pointer to source AVDictionary struct - /// flags to use when setting entries in *dst + /// Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL, this function will allocate a struct for you and put it in *dst + /// 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. public static int av_dict_copy(AVDictionary** @dst, AVDictionary* @src, int @flags) => vectors.av_dict_copy(@dst, @src, @flags); @@ -596,35 +610,40 @@ public static unsafe partial class ffmpeg public static void av_dict_free(AVDictionary** @m) => vectors.av_dict_free(@m); /// Get a dictionary entry with matching key. - /// matching key + /// Matching key /// 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 + /// 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 public static AVDictionaryEntry* av_dict_get(AVDictionary* @m, string @key, AVDictionaryEntry* @prev, int @flags) => vectors.av_dict_get(@m, @key, @prev, @flags); /// Get dictionary entries as a string. - /// dictionary + /// The dictionary /// Pointer to buffer that will be allocated with string containg entries. Buffer must be freed by the caller when is no longer needed. - /// character used to separate key from value - /// character used to separate two pairs from each other + /// Character used to separate key from value + /// Character used to separate two pairs from each other /// >= 0 on success, negative on error public static int av_dict_get_string(AVDictionary* @m, byte** @buffer, byte @key_val_sep, byte @pairs_sep) => vectors.av_dict_get_string(@m, @buffer, @key_val_sep, @pairs_sep); + /// Iterate over a dictionary + /// The dictionary to iterate over + /// Pointer to the previous AVDictionaryEntry, NULL initially + public static AVDictionaryEntry* av_dict_iterate(AVDictionary* @m, AVDictionaryEntry* @prev) => vectors.av_dict_iterate(@m, @prev); + /// Parse the key/value pairs list and add the parsed entries to a dictionary. - /// 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 - /// flags to use when adding to dictionary. AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL are ignored since the key/value tokens will always be duplicated. + /// 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 + /// 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 public static int av_dict_parse_string(AVDictionary** @pm, string @str, string @key_val_sep, string @pairs_sep, int @flags) => vectors.av_dict_parse_string(@pm, @str, @key_val_sep, @pairs_sep, @flags); /// Set the given entry in *pm, overwriting an existing entry. - /// pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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. + /// Pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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 public static int av_dict_set(AVDictionary** @pm, string @key, string @value, int @flags) => vectors.av_dict_set(@pm, @key, @value, @flags); - /// Convenience wrapper for av_dict_set that converts the value to a string and stores it. + /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. public static int av_dict_set_int(AVDictionary** @pm, string @key, long @value, int @flags) => vectors.av_dict_set_int(@pm, @key, @value, @flags); /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. @@ -702,12 +721,16 @@ public static unsafe partial class ffmpeg public static void* av_fast_realloc(void* @ptr, uint* @size, ulong @min_size) => vectors.av_fast_realloc(@ptr, @size, @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(). + /// path to the file + /// pointee is set to the mapped or allocated buffer + /// pointee is set to the size in bytes of the buffer /// 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 public static int av_file_map(string @filename, byte** @bufptr, ulong* @size, int @log_offset, void* @log_ctx) => vectors.av_file_map(@filename, @bufptr, @size, @log_offset, @log_ctx); /// 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() public static void av_file_unmap(byte* @bufptr, ulong @size) => vectors.av_file_unmap(@bufptr, @size); @@ -807,6 +830,7 @@ public static unsafe partial class ffmpeg public static int av_frame_get_buffer(AVFrame* @frame, int @align) => vectors.av_frame_get_buffer(@frame, @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. public static AVBufferRef* av_frame_get_plane_buffer(AVFrame* @frame, int @plane) => vectors.av_frame_get_plane_buffer(@frame, @plane); @@ -863,6 +887,8 @@ public static unsafe partial class ffmpeg public static void av_freep(void* @ptr) => vectors.av_freep(@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. public static long av_gcd(long @a, long @b) => vectors.av_gcd(@a, @b); @@ -905,6 +931,7 @@ public static unsafe partial class ffmpeg public static ulong av_get_channel_layout(string @name) => vectors.av_get_channel_layout(@name); /// Get the index of a channel in channel_layout. + /// channel layout bitset /// a channel layout describing exactly one channel which must be present in channel_layout. /// index of channel in channel_layout on success, a negative AVERROR on error. [Obsolete("use av_channel_layout_index_from_channel()")] @@ -917,6 +944,8 @@ public static unsafe partial class ffmpeg /// Return a description of a channel layout. If nb_channels is <= 0, it is guessed from the channel_layout. /// put here the string containing the channel layout /// size in bytes of the buffer + /// number of channels + /// channel layout bitset [Obsolete("use av_channel_layout_describe()")] public static void av_get_channel_layout_string(byte* @buf, int @buf_size, int @nb_channels, ulong @channel_layout) => vectors.av_get_channel_layout_string(@buf, @buf_size, @nb_channels, @channel_layout); @@ -925,11 +954,6 @@ public static unsafe partial class ffmpeg [Obsolete("use av_channel_name()")] public static string av_get_channel_name(ulong @channel) => vectors.av_get_channel_name(@channel); - /// Get the name of a colorspace. - /// a static string identifying the colorspace; can be NULL. - [Obsolete("use av_color_space_name()")] - public static string av_get_colorspace_name(AVColorSpace @val) => vectors.av_get_colorspace_name(@val); - /// 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. public static int av_get_cpu_flags() => vectors.av_get_cpu_flags(); @@ -969,7 +993,6 @@ public static unsafe partial class ffmpeg /// 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 - /// 0 if OK, AVERROR(ENOSYS) if the format does not support it Note: some formats or devices may not allow to measure dts and wall atomically. public static int av_get_output_timestamp(AVFormatContext* @s, int @stream, long* @dts, long* @wall) => vectors.av_get_output_timestamp(@s, @stream, @dts, @wall); /// Get the packed alternative form of the given sample format. @@ -1157,6 +1180,7 @@ public static unsafe partial class ffmpeg public static void* av_hwdevice_hwconfig_alloc(AVBufferRef* @device_ctx) => vectors.av_hwdevice_hwconfig_alloc(@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. public static AVHWDeviceType av_hwdevice_iterate_types(AVHWDeviceType @prev) => vectors.av_hwdevice_iterate_types(@prev); @@ -1171,6 +1195,7 @@ public static unsafe partial class ffmpeg /// Create and initialise an AVHWFramesContext as a mapping of another existing AVHWFramesContext on a different device. /// On success, a reference to the newly created AVHWFramesContext. + /// The AVPixelFormat for the derived context. /// A reference to the device to create the new AVHWFramesContext on. /// 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. @@ -1212,6 +1237,11 @@ public static unsafe partial class ffmpeg public static int av_hwframe_transfer_get_formats(AVBufferRef* @hwframe_ctx, AVHWFrameTransferDirection @dir, AVPixelFormat** @formats, int @flags) => vectors.av_hwframe_transfer_get_formats(@hwframe_ctx, @dir, @formats, @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]). + /// array to be filled with the pointer for each image plane + /// the array filled with the linesize for each plane + /// width of the image in pixels + /// height of the image in pixels + /// 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 public static int av_image_alloc(ref byte_ptr4 @pointers, ref int4 @linesizes, int @w, int @h, AVPixelFormat @pix_fmt, int @align) => vectors.av_image_alloc(ref @pointers, ref @linesizes, @w, @h, @pix_fmt, @align); @@ -1242,13 +1272,21 @@ public static unsafe partial class ffmpeg public static int av_image_check_size2(uint @w, uint @h, long @max_pixels, AVPixelFormat @pix_fmt, int @log_offset, void* @log_ctx) => vectors.av_image_check_size2(@w, @h, @max_pixels, @pix_fmt, @log_offset, @log_ctx); /// Copy image in src_data to dst_data. + /// destination image data buffer to copy to /// linesizes for the image in dst_data + /// source image data buffer to copy from /// linesizes for the image in src_data + /// the AVPixelFormat of the image + /// width of the image in pixels + /// height of the image in pixels public static void av_image_copy(ref byte_ptr4 @dst_data, ref int4 @dst_linesizes, in byte_ptr4 @src_data, in int4 @src_linesizes, AVPixelFormat @pix_fmt, int @width, int @height) => vectors.av_image_copy(ref @dst_data, ref @dst_linesizes, @src_data, @src_linesizes, @pix_fmt, @width, @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. + /// destination plane to copy to /// linesize for the image plane in dst + /// source plane to copy from /// linesize for the image plane in src + /// height (number of lines) of the plane public static void av_image_copy_plane(byte* @dst, int @dst_linesize, byte* @src, int @src_linesize, int @bytewidth, int @height) => vectors.av_image_copy_plane(@dst, @dst_linesize, @src, @src_linesize, @bytewidth, @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(). @@ -1292,22 +1330,29 @@ public static unsafe partial class ffmpeg /// Fill plane linesizes for an image with pixel format pix_fmt and width width. /// array to be filled with the linesize for each plane + /// the AVPixelFormat of the image + /// width of the image in pixels /// >= 0 in case of success, a negative error code otherwise public static int av_image_fill_linesizes(ref int4 @linesizes, AVPixelFormat @pix_fmt, int @width) => vectors.av_image_fill_linesizes(ref @linesizes, @pix_fmt, @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 public static void av_image_fill_max_pixsteps(ref int4 @max_pixsteps, ref int4 @max_pixstep_comps, AVPixFmtDescriptor* @pixdesc) => vectors.av_image_fill_max_pixsteps(ref @max_pixsteps, ref @max_pixstep_comps, @pixdesc); /// Fill plane sizes for an image with pixel format pix_fmt and height height. /// the array to be filled with the size of each image plane + /// the AVPixelFormat of the image + /// 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 public static int av_image_fill_plane_sizes(ref ulong4 @size, AVPixelFormat @pix_fmt, int @height, in long4 @linesizes) => vectors.av_image_fill_plane_sizes(ref @size, @pix_fmt, @height, @linesizes); /// Fill plane data pointers for an image with pixel format pix_fmt and height height. /// pointers array to be filled with the pointer for each image plane + /// the AVPixelFormat of the image + /// height of the image in pixels /// 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 @@ -1430,9 +1475,6 @@ public static unsafe partial class ffmpeg /// Pointer to the allocated block, or `NULL` if it cannot be allocated public static void* av_mallocz(ulong @size) => vectors.av_mallocz(@size); - [Obsolete("use av_calloc()")] - public static void* av_mallocz_array(ulong @nmemb, ulong @size) => vectors.av_mallocz_array(@nmemb, @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. public static AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc() => vectors.av_mastering_display_metadata_alloc(); @@ -1476,6 +1518,8 @@ public static unsafe partial class ffmpeg /// Find which of the two rationals is closer to another rational. /// Rational to be compared against + /// 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 public static int av_nearer_q(AVRational @q, AVRational @q1, AVRational @q2) => vectors.av_nearer_q(@q, @q1, @q2); @@ -2011,6 +2055,7 @@ public static unsafe partial class ffmpeg /// aligned size for audio buffer(s), may be NULL /// number of audio channels /// number of samples per channel + /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// >=0 on success or a negative error code on failure public static int av_samples_alloc(byte** @audio_data, int* @linesize, int @nb_channels, int @nb_samples, AVSampleFormat @sample_fmt, int @align) => vectors.av_samples_alloc(@audio_data, @linesize, @nb_channels, @nb_samples, @sample_fmt, @align); @@ -2085,6 +2130,8 @@ public static unsafe partial class ffmpeg public static void av_shrink_packet(AVPacket* @pkt, int @size) => vectors.av_shrink_packet(@pkt, @size); /// Multiply two `size_t` values checking for overflow. + /// Operand of multiplication + /// Operand of multiplication /// Pointer to the result of the operation /// 0 on success, AVERROR(EINVAL) on overflow public static int av_size_mult(ulong @a, ulong @b, ulong* @r) => vectors.av_size_mult(@a, @b, @r); @@ -2110,6 +2157,7 @@ public static unsafe partial class ffmpeg public static AVRational av_stream_get_codec_timebase(AVStream* @st) => vectors.av_stream_get_codec_timebase(@st); /// Returns the pts of the last muxed packet + its duration + [Obsolete()] public static long av_stream_get_end_pts(AVStream* @st) => vectors.av_stream_get_end_pts(@st); public static AVCodecParserContext* av_stream_get_parser(AVStream* @s) => vectors.av_stream_get_parser(@s); @@ -2339,6 +2387,7 @@ public static unsafe partial class ffmpeg /// Converts swscale x/y chroma position to AVChromaLocation. /// horizontal chroma sample position /// vertical chroma sample position + [Obsolete("Use av_chroma_location_pos_to_enum() instead.")] public static AVChromaLocation avcodec_chroma_pos_to_enum(int @xpos, int @ypos) => vectors.avcodec_chroma_pos_to_enum(@xpos, @ypos); /// Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext itself). @@ -2385,6 +2434,7 @@ public static unsafe partial class ffmpeg /// Converts AVChromaLocation to swscale x/y chroma position. /// horizontal chroma sample position /// vertical chroma sample position + [Obsolete("Use av_chroma_location_enum_to_pos() instead.")] public static int avcodec_enum_to_chroma_pos(int* @xpos, int* @ypos, AVChromaLocation @pos) => vectors.avcodec_enum_to_chroma_pos(@xpos, @ypos, @pos); /// Fill AVFrame audio data and linesize pointers. @@ -2434,9 +2484,6 @@ public static unsafe partial class ffmpeg /// Get the AVClass for AVCodecContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. public static AVClass* avcodec_get_class() => vectors.avcodec_get_class(); - [Obsolete("This function should not be used.")] - public static AVClass* avcodec_get_frame_class() => vectors.avcodec_get_frame_class(); - /// Retrieve supported hardware configurations for a codec. public static AVCodecHWConfig* avcodec_get_hw_config(AVCodec* @codec, int @index) => vectors.avcodec_get_hw_config(@codec, @index); @@ -2499,28 +2546,24 @@ public static unsafe partial class ffmpeg /// A name for the profile if found, NULL otherwise. public static string avcodec_profile_name(AVCodecID @codec_id, int @profile) => vectors.avcodec_profile_name(@codec_id, @profile); - /// Return decoded output data from a decoder. + /// 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 decoder. Note that the function will always call av_frame_unref(frame) before doing anything else. - /// 0: success, a frame was returned AVERROR(EAGAIN): output is not available in this state - user must try to send new input AVERROR_EOF: the decoder has been fully flushed, and there will be no more output frames AVERROR(EINVAL): codec not opened, or it is an encoder AVERROR_INPUT_CHANGED: current decoded frame has changed parameters with respect to first decoded frame. Applicable when flag AV_CODEC_FLAG_DROPCHANGED is set. other negative values: legitimate decoding errors + /// 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. public static int avcodec_receive_frame(AVCodecContext* @avctx, AVFrame* @frame) => vectors.avcodec_receive_frame(@avctx, @frame); /// 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): output is not available in the current state - user must try to send input AVERROR_EOF: the encoder has been fully flushed, and there will be no more output packets AVERROR(EINVAL): codec not opened, or it is a decoder other errors: legitimate encoding errors public static int avcodec_receive_packet(AVCodecContext* @avctx, AVPacket* @avpkt) => vectors.avcodec_receive_packet(@avctx, @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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_packet() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the encoder has been flushed, and no new frames can be sent to it AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate encoding errors public static int avcodec_send_frame(AVCodecContext* @avctx, AVFrame* @frame) => vectors.avcodec_send_frame(@avctx, @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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_frame() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the decoder has been flushed, and no new packets can be sent to it (also returned if more than 1 flush packet is sent) AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate decoding errors public static int avcodec_send_packet(AVCodecContext* @avctx, AVPacket* @avpkt) => vectors.avcodec_send_packet(@avctx, @avpkt); /// @} @@ -2537,20 +2580,6 @@ public static unsafe partial class ffmpeg /// >= 0 on success, negative on error. AVERROR(ENOSYS) when device doesn't implement handler of the message. public static int avdevice_app_to_dev_control_message(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size) => vectors.avdevice_app_to_dev_control_message(@s, @type, @data, @data_size); - /// Initialize capabilities probing API based on AVOption API. - /// Device capabilities data. Pointer to a NULL pointer must be passed. - /// Context of the device. - /// An AVDictionary filled with device-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. 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. - /// >= 0 on success, negative otherwise. - [Obsolete()] - public static int avdevice_capabilities_create(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options) => vectors.avdevice_capabilities_create(@caps, @s, @device_options); - - /// Free resources created by avdevice_capabilities_create() - /// Device capabilities data to be freed. - /// Context of the device. - [Obsolete()] - public static void avdevice_capabilities_free(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s) => vectors.avdevice_capabilities_free(@caps, @s); - /// Return the libavdevice build-time configuration. public static string avdevice_configuration() => vectors.avdevice_configuration(); @@ -2563,6 +2592,7 @@ public static unsafe partial class ffmpeg public static int avdevice_dev_to_app_control_message(AVFormatContext* @s, AVDevToAppMessageType @type, void* @data, ulong @data_size) => vectors.avdevice_dev_to_app_control_message(@s, @type, @data, @data_size); /// Convenient function to free result of avdevice_list_devices(). + /// device list to be freed. public static void avdevice_free_list_devices(AVDeviceInfoList** @device_list) => vectors.avdevice_free_list_devices(@device_list); /// Return the libavdevice license. @@ -2688,6 +2718,46 @@ public static unsafe partial class ffmpeg /// the return value of ff_request_frame(), or AVERROR_EOF if all links returned AVERROR_EOF public static int avfilter_graph_request_oldest(AVFilterGraph* @graph) => vectors.avfilter_graph_request_oldest(@graph); + /// Apply all filter/link descriptions from a graph segment to the associated filtergraph. + /// the filtergraph segment to process + /// reserved for future use, caller must set to 0 for now + /// passed to avfilter_graph_segment_link() + /// passed to avfilter_graph_segment_link() + public static int avfilter_graph_segment_apply(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => vectors.avfilter_graph_segment_apply(@seg, @flags, @inputs, @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 + public static int avfilter_graph_segment_apply_opts(AVFilterGraphSegment* @seg, int @flags) => vectors.avfilter_graph_segment_apply_opts(@seg, @flags); + + /// Create filters specified in a graph segment. + /// the filtergraph segment to process + /// reserved for future use, caller must set to 0 for now + public static int avfilter_graph_segment_create_filters(AVFilterGraphSegment* @seg, int @flags) => vectors.avfilter_graph_segment_create_filters(@seg, @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. + public static void avfilter_graph_segment_free(AVFilterGraphSegment** @seg) => vectors.avfilter_graph_segment_free(@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 + public static int avfilter_graph_segment_init(AVFilterGraphSegment* @seg, int @flags) => vectors.avfilter_graph_segment_init(@seg, @flags); + + /// Link filters in a graph segment. + /// the filtergraph segment to process + /// 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(). + public static int avfilter_graph_segment_link(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => vectors.avfilter_graph_segment_link(@seg, @flags, @inputs, @outputs); + + /// Parse a textual filtergraph description into an intermediate form. + /// Filter graph the parsed segment is associated with. Will only be used for logging and similar auxiliary purposes. The graph will not be actually modified by this function - the parsing results are instead stored in seg for further processing. + /// 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. + public static int avfilter_graph_segment_parse(AVFilterGraph* @graph, string @graph_str, int @flags, AVFilterGraphSegment** @seg) => vectors.avfilter_graph_segment_parse(@graph, @graph_str, @flags, @seg); + /// Send a command to one or more filter instances. /// the filter graph /// the filter(s) to which the command should be sent "all" sends to all filters otherwise it can be a filter or filter instance name which will send the command to all matching filters. @@ -2741,10 +2811,6 @@ public static unsafe partial class ffmpeg /// Free the link in *link, and set its pointer to NULL. public static void avfilter_link_free(AVFilterLink** @link) => vectors.avfilter_link_free(@link); - /// Get the number of elements in an AVFilter's inputs or outputs array. - [Obsolete("Use avfilter_filter_pad_count() instead.")] - public static int avfilter_pad_count(AVFilterPad* @pads) => vectors.avfilter_pad_count(@pads); - /// 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 @@ -2767,6 +2833,7 @@ public static unsafe partial class ffmpeg public static AVFormatContext* avformat_alloc_context() => vectors.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. + /// pointee is set to the created format context, or to NULL in case of failure /// format to use for allocating the context, if NULL format_name and filename are used instead /// 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 @@ -2826,14 +2893,14 @@ public static unsafe partial class ffmpeg /// Get the AVIndexEntry corresponding to the given timestamp. /// Stream containing the requested AVIndexEntry. + /// 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. public static AVIndexEntry* avformat_index_get_entry_from_timestamp(AVStream* @st, long @wanted_timestamp, int @flags) => vectors.avformat_index_get_entry_from_timestamp(@st, @wanted_timestamp, @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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized, negative AVERROR on failure. + /// 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. public static int avformat_init_output(AVFormatContext* @s, AVDictionary** @options) => vectors.avformat_init_output(@s, @options); /// Return the libavformat license. @@ -2893,9 +2960,8 @@ public static unsafe partial class ffmpeg public static uint avformat_version() => vectors.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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init, negative AVERROR on failure. + /// 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. public static int avformat_write_header(AVFormatContext* @s, AVDictionary** @options) => vectors.avformat_write_header(@s, @options); /// Accept and allocate a client context on a server context. @@ -3125,6 +3191,7 @@ public static unsafe partial class ffmpeg public static void avio_write(AVIOContext* @s, byte* @buf, int @size) => vectors.avio_write(@s, @buf, @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 public static void avio_write_marker(AVIOContext* @s, long @time, AVIODataMarkerType @type) => vectors.avio_write_marker(@s, @time, @type); @@ -3228,6 +3295,8 @@ public static unsafe partial class ffmpeg /// Configure or reconfigure the SwrContext using the information provided by the AVFrames. /// audio resample context + /// output AVFrame + /// input AVFrame /// 0 on success, AVERROR on failure. public static int swr_config_frame(SwrContext* @swr, AVFrame* @out, AVFrame* @in) => vectors.swr_config_frame(@swr, @out, @in); @@ -3287,6 +3356,8 @@ public static unsafe partial class ffmpeg public static int swr_is_initialized(SwrContext* @s) => vectors.swr_is_initialized(@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 public static long swr_next_pts(SwrContext* @s, long @pts) => vectors.swr_next_pts(@s, @pts); @@ -3340,9 +3411,11 @@ public static unsafe partial class ffmpeg public static void sws_convertPalette8ToPacked32(byte* @src, byte* @dst, int @num_pixels, byte* @palette) => vectors.sws_convertPalette8ToPacked32(@src, @dst, @num_pixels, @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 public static void sws_frame_end(SwsContext* @c) => vectors.sws_frame_end(@c); /// 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(). + /// The scaling context /// 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 @@ -3365,8 +3438,8 @@ public static unsafe partial class ffmpeg /// One of the SWS_CS_* macros. If invalid, SWS_CS_DEFAULT is used. public static int* sws_getCoefficients(int @colorspace) => vectors.sws_getCoefficients(@colorspace); - /// #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else + /// 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. public static int sws_getColorspaceDetails(SwsContext* @c, int** @inv_table, int* @srcRange, int** @table, int* @dstRange, int* @brightness, int* @contrast, int* @saturation) => vectors.sws_getColorspaceDetails(@c, @inv_table, @srcRange, @table, @dstRange, @brightness, @contrast, @saturation); /// Allocate and return an SwsContext. You need it to perform scaling/conversion operations using sws_scale(). @@ -3405,12 +3478,14 @@ public static unsafe partial class ffmpeg public static void sws_normalizeVec(SwsVector* @a, double @height) => vectors.sws_normalizeVec(@a, @height); /// Request a horizontal slice of the output data to be written into the frame previously provided to sws_frame_start(). + /// The scaling context /// 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 public static int sws_receive_slice(SwsContext* @c, uint @slice_start, uint @slice_height) => vectors.sws_receive_slice(@c, @slice_start, @slice_height); - /// Returns 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. + /// Get the alignment required for slices + /// 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. public static uint sws_receive_slice_alignment(SwsContext* @c) => vectors.sws_receive_slice_alignment(@c); @@ -3426,6 +3501,7 @@ public static unsafe partial class ffmpeg public static int sws_scale(SwsContext* @c, byte*[] @srcSlice, int[] @srcStride, int @srcSliceY, int @srcSliceH, byte*[] @dst, int[] @dstStride) => vectors.sws_scale(@c, @srcSlice, @srcStride, @srcSliceY, @srcSliceH, @dst, @dstStride); /// Scale source data from src and write the output to dst. + /// The scaling context /// The destination frame. See documentation for sws_frame_start() for more details. /// The source frame. /// 0 on success, a negative AVERROR code on failure @@ -3435,20 +3511,22 @@ public static unsafe partial class ffmpeg public static void sws_scaleVec(SwsVector* @a, double @scalar) => vectors.sws_scaleVec(@a, @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. + /// The scaling context /// first row of the slice /// number of rows in the slice /// a non-negative number on success, a negative AVERROR code on failure. public static int sws_send_slice(SwsContext* @c, uint @slice_start, uint @slice_height) => vectors.sws_send_slice(@c, @slice_start, @slice_height); - /// Returns negative error code on error, non negative otherwise #else Returns -1 if not supported #endif + /// Returns A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. + /// the scaling context /// the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the input (1=jpeg / 0=mpeg) /// the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the output (1=jpeg / 0=mpeg) /// 16.16 fixed point brightness correction /// 16.16 fixed point contrast correction - /// 16.16 fixed point saturation correction #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else + /// 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. public static int sws_setColorspaceDetails(SwsContext* @c, in int4 @inv_table, int @srcRange, in int4 @table, int @dstRange, int @brightness, int @contrast, int @saturation) => vectors.sws_setColorspaceDetails(@c, @inv_table, @srcRange, @table, @dstRange, @brightness, @contrast, @saturation); /// Return the libswscale build-time configuration. diff --git a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs index 469de607..ccd92563 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.macros.g.cs @@ -77,10 +77,14 @@ public static unsafe partial class ffmpeg public static readonly ulong AV_CH_LAYOUT_7POINT0_FRONT = AV_CH_LAYOUT_5POINT0 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER; /// AV_CH_LAYOUT_7POINT1 = (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) public static readonly ulong AV_CH_LAYOUT_7POINT1 = AV_CH_LAYOUT_5POINT1 | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT; + /// AV_CH_LAYOUT_7POINT1_TOP_BACK = (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) + public static readonly ulong AV_CH_LAYOUT_7POINT1_TOP_BACK = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT; /// AV_CH_LAYOUT_7POINT1_WIDE = (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) public static readonly ulong AV_CH_LAYOUT_7POINT1_WIDE = AV_CH_LAYOUT_5POINT1 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER; /// AV_CH_LAYOUT_7POINT1_WIDE_BACK = (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) public static readonly ulong AV_CH_LAYOUT_7POINT1_WIDE_BACK = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER; + /// AV_CH_LAYOUT_CUBE = (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT) + public static readonly ulong AV_CH_LAYOUT_CUBE = AV_CH_LAYOUT_QUAD | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT; /// AV_CH_LAYOUT_HEXADECAGONAL = (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) public static readonly ulong AV_CH_LAYOUT_HEXADECAGONAL = AV_CH_LAYOUT_OCTAGONAL | AV_CH_WIDE_LEFT | AV_CH_WIDE_RIGHT | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT | AV_CH_TOP_BACK_CENTER | AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT; /// AV_CH_LAYOUT_HEXAGONAL = (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER) @@ -156,9 +160,11 @@ public static unsafe partial class ffmpeg // public static AV_CHANNEL_LAYOUT_7POINT0 = AV_CHANNEL_LAYOUT_MASK(0x7, AV_CH_LAYOUT_7POINT0); // public static AV_CHANNEL_LAYOUT_7POINT0_FRONT = AV_CHANNEL_LAYOUT_MASK(0x7, AV_CH_LAYOUT_7POINT0_FRONT); // public static AV_CHANNEL_LAYOUT_7POINT1 = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1); + // public static AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1_TOP_BACK); // public static AV_CHANNEL_LAYOUT_7POINT1_WIDE = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1_WIDE); // public static AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1_WIDE_BACK); // public static AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER = { .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }}; + // public static AV_CHANNEL_LAYOUT_CUBE = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_CUBE); // public static AV_CHANNEL_LAYOUT_HEXADECAGONAL = AV_CHANNEL_LAYOUT_MASK(0x10, AV_CH_LAYOUT_HEXADECAGONAL); // public static AV_CHANNEL_LAYOUT_HEXAGONAL = AV_CHANNEL_LAYOUT_MASK(0x6, AV_CH_LAYOUT_HEXAGONAL); // public static AV_CHANNEL_LAYOUT_MASK = nb; @@ -179,8 +185,6 @@ public static unsafe partial class ffmpeg // public static av_clipd = av_clipd_c; // public static av_clipf = av_clipf_c; // public static av_clipl_int32 = av_clipl_int32_c; - /// AV_CODEC_CAP_AUTO_THREADS = AV_CODEC_CAP_OTHER_THREADS - public const int AV_CODEC_CAP_AUTO_THREADS = AV_CODEC_CAP_OTHER_THREADS; /// AV_CODEC_CAP_AVOID_PROBING = (1 << 17) public const int AV_CODEC_CAP_AVOID_PROBING = 0x1 << 0x11; /// AV_CODEC_CAP_CHANNEL_CONF = (1 << 10) @@ -193,6 +197,8 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_CAP_DRAW_HORIZ_BAND = 0x1 << 0x0; /// AV_CODEC_CAP_ENCODER_FLUSH = (1 << 21) public const int AV_CODEC_CAP_ENCODER_FLUSH = 0x1 << 0x15; + /// AV_CODEC_CAP_ENCODER_RECON_FRAME = (1 << 22) + public const int AV_CODEC_CAP_ENCODER_RECON_FRAME = 0x1 << 0x16; /// AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE = (1 << 20) public const int AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE = 0x1 << 0x14; /// AV_CODEC_CAP_EXPERIMENTAL = (1 << 9) @@ -203,10 +209,6 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_CAP_HARDWARE = 0x1 << 0x12; /// AV_CODEC_CAP_HYBRID = (1 << 19) public const int AV_CODEC_CAP_HYBRID = 0x1 << 0x13; - /// AV_CODEC_CAP_INTRA_ONLY = 0x40000000 - public const int AV_CODEC_CAP_INTRA_ONLY = 0x40000000; - /// AV_CODEC_CAP_LOSSLESS = 0x80000000 - public const uint AV_CODEC_CAP_LOSSLESS = 0x80000000U; /// AV_CODEC_CAP_OTHER_THREADS = (1 << 15) public const int AV_CODEC_CAP_OTHER_THREADS = 0x1 << 0xf; /// AV_CODEC_CAP_PARAM_CHANGE = (1 << 14) @@ -217,8 +219,6 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_CAP_SMALL_LAST_FRAME = 0x1 << 0x6; /// AV_CODEC_CAP_SUBFRAMES = (1 << 8) public const int AV_CODEC_CAP_SUBFRAMES = 0x1 << 0x8; - /// AV_CODEC_CAP_TRUNCATED = (1 << 3) - public const int AV_CODEC_CAP_TRUNCATED = 0x1 << 0x3; /// AV_CODEC_CAP_VARIABLE_FRAME_SIZE = (1 << 16) public const int AV_CODEC_CAP_VARIABLE_FRAME_SIZE = 0x1 << 0x10; /// AV_CODEC_EXPORT_DATA_FILM_GRAIN = 0x1 << 0x3 @@ -237,8 +237,12 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_FLAG_BITEXACT = 0x1 << 0x17; /// AV_CODEC_FLAG_CLOSED_GOP = 0x1U << 0x1f public const uint AV_CODEC_FLAG_CLOSED_GOP = 0x1U << 0x1f; + /// AV_CODEC_FLAG_COPY_OPAQUE = 0x1 << 0x7 + public const int AV_CODEC_FLAG_COPY_OPAQUE = 0x1 << 0x7; /// AV_CODEC_FLAG_DROPCHANGED = 0x1 << 0x5 public const int AV_CODEC_FLAG_DROPCHANGED = 0x1 << 0x5; + /// AV_CODEC_FLAG_FRAME_DURATION = 0x1 << 0x8 + public const int AV_CODEC_FLAG_FRAME_DURATION = 0x1 << 0x8; /// AV_CODEC_FLAG_GLOBAL_HEADER = 0x1 << 0x16 public const int AV_CODEC_FLAG_GLOBAL_HEADER = 0x1 << 0x16; /// AV_CODEC_FLAG_GRAY = 0x1 << 0xd @@ -263,18 +267,18 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_FLAG_QPEL = 0x1 << 0x4; /// AV_CODEC_FLAG_QSCALE = 0x1 << 0x1 public const int AV_CODEC_FLAG_QSCALE = 0x1 << 0x1; - /// AV_CODEC_FLAG_TRUNCATED = 0x1 << 0x10 - public const int AV_CODEC_FLAG_TRUNCATED = 0x1 << 0x10; + /// AV_CODEC_FLAG_RECON_FRAME = 0x1 << 0x6 + public const int AV_CODEC_FLAG_RECON_FRAME = 0x1 << 0x6; /// AV_CODEC_FLAG_UNALIGNED = 0x1 << 0x0 public const int AV_CODEC_FLAG_UNALIGNED = 0x1 << 0x0; /// AV_CODEC_FLAG2_CHUNKS = 0x1 << 0xf public const int AV_CODEC_FLAG2_CHUNKS = 0x1 << 0xf; - /// AV_CODEC_FLAG2_DROP_FRAME_TIMECODE = 0x1 << 0xd - public const int AV_CODEC_FLAG2_DROP_FRAME_TIMECODE = 0x1 << 0xd; /// AV_CODEC_FLAG2_EXPORT_MVS = 0x1 << 0x1c 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_ICC_PROFILES = 0x1U << 0x1f + public const uint AV_CODEC_FLAG2_ICC_PROFILES = 0x1U << 0x1f; /// AV_CODEC_FLAG2_IGNORE_CROP = 0x1 << 0x10 public const int AV_CODEC_FLAG2_IGNORE_CROP = 0x1 << 0x10; /// AV_CODEC_FLAG2_LOCAL_HEADER = 0x1 << 0x3 @@ -365,6 +369,22 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_NEON = 0x1 << 0x5; /// AV_CPU_FLAG_POWER8 = 0x4 public const int AV_CPU_FLAG_POWER8 = 0x4; + /// 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 + public const int AV_CPU_FLAG_RVV_F32 = 0x1 << 0x4; + /// AV_CPU_FLAG_RVV_F64 = 0x1 << 0x6 + public const int AV_CPU_FLAG_RVV_F64 = 0x1 << 0x6; + /// AV_CPU_FLAG_RVV_I32 = 0x1 << 0x3 + public const int AV_CPU_FLAG_RVV_I32 = 0x1 << 0x3; + /// AV_CPU_FLAG_RVV_I64 = 0x1 << 0x5 + public const int AV_CPU_FLAG_RVV_I64 = 0x1 << 0x5; /// AV_CPU_FLAG_SETEND = 0x1 << 0x10 public const int AV_CPU_FLAG_SETEND = 0x1 << 0x10; /// AV_CPU_FLAG_SLOW_GATHER = 0x2000000 @@ -447,21 +467,21 @@ public static unsafe partial class ffmpeg public const int AV_DISPOSITION_TIMED_THUMBNAILS = 0x1 << 0xb; /// AV_DISPOSITION_VISUAL_IMPAIRED = (1 << 8) public const int AV_DISPOSITION_VISUAL_IMPAIRED = 0x1 << 0x8; - /// AV_EF_AGGRESSIVE = 0x1 << 0x12 + /// AV_EF_AGGRESSIVE = (1<<18) public const int AV_EF_AGGRESSIVE = 0x1 << 0x12; - /// AV_EF_BITSTREAM = 0x1 << 0x1 + /// AV_EF_BITSTREAM = (1<<1) public const int AV_EF_BITSTREAM = 0x1 << 0x1; - /// AV_EF_BUFFER = 0x1 << 0x2 + /// AV_EF_BUFFER = (1<<2) public const int AV_EF_BUFFER = 0x1 << 0x2; - /// AV_EF_CAREFUL = 0x1 << 0x10 + /// AV_EF_CAREFUL = (1<<16) public const int AV_EF_CAREFUL = 0x1 << 0x10; - /// AV_EF_COMPLIANT = 0x1 << 0x11 + /// AV_EF_COMPLIANT = (1<<17) public const int AV_EF_COMPLIANT = 0x1 << 0x11; - /// AV_EF_CRCCHECK = 0x1 << 0x0 + /// AV_EF_CRCCHECK = (1<<0) public const int AV_EF_CRCCHECK = 0x1 << 0x0; - /// AV_EF_EXPLODE = 0x1 << 0x3 + /// AV_EF_EXPLODE = (1<<3) public const int AV_EF_EXPLODE = 0x1 << 0x3; - /// AV_EF_IGNORE_ERR = 0x1 << 0xf + /// AV_EF_IGNORE_ERR = (1<<15) public const int AV_EF_IGNORE_ERR = 0x1 << 0xf; // public static av_err2str = (errnum) av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum); /// AV_ERROR_MAX_STRING_SIZE = 64 @@ -496,6 +516,8 @@ public static unsafe partial class ffmpeg public const int AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH = 0x1 << 0x2; /// AV_HWACCEL_FLAG_IGNORE_LEVEL = 0x1 << 0x0 public const int AV_HWACCEL_FLAG_IGNORE_LEVEL = 0x1 << 0x0; + /// AV_HWACCEL_FLAG_UNSAFE_OUTPUT = 0x1 << 0x3 + public const int AV_HWACCEL_FLAG_UNSAFE_OUTPUT = 0x1 << 0x3; /// AV_INPUT_BUFFER_MIN_SIZE = 0x4000 public const int AV_INPUT_BUFFER_MIN_SIZE = 0x4000; /// AV_INPUT_BUFFER_PADDING_SIZE = 64 @@ -629,6 +651,7 @@ public static unsafe partial class ffmpeg // public static AV_PIX_FMT_NE = (be, le) AV_PIX_FMT_##le; // public static AV_PIX_FMT_NV20 = AV_PIX_FMT_NE(NV20BE, NV20LE); // public static AV_PIX_FMT_P010 = AV_PIX_FMT_NE(P010BE, P010LE); + // public static AV_PIX_FMT_P012 = AV_PIX_FMT_NE(P012BE, P012LE); // public static AV_PIX_FMT_P016 = AV_PIX_FMT_NE(P016BE, P016LE); // public static AV_PIX_FMT_P210 = AV_PIX_FMT_NE(P210BE, P210LE); // public static AV_PIX_FMT_P216 = AV_PIX_FMT_NE(P216BE, P216LE); @@ -641,10 +664,16 @@ public static unsafe partial class ffmpeg // public static AV_PIX_FMT_RGB555 = AV_PIX_FMT_NE(RGB555BE, RGB555LE); // public static AV_PIX_FMT_RGB565 = AV_PIX_FMT_NE(RGB565BE, RGB565LE); // public static AV_PIX_FMT_RGBA64 = AV_PIX_FMT_NE(RGBA64BE, RGBA64LE); + // public static AV_PIX_FMT_RGBAF16 = AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE); + // public static AV_PIX_FMT_RGBAF32 = AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE); + // public static AV_PIX_FMT_RGBF32 = AV_PIX_FMT_NE(RGBF32BE, RGBF32LE); // public static AV_PIX_FMT_X2BGR10 = AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE); // public static AV_PIX_FMT_X2RGB10 = AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE); + // public static AV_PIX_FMT_XV30 = AV_PIX_FMT_NE(XV30BE, XV30LE); + // public static AV_PIX_FMT_XV36 = AV_PIX_FMT_NE(XV36BE, XV36LE); // public static AV_PIX_FMT_XYZ12 = AV_PIX_FMT_NE(XYZ12BE, XYZ12LE); // public static AV_PIX_FMT_Y210 = AV_PIX_FMT_NE(Y210BE, Y210LE); + // public static AV_PIX_FMT_Y212 = AV_PIX_FMT_NE(Y212BE, Y212LE); // public static AV_PIX_FMT_YA16 = AV_PIX_FMT_NE(YA16BE, YA16LE); // public static AV_PIX_FMT_YUV420P10 = AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE); // public static AV_PIX_FMT_YUV420P12 = AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE); @@ -838,8 +867,6 @@ public static unsafe partial class ffmpeg public const int AVFMT_FLAG_NONBLOCK = 0x4; /// AVFMT_FLAG_NOPARSE = 0x0020 public const int AVFMT_FLAG_NOPARSE = 0x20; - /// AVFMT_FLAG_PRIV_OPT = 0x20000 - public const int AVFMT_FLAG_PRIV_OPT = 0x20000; /// AVFMT_FLAG_SHORTEST = 0x100000 public const int AVFMT_FLAG_SHORTEST = 0x100000; /// AVFMT_FLAG_SORT_DTS = 0x10000 @@ -936,71 +963,48 @@ public static unsafe partial class ffmpeg /// AVSTREAM_INIT_IN_WRITE_HEADER = 0 public const int AVSTREAM_INIT_IN_WRITE_HEADER = 0x0; // public static AVUNERROR = (e) (-(e)); - // public static DECLARE_ALIGNED = n; - // public static DECLARE_ASM_ALIGNED = n; - // public static DECLARE_ASM_CONST = n; - /// FF_API_AUTO_THREADS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_AUTO_THREADS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_AV_FOPEN_UTF8 = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_AV_FOPEN_UTF8 = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_AV_MALLOCZ_ARRAY = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_AV_MALLOCZ_ARRAY = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_AVCTX_TIMEBASE = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_AVCTX_TIMEBASE = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_AVIOCONTEXT_WRITTEN = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_API_AVIOCONTEXT_WRITTEN = LIBAVFORMAT_VERSION_MAJOR < 0x3c; - /// FF_API_AVSTREAM_CLASS = (LIBAVFORMAT_VERSION_MAJOR > 59) - public const bool FF_API_AVSTREAM_CLASS = LIBAVFORMAT_VERSION_MAJOR > 0x3b; - /// FF_API_BUFFERSINK_ALLOC = LIBAVFILTER_VERSION_MAJOR < 0x9 - public const bool FF_API_BUFFERSINK_ALLOC = LIBAVFILTER_VERSION_MAJOR < 0x9; - /// FF_API_COLORSPACE_NAME = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_COLORSPACE_NAME = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x3c; - /// FF_API_D2STR = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_D2STR = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_DEBUG_MV = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_DEBUG_MV = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_DECLARE_ALIGNED = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_DECLARE_ALIGNED = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_DEVICE_CAPABILITIES = (LIBAVDEVICE_VERSION_MAJOR < 60) - public const bool FF_API_DEVICE_CAPABILITIES = LIBAVDEVICE_VERSION_MAJOR < 0x3c; - /// FF_API_FIFO_OLD_API = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_FIFO_OLD_API = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_FIFO_PEEK2 = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_FIFO_PEEK2 = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_FLAG_TRUNCATED = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_FLAG_TRUNCATED = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_GET_FRAME_CLASS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_GET_FRAME_CLASS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_IDCT_NONE = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_IDCT_NONE = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_LAVF_PRIV_OPT = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_API_LAVF_PRIV_OPT = LIBAVFORMAT_VERSION_MAJOR < 0x3c; - /// FF_API_OLD_CHANNEL_LAYOUT = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_OLD_CHANNEL_LAYOUT = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_OPENH264_CABAC = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_OPENH264_CABAC = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_OPENH264_SLICE_MODE = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_OPENH264_SLICE_MODE = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_PAD_COUNT = LIBAVFILTER_VERSION_MAJOR < 0x9 - public const bool FF_API_PAD_COUNT = LIBAVFILTER_VERSION_MAJOR < 0x9; + /// FF_API_AV_FOPEN_UTF8 = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_AV_FOPEN_UTF8 = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_AVCODEC_CHROMA_POS = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_AVCODEC_CHROMA_POS = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_AVCTX_FRAME_NUMBER = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_AVCTX_FRAME_NUMBER = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_AVFORMAT_IO_CLOSE = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_AVFORMAT_IO_CLOSE = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_AVIODIRCONTEXT = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_AVIODIRCONTEXT = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_AYUV_CODECID = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_AYUV_CODECID = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_FIFO_OLD_API = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_FIFO_OLD_API = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_FIFO_PEEK2 = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_FIFO_PEEK2 = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_FRAME_PICTURE_NUMBER = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_FRAME_PICTURE_NUMBER = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_GET_END_PTS = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_GET_END_PTS = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_IDCT_NONE = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_IDCT_NONE = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_OLD_CHANNEL_LAYOUT = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_OLD_CHANNEL_LAYOUT = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_PKT_DURATION = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_PKT_DURATION = LIBAVUTIL_VERSION_MAJOR < 0x3b; /// FF_API_R_FRAME_RATE = 1 public const int FF_API_R_FRAME_RATE = 0x1; - /// FF_API_SUB_TEXT_FORMAT = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_SUB_TEXT_FORMAT = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_SVTAV1_OPTS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_SVTAV1_OPTS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_SWS_PARAM_OPTION = LIBAVFILTER_VERSION_MAJOR < 0x9 - public const bool FF_API_SWS_PARAM_OPTION = LIBAVFILTER_VERSION_MAJOR < 0x9; - /// FF_API_THREAD_SAFE_CALLBACKS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_THREAD_SAFE_CALLBACKS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_UNUSED_CODEC_CAPS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_UNUSED_CODEC_CAPS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_XVMC = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_XVMC = LIBAVUTIL_VERSION_MAJOR < 0x3a; + /// FF_API_REORDERED_OPAQUE = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_REORDERED_OPAQUE = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_SVTAV1_OPTS = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_SVTAV1_OPTS = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_VT_HWACCEL_CONTEXT = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_VT_HWACCEL_CONTEXT = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_VT_OUTPUT_CALLBACK = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_VT_OUTPUT_CALLBACK = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_XVMC = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_XVMC = LIBAVUTIL_VERSION_MAJOR < 0x3b; // public static FF_ARRAY_ELEMS = (a) (sizeof(a) / sizeof((a)[0])); /// FF_BUG_AMV = 0x20 public const int FF_BUG_AMV = 0x20; @@ -1067,21 +1071,23 @@ 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_CRYSTAL_HD = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_CODEC_CRYSTAL_HD = LIBAVCODEC_VERSION_MAJOR < 0x3d; /// 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_COMPLIANCE_EXPERIMENTAL = -0x2 + /// FF_COMPLIANCE_EXPERIMENTAL = -2 public const int FF_COMPLIANCE_EXPERIMENTAL = -0x2; - /// FF_COMPLIANCE_NORMAL = 0x0 + /// FF_COMPLIANCE_NORMAL = 0 public const int FF_COMPLIANCE_NORMAL = 0x0; - /// FF_COMPLIANCE_STRICT = 0x1 + /// FF_COMPLIANCE_STRICT = 1 public const int FF_COMPLIANCE_STRICT = 0x1; - /// FF_COMPLIANCE_UNOFFICIAL = -0x1 + /// FF_COMPLIANCE_UNOFFICIAL = -1 public const int FF_COMPLIANCE_UNOFFICIAL = -0x1; - /// FF_COMPLIANCE_VERY_STRICT = 0x2 + /// FF_COMPLIANCE_VERY_STRICT = 2 public const int FF_COMPLIANCE_VERY_STRICT = 0x2; /// FF_COMPRESSION_DEFAULT = -0x1 public const int FF_COMPRESSION_DEFAULT = -0x1; @@ -1127,12 +1133,6 @@ public static unsafe partial class ffmpeg public const int FF_DEBUG_STARTCODE = 0x100; /// FF_DEBUG_THREADS = 0x10000 public const int FF_DEBUG_THREADS = 0x10000; - /// FF_DEBUG_VIS_MV_B_BACK = 0x4 - public const int FF_DEBUG_VIS_MV_B_BACK = 0x4; - /// FF_DEBUG_VIS_MV_B_FOR = 0x2 - public const int FF_DEBUG_VIS_MV_B_FOR = 0x2; - /// FF_DEBUG_VIS_MV_P_FOR = 0x1 - public const int FF_DEBUG_VIS_MV_P_FOR = 0x1; /// FF_DECODE_ERROR_CONCEALMENT_ACTIVE = 4 public const int FF_DECODE_ERROR_CONCEALMENT_ACTIVE = 0x4; /// FF_DECODE_ERROR_DECODE_SLICES = 8 @@ -1153,8 +1153,6 @@ public static unsafe partial class ffmpeg public const int FF_EC_GUESS_MVS = 0x1; /// FF_FDEBUG_TS = 0x0001 public const int FF_FDEBUG_TS = 0x1; - /// FF_HLS_TS_OPTIONS = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_HLS_TS_OPTIONS = LIBAVFORMAT_VERSION_MAJOR < 0x3c; /// FF_IDCT_ALTIVEC = 0x8 public const int FF_IDCT_ALTIVEC = 0x8; /// FF_IDCT_ARM = 0x7 @@ -1201,6 +1199,10 @@ public static unsafe partial class ffmpeg public const int FF_LOSS_COLORSPACE = 0x4; /// FF_LOSS_DEPTH = 0x2 public const int FF_LOSS_DEPTH = 0x2; + /// FF_LOSS_EXCESS_DEPTH = 0x80 + public const int FF_LOSS_EXCESS_DEPTH = 0x80; + /// FF_LOSS_EXCESS_RESOLUTION = 0x40 + public const int FF_LOSS_EXCESS_RESOLUTION = 0x40; /// FF_LOSS_RESOLUTION = 0x1 public const int FF_LOSS_RESOLUTION = 0x1; /// FF_MB_DECISION_BITS = 0x1 @@ -1423,8 +1425,6 @@ public static unsafe partial class ffmpeg public const int FF_SUB_CHARENC_MODE_IGNORE = 0x2; /// FF_SUB_CHARENC_MODE_PRE_DECODER = 0x1 public const int FF_SUB_CHARENC_MODE_PRE_DECODER = 0x1; - /// FF_SUB_TEXT_FMT_ASS = 0x0 - public const int FF_SUB_TEXT_FMT_ASS = 0x0; /// FF_THREAD_FRAME = 0x1 public const int FF_THREAD_FRAME = 0x1; /// FF_THREAD_SLICE = 0x2 @@ -1454,12 +1454,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 = 59 - public const int LIBAVCODEC_VERSION_MAJOR = 0x3b; + /// LIBAVCODEC_VERSION_MAJOR = 60 + public const int LIBAVCODEC_VERSION_MAJOR = 0x3c; /// LIBAVCODEC_VERSION_MICRO = 0x64 public const int LIBAVCODEC_VERSION_MICRO = 0x64; - /// LIBAVCODEC_VERSION_MINOR = 0x25 - public const int LIBAVCODEC_VERSION_MINOR = 0x25; + /// LIBAVCODEC_VERSION_MINOR = 0x3 + public const int LIBAVCODEC_VERSION_MINOR = 0x3; /// LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT public static readonly int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT; /// LIBAVDEVICE_IDENT = "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) @@ -1468,12 +1468,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 = 59 - public const int LIBAVDEVICE_VERSION_MAJOR = 0x3b; + /// LIBAVDEVICE_VERSION_MAJOR = 60 + public const int LIBAVDEVICE_VERSION_MAJOR = 0x3c; /// LIBAVDEVICE_VERSION_MICRO = 100 public const int LIBAVDEVICE_VERSION_MICRO = 0x64; - /// LIBAVDEVICE_VERSION_MINOR = 7 - public const int LIBAVDEVICE_VERSION_MINOR = 0x7; + /// 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" @@ -1482,12 +1482,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 = 0x8 - public const int LIBAVFILTER_VERSION_MAJOR = 0x8; + /// LIBAVFILTER_VERSION_MAJOR = 0x9 + public const int LIBAVFILTER_VERSION_MAJOR = 0x9; /// LIBAVFILTER_VERSION_MICRO = 0x64 public const int LIBAVFILTER_VERSION_MICRO = 0x64; - /// LIBAVFILTER_VERSION_MINOR = 0x2c - public const int LIBAVFILTER_VERSION_MINOR = 0x2c; + /// LIBAVFILTER_VERSION_MINOR = 0x3 + public const int LIBAVFILTER_VERSION_MINOR = 0x3; /// LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT public static readonly int LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT; /// LIBAVFORMAT_IDENT = "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -1496,12 +1496,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 = 59 - public const int LIBAVFORMAT_VERSION_MAJOR = 0x3b; + /// LIBAVFORMAT_VERSION_MAJOR = 60 + public const int LIBAVFORMAT_VERSION_MAJOR = 0x3c; /// LIBAVFORMAT_VERSION_MICRO = 100 public const int LIBAVFORMAT_VERSION_MICRO = 0x64; - /// LIBAVFORMAT_VERSION_MINOR = 27 - public const int LIBAVFORMAT_VERSION_MINOR = 0x1b; + /// LIBAVFORMAT_VERSION_MINOR = 3 + public const int LIBAVFORMAT_VERSION_MINOR = 0x3; /// LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT public static readonly int LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT; /// LIBAVUTIL_IDENT = "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) @@ -1510,12 +1510,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 = 57 - public const int LIBAVUTIL_VERSION_MAJOR = 0x39; + /// LIBAVUTIL_VERSION_MAJOR = 58 + public const int LIBAVUTIL_VERSION_MAJOR = 0x3a; /// LIBAVUTIL_VERSION_MICRO = 100 public const int LIBAVUTIL_VERSION_MICRO = 0x64; - /// LIBAVUTIL_VERSION_MINOR = 28 - public const int LIBAVUTIL_VERSION_MINOR = 0x1c; + /// LIBAVUTIL_VERSION_MINOR = 2 + public const int LIBAVUTIL_VERSION_MINOR = 0x2; /// LIBPOSTPROC_BUILD = LIBPOSTPROC_VERSION_INT public static readonly int LIBPOSTPROC_BUILD = LIBPOSTPROC_VERSION_INT; /// LIBPOSTPROC_IDENT = "postproc" @@ -1524,12 +1524,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBPOSTPROC_VERSION = AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO); /// LIBPOSTPROC_VERSION_INT = AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO) public static readonly int LIBPOSTPROC_VERSION_INT = AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO); - /// LIBPOSTPROC_VERSION_MAJOR = 0x38 - public const int LIBPOSTPROC_VERSION_MAJOR = 0x38; + /// LIBPOSTPROC_VERSION_MAJOR = 0x39 + public const int LIBPOSTPROC_VERSION_MAJOR = 0x39; /// LIBPOSTPROC_VERSION_MICRO = 0x64 public const int LIBPOSTPROC_VERSION_MICRO = 0x64; - /// LIBPOSTPROC_VERSION_MINOR = 0x6 - public const int LIBPOSTPROC_VERSION_MINOR = 0x6; + /// LIBPOSTPROC_VERSION_MINOR = 0x1 + public const int LIBPOSTPROC_VERSION_MINOR = 0x1; /// LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT public static readonly int LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT; /// LIBSWRESAMPLE_IDENT = "SwR" @@ -1542,8 +1542,8 @@ public static unsafe partial class ffmpeg public const int LIBSWRESAMPLE_VERSION_MAJOR = 0x4; /// LIBSWRESAMPLE_VERSION_MICRO = 0x64 public const int LIBSWRESAMPLE_VERSION_MICRO = 0x64; - /// LIBSWRESAMPLE_VERSION_MINOR = 0x7 - public const int LIBSWRESAMPLE_VERSION_MINOR = 0x7; + /// LIBSWRESAMPLE_VERSION_MINOR = 0xa + public const int LIBSWRESAMPLE_VERSION_MINOR = 0xa; /// LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT public static readonly int LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT; /// LIBSWSCALE_IDENT = "SwS" @@ -1552,12 +1552,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 = 0x6 - public const int LIBSWSCALE_VERSION_MAJOR = 0x6; + /// LIBSWSCALE_VERSION_MAJOR = 0x7 + public const int LIBSWSCALE_VERSION_MAJOR = 0x7; /// LIBSWSCALE_VERSION_MICRO = 0x64 public const int LIBSWSCALE_VERSION_MICRO = 0x64; - /// LIBSWSCALE_VERSION_MINOR = 0x7 - public const int LIBSWSCALE_VERSION_MINOR = 0x7; + /// LIBSWSCALE_VERSION_MINOR = 0x1 + public const int LIBSWSCALE_VERSION_MINOR = 0x1; /// M_E = 2.7182818284590452354 public const double M_E = 2.718281828459045D; /// M_LN10 = 2.30258509299404568402 diff --git a/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs b/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs index b63b1fc1..2dd5ff46 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs @@ -5,10 +5,6 @@ namespace FFmpeg.AutoGen.Abstractions; public static unsafe partial class vectors { - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVABufferSinkParams* av_abuffersink_params_alloc_delegate(); - public static av_abuffersink_params_alloc_delegate av_abuffersink_params_alloc; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_add_index_entry_delegate(AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags); public static av_add_index_entry_delegate av_add_index_entry; @@ -283,10 +279,6 @@ public delegate int av_bsf_list_parse_str_delegate( public delegate int av_buffersink_get_w_delegate(AVFilterContext* @ctx); public static av_buffersink_get_w_delegate av_buffersink_get_w; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVBufferSinkParams* av_buffersink_params_alloc_delegate(); - public static av_buffersink_params_alloc_delegate av_buffersink_params_alloc; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void av_buffersink_set_frame_size_delegate(AVFilterContext* @ctx, uint @frame_size); public static av_buffersink_set_frame_size_delegate av_buffersink_set_frame_size; @@ -431,6 +423,10 @@ public delegate int av_channel_layout_index_from_string_delegate(AVChannelLayout public delegate void av_channel_name_bprint_delegate(AVBPrint* @bp, AVChannel @channel_id); public static av_channel_name_bprint_delegate av_channel_name_bprint; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_chroma_location_enum_to_pos_delegate(int* @xpos, int* @ypos, AVChromaLocation @pos); + public static av_chroma_location_enum_to_pos_delegate av_chroma_location_enum_to_pos; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_chroma_location_from_name_delegate( #if NETSTANDARD2_1_OR_GREATER @@ -446,6 +442,10 @@ public delegate int av_chroma_location_from_name_delegate( public delegate string av_chroma_location_name_delegate(AVChromaLocation @location); public static av_chroma_location_name_delegate av_chroma_location_name; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVChromaLocation av_chroma_location_pos_to_enum_delegate(int @xpos, int @ypos); + public static av_chroma_location_pos_to_enum_delegate av_chroma_location_pos_to_enum; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVCodecID av_codec_get_id_delegate(AVCodecTag** @tags, uint @tag); public static av_codec_get_id_delegate av_codec_get_id; @@ -609,6 +609,10 @@ public delegate int av_color_transfer_from_name_delegate( public delegate int av_dict_get_string_delegate(AVDictionary* @m, byte** @buffer, byte @key_val_sep, byte @pairs_sep); public static av_dict_get_string_delegate av_dict_get_string; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVDictionaryEntry* av_dict_iterate_delegate(AVDictionary* @m, AVDictionaryEntry* @prev); + public static av_dict_iterate_delegate av_dict_iterate; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_dict_parse_string_delegate(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER @@ -961,11 +965,6 @@ public delegate ulong av_get_channel_layout_delegate( public delegate string av_get_channel_name_delegate(ulong @channel); public static av_get_channel_name_delegate av_get_channel_name; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] - public delegate string av_get_colorspace_name_delegate(AVColorSpace @val); - public static av_get_colorspace_name_delegate av_get_colorspace_name; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_get_cpu_flags_delegate(); public static av_get_cpu_flags_delegate av_get_cpu_flags; @@ -1443,10 +1442,6 @@ public delegate void av_log_once_delegate(void* @avcl, int @initial_level, int @ public delegate void* av_mallocz_delegate(ulong @size); public static av_mallocz_delegate av_mallocz; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void* av_mallocz_array_delegate(ulong @nmemb, ulong @size); - public static av_mallocz_array_delegate av_mallocz_array; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc_delegate(); public static av_mastering_display_metadata_alloc_delegate av_mastering_display_metadata_alloc; @@ -2606,10 +2601,6 @@ public delegate void av_vlog_delegate(void* @avcl, int @level, public delegate AVClass* avcodec_get_class_delegate(); public static avcodec_get_class_delegate avcodec_get_class; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVClass* avcodec_get_frame_class_delegate(); - public static avcodec_get_frame_class_delegate avcodec_get_frame_class; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVCodecHWConfig* avcodec_get_hw_config_delegate(AVCodec* @codec, int @index); public static avcodec_get_hw_config_delegate avcodec_get_hw_config; @@ -2701,14 +2692,6 @@ public delegate void av_vlog_delegate(void* @avcl, int @level, public delegate int avdevice_app_to_dev_control_message_delegate(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size); public static avdevice_app_to_dev_control_message_delegate avdevice_app_to_dev_control_message; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int avdevice_capabilities_create_delegate(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options); - public static avdevice_capabilities_create_delegate avdevice_capabilities_create; - - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void avdevice_capabilities_free_delegate(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s); - public static avdevice_capabilities_free_delegate avdevice_capabilities_free; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public delegate string avdevice_configuration_delegate(); @@ -2904,6 +2887,40 @@ public delegate int avfilter_graph_queue_command_delegate(AVFilterGraph* @graph, public delegate int avfilter_graph_request_oldest_delegate(AVFilterGraph* @graph); public static avfilter_graph_request_oldest_delegate avfilter_graph_request_oldest; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_apply_delegate(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs); + public static avfilter_graph_segment_apply_delegate avfilter_graph_segment_apply; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_apply_opts_delegate(AVFilterGraphSegment* @seg, int @flags); + public static avfilter_graph_segment_apply_opts_delegate avfilter_graph_segment_apply_opts; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_create_filters_delegate(AVFilterGraphSegment* @seg, int @flags); + public static avfilter_graph_segment_create_filters_delegate avfilter_graph_segment_create_filters; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void avfilter_graph_segment_free_delegate(AVFilterGraphSegment** @seg); + public static avfilter_graph_segment_free_delegate avfilter_graph_segment_free; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_init_delegate(AVFilterGraphSegment* @seg, int @flags); + public static avfilter_graph_segment_init_delegate avfilter_graph_segment_init; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_link_delegate(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs); + public static avfilter_graph_segment_link_delegate avfilter_graph_segment_link; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_parse_delegate(AVFilterGraph* @graph, + #if NETSTANDARD2_1_OR_GREATER + [MarshalAs(UnmanagedType.LPUTF8Str)] + #else + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] + #endif + string @graph_str, int @flags, AVFilterGraphSegment** @seg); + public static avfilter_graph_segment_parse_delegate avfilter_graph_segment_parse; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int avfilter_graph_send_command_delegate(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER @@ -2969,10 +2986,6 @@ public delegate int avfilter_init_str_delegate(AVFilterContext* @ctx, public delegate void avfilter_link_free_delegate(AVFilterLink** @link); public static avfilter_link_free_delegate avfilter_link_free; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int avfilter_pad_count_delegate(AVFilterPad* @pads); - public static avfilter_pad_count_delegate avfilter_pad_count; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public delegate string avfilter_pad_get_name_delegate(AVFilterPad* @pads, int @pad_idx); diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/FFmpeg.AutoGen.Bindings.DynamicallyLinked.csproj b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/FFmpeg.AutoGen.Bindings.DynamicallyLinked.csproj index 2c753743..dea5c817 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/FFmpeg.AutoGen.Bindings.DynamicallyLinked.csproj +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/FFmpeg.AutoGen.Bindings.DynamicallyLinked.csproj @@ -1,7 +1,7 @@ - netstandard2.1;netstandard2.0;net45 + netstandard2.1;netstandard2.0 FFmpeg auto generated unsafe bindings for C#/.NET and Mono. The Dynamicly Linked implementation is based on DllImport attribute. diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs index 1409b588..b34f9a4d 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs @@ -6,21 +6,16 @@ namespace FFmpeg.AutoGen.Bindings.DynamicallyLinked; public static unsafe partial class DynamicallyLinkedBindings { - /// Create an AVABufferSinkParams structure. - [Obsolete()] - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] - public static extern AVABufferSinkParams* av_abuffersink_params_alloc(); - /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_add_q(AVRational @b, AVRational @c); /// Add a value to a timestamp. @@ -28,7 +23,7 @@ public static unsafe partial class DynamicallyLinkedBindings /// Input timestamp /// Time base of `inc` /// Value to be added - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern long av_add_stable(AVRational @ts_tb, long @ts, AVRational @inc_tb, long @inc); /// Read data and append it to the current content of the AVPacket. If pkt->size is 0 this is identical to av_get_packet. Note that this uses av_grow_packet and thus involves a realloc which is inefficient. Thus this function should only be used when there is no reasonable way to know (an upper bound of) the final size. @@ -36,7 +31,7 @@ public static unsafe partial class DynamicallyLinkedBindings /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_append_packet(AVIOContext* @s, AVPacket* @pkt, int @size); /// Allocate an AVAudioFifo. @@ -44,19 +39,19 @@ public static unsafe partial class DynamicallyLinkedBindings /// number of channels /// initial allocation size, in samples /// newly allocated AVAudioFifo, or NULL on error - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_drain(AVAudioFifo* @af, int @nb_samples); /// Free an AVAudioFifo. /// AVAudioFifo to free - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_audio_fifo_free(AVAudioFifo* @af); /// Peek data from an AVAudioFifo. @@ -64,7 +59,7 @@ public static unsafe partial class DynamicallyLinkedBindings /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_peek(AVAudioFifo* @af, void** @data, int @nb_samples); /// Peek data from an AVAudioFifo. @@ -73,7 +68,7 @@ public static unsafe partial class DynamicallyLinkedBindings /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -81,31 +76,31 @@ public static unsafe partial class DynamicallyLinkedBindings /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_space(AVAudioFifo* @af); /// Write data to an AVAudioFifo. @@ -113,32 +108,32 @@ public static unsafe partial class DynamicallyLinkedBindings /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_audio_fifo_write(AVAudioFifo* @af, void** @data, int @nb_samples); /// Append a description of a channel layout to a bprint buffer. [Obsolete("use av_channel_layout_describe()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_bprint_channel_layout(AVBPrint* @bp, int @nb_channels, ulong @channel_layout); /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVBitStreamFilter* av_bsf_get_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -148,34 +143,35 @@ public static unsafe partial class DynamicallyLinkedBindings string @name); /// Get the AVClass for AVBSFContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + /// a AVBSFContext previously allocated with av_bsf_alloc() + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. @@ -183,7 +179,7 @@ public static unsafe partial class DynamicallyLinkedBindings /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_list_append2(AVBSFList* @lst, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -196,19 +192,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_list_parse_str( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -218,24 +214,26 @@ public static extern int av_bsf_list_parse_str( string @str, AVBSFContext** @bsf); /// Retrieve a filtered packet. + /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffer_allocz(ulong @size); /// Create an AVBuffer from an existing array. @@ -245,48 +243,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_buffer_get_opaque(AVBufferRef* @buf); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -295,56 +293,56 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_buffer_unref(AVBufferRef** @buf); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_ch_layout(AVFilterContext* @ctx, AVChannelLayout* @ch_layout); [Obsolete()] - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern ulong av_buffersink_get_channel_layout(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_channels(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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. @@ -352,55 +350,50 @@ 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_frame_flags(AVFilterContext* @ctx, AVFrame* @frame, int @flags); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_buffersink_get_frame_rate(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_h(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVBufferRef* av_buffersink_get_hw_frames_ctx(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_buffersink_get_sample_aspect_ratio(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_samples(AVFilterContext* @ctx, AVFrame* @frame, int @nb_samples); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_buffersink_get_time_base(AVFilterContext* @ctx); /// Get the properties of the stream @{ - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVMediaType av_buffersink_get_type(AVFilterContext* @ctx); - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_w(AVFilterContext* @ctx); - /// Create an AVBufferSinkParams structure. - [Obsolete()] - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] - public static extern AVBufferSinkParams* av_buffersink_params_alloc(); - /// Set the frame size for an audio buffer sink. - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_add_frame(AVFilterContext* @ctx, AVFrame* @frame); /// Add a frame to the buffer source. @@ -408,56 +401,57 @@ 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersrc_close(AVFilterContext* @ctx, long @pts, uint @flags); /// Get the number of failed requests. - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_buffersrc_get_nb_failed_requests(AVFilterContext* @buffer_src); /// Allocate a new AVBufferSrcParameters instance. It should be freed by the caller with av_free(). - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_calloc(ulong @nmemb, ulong @size); /// Get a human readable string describing a given channel. /// pre-allocated buffer where to put the generated string /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannel av_channel_from_string( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -468,14 +462,16 @@ public static extern AVChannel av_channel_from_string( /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannel av_channel_layout_channel_from_string(AVChannelLayout* @channel_layout, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -487,26 +483,27 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_copy(AVChannelLayout* @dst, AVChannelLayout* @src); /// Get the default channel layout for a given number of channels. + /// the layout structure to be initialized /// number of channels - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -514,31 +511,31 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_describe_bprint(AVChannelLayout* @channel_layout, AVBPrint* @bp); /// Get the channel with the given index in channel_layout. [Obsolete("use av_channel_layout_channel_from_index()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern ulong av_channel_layout_extract_channel(ulong @channel_layout, int @index); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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") /// input channel layout /// string describing the channel layout /// 0 channel layout was detected, AVERROR_INVALIDATATA otherwise - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_from_string(AVChannelLayout* @channel_layout, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -549,14 +546,16 @@ public static extern int av_channel_layout_from_string(AVChannelLayout* @channel /// Get the index of a given channel in a channel layout. In case multiple channels are found, only the first match will be returned. /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_index_from_string(AVChannelLayout* @channel_layout, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -568,35 +567,42 @@ public static extern int av_channel_layout_index_from_string(AVChannelLayout* @c /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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(). /// pre-allocated buffer where to put the generated string /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_chroma_location_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -607,20 +613,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint av_codec_get_tag(AVCodecTag** @tags, AVCodecID @id); /// Get the codec tag for the given codec id. @@ -628,28 +640,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_primaries_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -660,13 +672,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_range_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -677,13 +689,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_space_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -694,13 +706,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_color_transfer_from_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -711,103 +723,105 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_color_transfer_name(AVColorTransferCharacteristic @transfer); /// Compare the remainders of two integer operands divided by a common divisor. + /// Operand + /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_compare_ts(long @ts_a, AVRational @tb_a, long @ts_b, AVRational @tb_b); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVD3D11VAContext* av_d3d11va_alloc_context(); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_demuxer_iterate(void** @opaque); /// Copy entries from one AVDictionary struct into another. - /// pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst - /// pointer to source AVDictionary struct - /// flags to use when setting entries in *dst + /// Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL, this function will allocate a struct for you and put it in *dst + /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_dict_free(AVDictionary** @m); /// Get a dictionary entry with matching key. - /// matching key + /// Matching key /// 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-57", CallingConvention = CallingConvention.Cdecl)] + /// 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-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVDictionaryEntry* av_dict_get(AVDictionary* @m, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -817,20 +831,26 @@ public static extern int av_color_transfer_from_name( string @key, AVDictionaryEntry* @prev, int @flags); /// Get dictionary entries as a string. - /// dictionary + /// The dictionary /// Pointer to buffer that will be allocated with string containg entries. Buffer must be freed by the caller when is no longer needed. - /// character used to separate key from value - /// character used to separate two pairs from each other + /// Character used to separate key from value + /// Character used to separate two pairs from each other /// >= 0 on success, negative on error - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-58", 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. - /// 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 - /// flags to use when adding to dictionary. AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL are ignored since the key/value tokens will always be duplicated. + /// 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 + /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_parse_string(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -852,11 +872,11 @@ public static extern int av_dict_parse_string(AVDictionary** @pm, string @pairs_sep, int @flags); /// Set the given entry in *pm, overwriting an existing entry. - /// pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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. + /// Pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_set(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -871,8 +891,8 @@ public static extern int av_dict_set(AVDictionary** @pm, #endif string @value, int @flags); - /// Convenience wrapper for av_dict_set that converts the value to a string and stores it. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_set_int(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -883,7 +903,7 @@ public static extern int av_dict_set_int(AVDictionary** @pm, /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_disposition_from_string( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -895,7 +915,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_disposition_to_string(int @disposition); @@ -903,7 +923,7 @@ public static extern int av_disposition_from_string( /// First rational /// Second rational /// b/c - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -911,7 +931,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_dump_format(AVFormatContext* @ic, int @index, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -922,25 +942,25 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVDynamicHDRPlus* av_dynamic_hdr_plus_create_side_data(AVFrame* @frame); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -949,29 +969,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. @@ -979,14 +999,17 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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(). + /// path to the file + /// pointee is set to the mapped or allocated buffer + /// pointee is set to the size in bytes of the buffer /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_file_map( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -996,14 +1019,15 @@ public static extern int av_file_map( string @filename, byte** @bufptr, ulong* @size, int @log_offset, void* @log_ctx); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_filename_number_test( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1015,14 +1039,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1033,14 +1057,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_find_input_format( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1053,7 +1077,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1061,17 +1085,17 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVProgram* av_find_program_from_stream(AVFormatContext* @ic, AVProgram* @last, int @s); /// Returns the method used to set ctx->duration. /// AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(AVFormatContext* @ctx); /// Open a file using a UTF-8 filename. The API of this function matches POSIX fopen(), errors are returned through errno. [Obsolete("Avoid using it, as on Windows, the FILE* allocated by this function may be allocated with a different CRT than the caller who uses the FILE*. No replacement provided in public API.")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern _iobuf* av_fopen_utf8( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1087,81 +1111,82 @@ public static extern int av_filename_number_test( string @mode); /// Disables cpu detection and forces the specified flags. -1 is a special case that disables forcing of specific flags. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_force_cpu_flags(int @flags); /// This function will cause global side data to be injected in the next packet of each stream as well as after any subsequent seek. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_format_inject_global_side_data(AVFormatContext* @s); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_frame_copy(AVFrame* @dst, AVFrame* @src); /// Copy only "metadata" fields from src to dst. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_move_ref(AVFrame* @dst, AVFrame* @src); /// Add a new side data to a frame. @@ -1169,7 +1194,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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 @@ -1177,89 +1202,91 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_frame_remove_side_data(AVFrame* @frame, AVFrameSideDataType @type); /// Returns a string identifying the side data type /// a string identifying the side data type - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_frame_side_data_name(AVFrameSideDataType @type); /// Unreference all the buffers referenced by frame and reset the frame fields. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_bytes_per_sample(AVSampleFormat @sample_fmt); /// Get the description of a given channel. /// a channel layout with a single channel /// channel description on success, NULL on error [Obsolete("use av_channel_description()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_channel_description(ulong @channel); /// Return a channel layout id that matches name, or 0 if no match is found. [Obsolete("use av_channel_layout_from_string()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern ulong av_get_channel_layout( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1269,51 +1296,47 @@ public static extern ulong av_get_channel_layout( string @name); /// Get the index of a channel in channel_layout. + /// channel layout bitset /// a channel layout describing exactly one channel which must be present in channel_layout. /// index of channel in channel_layout on success, a negative AVERROR on error. [Obsolete("use av_channel_layout_index_from_channel()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_channel_layout_channel_index(ulong @channel_layout, ulong @channel); /// Return the number of channels in the channel layout. [Obsolete("use AVChannelLayout.nb_channels")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_channel_layout_nb_channels(ulong @channel_layout); /// Return a description of a channel layout. If nb_channels is <= 0, it is guessed from the channel_layout. /// put here the string containing the channel layout /// size in bytes of the buffer + /// number of channels + /// channel layout bitset [Obsolete("use av_channel_layout_describe()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_get_channel_layout_string(byte* @buf, int @buf_size, int @nb_channels, ulong @channel_layout); /// Get the name of a given channel. /// channel name on success, NULL on error. [Obsolete("use av_channel_name()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_channel_name(ulong @channel); - /// Get the name of a colorspace. - /// a static string identifying the colorspace; can be NULL. - [Obsolete("use av_color_space_name()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] - public static extern string av_get_colorspace_name(AVColorSpace @val); - /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_cpu_flags(); /// Return default channel layout for a given number of channels. [Obsolete("use av_channel_layout_default()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern long av_get_default_channel_layout(int @nb_channels); /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_exact_bits_per_sample(AVCodecID @codec_id); /// Return a channel layout and the number of channels based on the specified name. @@ -1322,7 +1345,7 @@ public static extern ulong av_get_channel_layout( /// number of channels /// 0 on success, AVERROR(EINVAL) if the parsing fails. [Obsolete("use av_channel_layout_from_string()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_extended_channel_layout( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1331,7 +1354,7 @@ public static extern int av_get_extended_channel_layout( #endif string @name, ulong* @channel_layout, int* @nb_channels); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_frame_filename(byte* @buf, int @buf_size, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1347,7 +1370,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_frame_filename2(byte* @buf, int @buf_size, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1357,7 +1380,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_media_type_string(AVMediaType @media_type); @@ -1366,13 +1389,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 - /// 0 if OK, AVERROR(ENOSYS) if the format does not support it Note: some formats or devices may not allow to measure dts and wall atomically. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1380,27 +1402,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern byte av_get_picture_type_char(AVPictureType @pict_type); /// Return the pixel format corresponding to name. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVPixelFormat av_get_pix_fmt( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1414,11 +1436,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_pix_fmt_name(AVPixelFormat @pix_fmt); @@ -1426,24 +1448,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVSampleFormat av_get_sample_fmt( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1453,7 +1475,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_sample_fmt_name(AVSampleFormat @sample_fmt); @@ -1462,7 +1484,7 @@ public static extern AVSampleFormat av_get_sample_fmt( /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_get_sample_fmt_string(byte* @buf, int @buf_size, AVSampleFormat @sample_fmt); /// Get the value and name of a standard channel layout. @@ -1471,33 +1493,33 @@ public static extern AVSampleFormat av_get_sample_fmt( /// name of the layout /// 0 if the layout exists, < 0 if index is beyond the limits [Obsolete("use av_channel_layout_standard()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_standard_channel_layout(uint @index, ulong* @layout, byte** @name); /// Return the fractional representation of the internal time base. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_get_time_base_q(); /// Get the current time in microseconds. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecID av_guess_codec(AVOutputFormat* @fmt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1522,7 +1544,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_guess_format( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1548,7 +1570,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. @@ -1556,14 +1578,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. @@ -1571,13 +1593,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1587,7 +1609,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwdevice_ctx_create(AVBufferRef** @device_ctx, AVHWDeviceType @type, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1602,7 +1624,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1612,19 +1634,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVHWDeviceType av_hwdevice_find_type_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1637,51 +1659,53 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. /// On success, a reference to the newly created AVHWFramesContext. + /// The AVPixelFormat for the derived context. /// A reference to the device to create the new AVHWFramesContext on. /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_ctx_init(AVBufferRef* @ref); /// Allocate a new frame attached to the given AVHWFramesContext. @@ -1689,7 +1713,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_hwframe_get_buffer(AVBufferRef* @hwframe_ctx, AVFrame* @frame, int @flags); /// Map a hardware frame. @@ -1697,7 +1721,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1705,7 +1729,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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(). @@ -1714,13 +1738,18 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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]). + /// array to be filled with the pointer for each image plane + /// the array filled with the linesize for each plane + /// width of the image in pixels + /// height of the image in pixels + /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1728,7 +1757,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1737,7 +1766,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1748,23 +1777,31 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. + /// destination image data buffer to copy to /// linesizes for the image in dst_data + /// source image data buffer to copy from /// linesizes for the image in src_data - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + /// the AVPixelFormat of the image + /// width of the image in pixels + /// height of the image in pixels + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_copy(ref byte_ptr4 @dst_data, ref 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. + /// destination plane to copy to /// linesize for the image plane in dst + /// source plane to copy from /// linesize for the image plane in src - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + /// height (number of lines) of the plane + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1777,11 +1814,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1793,7 +1830,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1804,34 +1841,41 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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); /// Fill plane linesizes for an image with pixel format pix_fmt and width width. /// array to be filled with the linesize for each plane + /// the AVPixelFormat of the image + /// width of the image in pixels /// >= 0 in case of success, a negative error code otherwise - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + /// the AVPixFmtDescriptor for the image, describing its format + [DllImport("avutil-58", 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. /// the array to be filled with the size of each image plane + /// the AVPixelFormat of the image + /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. /// pointers array to be filled with the pointer for each image plane + /// the AVPixelFormat of the image + /// height of the image in pixels /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1840,12 +1884,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1853,21 +1897,21 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_init_packet(AVPacket* @pkt); /// Audio input devices iterator. - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_input_audio_device_next(AVInputFormat* @d); /// Video input devices iterator. - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_input_video_device_next(AVInputFormat* @d); /// Compute the length of an integer list. @@ -1875,26 +1919,26 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// pointer to the list /// list terminator (usually 0 or -1) /// length of the list, in elements, not counting the terminator - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log(void* @avcl, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1908,7 +1952,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_default_callback(void* @avcl, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1921,7 +1965,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_format_line(void* @ptr, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1935,7 +1979,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log_format_line2(void* @ptr, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -1944,12 +1988,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log_get_flags(); /// Get the current log level /// Current log level - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -1958,7 +2002,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 occurance. /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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)] @@ -1969,61 +2013,57 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_set_callback(av_log_set_callback_callback_func @callback); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_set_flags(int @arg); /// Set the log level /// Logging level - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_log_set_level(int @level); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_log2(uint @v); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_mallocz(ulong @size); - [Obsolete("use av_calloc()")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] - public static extern void* av_mallocz_array(ulong @nmemb, 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc(); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_match_ext( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2040,72 +2080,74 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_memdup(void* @p, ulong @size); /// Multiply two rationals. /// First rational /// Second rational /// b*c - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_muxer_iterate(void** @opaque); /// Find which of the two rationals is closer to another rational. /// Rational to be compared against + /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_new_packet(AVPacket* @pkt, int @size); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_copy(void* @dest, void* @src); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_double(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2119,7 +2161,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_flags(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2128,7 +2170,7 @@ public static extern int av_opt_eval_flags(void* @obj, AVOption* @o, #endif string @val, int* @flags_out); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_float(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2137,7 +2179,7 @@ public static extern int av_opt_eval_float(void* @obj, AVOption* @o, #endif string @val, float* @float_out); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_int(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2146,7 +2188,7 @@ public static extern int av_opt_eval_int(void* @obj, AVOption* @o, #endif string @val, int* @int_out); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_int64(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2155,7 +2197,7 @@ public static extern int av_opt_eval_int64(void* @obj, AVOption* @o, #endif string @val, long* @int64_out); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_eval_q(void* @obj, AVOption* @o, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2171,7 +2213,7 @@ public static extern int av_opt_eval_q(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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_find(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2194,7 +2236,7 @@ public static extern int av_opt_eval_q(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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_find2(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2213,7 +2255,7 @@ public static extern int av_opt_eval_q(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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_flag_is_set(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2229,11 +2271,11 @@ public static extern int av_opt_flag_is_set(void* @obj, string @flag_name); /// Free all allocated objects in obj. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_opt_free(void* @obj); /// Free an AVOptionRanges struct and set it to NULL. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -2242,7 +2284,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2252,7 +2294,7 @@ public static extern int av_opt_get(void* @obj, string @name, int @search_flags, byte** @out_val); [Obsolete()] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_channel_layout(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2261,7 +2303,7 @@ public static extern int av_opt_get_channel_layout(void* @obj, #endif string @name, int @search_flags, long* @ch_layout); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_chlayout(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2271,7 +2313,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_dict_val(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2280,7 +2322,7 @@ public static extern int av_opt_get_dict_val(void* @obj, #endif string @name, int @search_flags, AVDictionary** @out_val); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_double(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2289,7 +2331,7 @@ public static extern int av_opt_get_double(void* @obj, #endif string @name, int @search_flags, double* @out_val); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_image_size(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2298,7 +2340,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_int(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2315,7 +2357,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_key_value(byte** @ropts, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2330,7 +2372,7 @@ public static extern int av_opt_get_key_value(byte** @ropts, #endif string @pairs_sep, uint @flags, byte** @rkey, byte** @rval); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_pixel_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2339,7 +2381,7 @@ public static extern int av_opt_get_pixel_fmt(void* @obj, #endif string @name, int @search_flags, AVPixelFormat* @out_fmt); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_q(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2348,7 +2390,7 @@ public static extern int av_opt_get_q(void* @obj, #endif string @name, int @search_flags, AVRational* @out_val); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_sample_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2357,7 +2399,7 @@ public static extern int av_opt_get_sample_fmt(void* @obj, #endif string @name, int @search_flags, AVSampleFormat* @out_fmt); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_get_video_rate(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2370,7 +2412,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -2378,7 +2420,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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)] @@ -2391,11 +2433,11 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVOption* av_opt_next(void* @obj, AVOption* @prev); /// @} - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_opt_ptr(AVClass* @avclass, void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2407,7 +2449,7 @@ public static extern int av_opt_is_set_to_default_by_name(void* @obj, /// 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 compontents returned on success, a negative errro code otherwise - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_query_ranges(AVOptionRanges** @p0, void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2419,7 +2461,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 compontents returned on success, a negative errro code otherwise - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_query_ranges_default(AVOptionRanges** @p0, void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2436,7 +2478,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -2445,7 +2487,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2460,7 +2502,7 @@ public static extern int av_opt_set(void* @obj, #endif string @val, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_bin(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2470,7 +2512,7 @@ public static extern int av_opt_set_bin(void* @obj, string @name, byte* @val, int @size, int @search_flags); [Obsolete()] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_channel_layout(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2479,7 +2521,7 @@ public static extern int av_opt_set_channel_layout(void* @obj, #endif string @name, long @ch_layout, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_chlayout(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2490,24 +2532,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_dict(void* @obj, AVDictionary** @options); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_dict_val(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2521,10 +2563,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_dict2(void* @obj, AVDictionary** @options, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_double(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2540,7 +2582,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_from_string(void* @ctx, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2561,7 +2603,7 @@ public static extern int av_opt_set_from_string(void* @ctx, #endif string @pairs_sep); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_image_size(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2570,7 +2612,7 @@ public static extern int av_opt_set_image_size(void* @obj, #endif string @name, int @w, int @h, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_int(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2579,7 +2621,7 @@ public static extern int av_opt_set_int(void* @obj, #endif string @name, long @val, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_pixel_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2588,7 +2630,7 @@ public static extern int av_opt_set_pixel_fmt(void* @obj, #endif string @name, AVPixelFormat @fmt, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_q(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2597,7 +2639,7 @@ public static extern int av_opt_set_q(void* @obj, #endif string @name, AVRational @val, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_sample_fmt(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2606,7 +2648,7 @@ public static extern int av_opt_set_sample_fmt(void* @obj, #endif string @name, AVSampleFormat @fmt, int @search_flags); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_opt_set_video_rate(void* @obj, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2619,15 +2661,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_output_audio_device_next(AVOutputFormat* @d); /// Video output devices iterator. - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVOutputFormat* av_output_video_device_next(AVOutputFormat* @d); /// Wrap an existing array as a packet side data. @@ -2636,34 +2678,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_free_side_data(AVPacket* @pkt); /// Initialize a reference-counted packet from av_malloc()ed data. @@ -2671,7 +2713,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_from_data(AVPacket* @pkt, byte* @data, int @size); /// Get side information from packet. @@ -2679,25 +2721,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_packet_move_ref(AVPacket* @dst, AVPacket* @src); /// Allocate new information of a packet. @@ -2705,28 +2747,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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 @@ -2734,10 +2776,10 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_packet_shrink_side_data(AVPacket* @pkt, AVPacketSideDataType @type, ulong @size); - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_packet_side_data_name(AVPacketSideDataType @type); @@ -2746,17 +2788,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_parse_cpu_caps(uint* @flags, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2765,16 +2807,16 @@ public static extern int av_parse_cpu_caps(uint* @flags, #endif string @s); - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_parser_close(AVCodecParserContext* @s); - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParserContext* av_parser_init(int @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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParser* av_parser_iterate(void** @opaque); /// Parse a packet. @@ -2788,28 +2830,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -2817,13 +2859,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -2832,7 +2874,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. @@ -2840,11 +2882,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_probe_input_buffer(AVIOContext* @pb, AVInputFormat** @fmt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2861,7 +2903,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat** @fmt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -2873,37 +2915,37 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVInputFormat* av_probe_input_format3(AVProbeData* @pd, int @is_opened, int* @score_ret); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_program_add_stream_index(AVFormatContext* @ac, int @progid, uint @idx); /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_read_frame(AVFormatContext* @s, AVPacket* @pkt); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -2915,22 +2957,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_realloc(void* @ptr, ulong @size); /// Allocate, reallocate, or free an array. @@ -2938,18 +2980,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_reallocp(void* @ptr, ulong @size); /// Allocate, reallocate an array through a pointer to a pointer. @@ -2957,7 +2999,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_reallocp_array(void* @ptr, ulong @nmemb, ulong @size); /// Reduce a fraction. @@ -2967,11 +3009,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern long av_rescale(long @a, long @b, long @c); /// Rescale a timestamp while preserving known durations. @@ -2982,25 +3024,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3008,13 +3050,14 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// aligned size for audio buffer(s), may be NULL /// number of audio channels /// number of samples per channel + /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// >=0 on success or a negative error code on failure - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3025,7 +3068,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3037,7 +3080,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3047,7 +3090,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3056,7 +3099,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3065,7 +3108,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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'. @@ -3074,7 +3117,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. @@ -3082,7 +3125,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_set_options_string(void* @ctx, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3106,19 +3149,21 @@ public static extern int av_set_options_string(void* @ctx, /// Reduce packet size, correctly zeroing padding /// packet /// new size - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern void av_shrink_packet(AVPacket* @pkt, int @size); /// Multiply two `size_t` values checking for overflow. + /// Operand of multiplication + /// Operand of multiplication /// Pointer to the result of the operation /// 0 on success, AVERROR(EINVAL) on overflow - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_strdup( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3133,23 +3178,24 @@ public static extern int av_set_options_string(void* @ctx, /// the side data array. It must be allocated with the av_malloc() family of functions. The ownership of the data is transferred to st. /// side information size /// zero on success, a negative AVERROR code on failure. On failure, the stream is unchanged and the data remains owned by the caller. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_stream_add_side_data(AVStream* @st, AVPacketSideDataType @type, byte* @data, ulong @size); /// Get the AVClass for AVStream. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* av_stream_get_class(); /// Get the internal codec timebase from a stream. /// input stream to extract the timebase from - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_stream_get_codec_timebase(AVStream* @st); /// Returns the pts of the last muxed packet + its duration - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [Obsolete()] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern long av_stream_get_end_pts(AVStream* @st); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecParserContext* av_stream_get_parser(AVStream* @s); /// Get side information from stream. @@ -3157,7 +3203,7 @@ public static extern int av_set_options_string(void* @ctx, /// 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("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_stream_get_side_data(AVStream* @stream, AVPacketSideDataType @type, ulong* @size); /// Allocate new information from stream. @@ -3165,7 +3211,7 @@ public static extern int av_set_options_string(void* @ctx, /// desired side information type /// side information size /// pointer to fresh allocated data or NULL otherwise - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_stream_new_side_data(AVStream* @stream, AVPacketSideDataType @type, ulong @size); /// 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. @@ -3173,14 +3219,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_strndup( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3193,13 +3239,13 @@ public static extern int av_set_options_string(void* @ctx, /// First rational /// Second rational /// b-c - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVRational av_sub_q(AVRational @b, AVRational @c); /// Wrapper to work around the lack of mkstemp() on mingw. Also, tries to create file in /tmp first, if possible. *prefix can be a character constant; *filename will be allocated internally. /// file descriptor of opened file (or negative value corresponding to an AVERROR code on error) and opened file name in **filename. [Obsolete("as fd numbers cannot be passed saftely between libs on some platforms")] - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_tempfile( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3212,12 +3258,12 @@ public static extern int av_tempfile( /// frame number to adjust /// frame per second, multiples of 30 /// adjusted frame number - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_check_frame_rate(AVRational @rate); /// Convert sei info to SMPTE 12M binary representation. @@ -3228,14 +3274,14 @@ public static extern int av_tempfile( /// second /// frame number /// the SMPTE binary representation - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3245,7 +3291,7 @@ public static extern int av_tempfile( /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3258,7 +3304,7 @@ public static extern int av_tempfile( /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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). @@ -3267,7 +3313,7 @@ public static extern int av_tempfile( /// 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern int av_timecode_init_from_string(AVTimecode* @tc, AVRational @rate, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3280,7 +3326,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3288,7 +3334,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3298,7 +3344,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3306,15 +3352,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern byte* av_timecode_make_string(AVTimecode* @tc, byte* @buf, int @framenum); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3322,7 +3368,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3331,11 +3377,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern AVTreeNode* av_tree_node_alloc(); /// Split a URL string into components. @@ -3349,7 +3395,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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)] @@ -3361,11 +3407,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_version_info(); @@ -3374,7 +3420,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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern void av_vlog(void* @avcl, int @level, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3387,10 +3433,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_write_frame(AVFormatContext* @s, AVPacket* @pkt); - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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. @@ -3402,57 +3448,58 @@ 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-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int av_write_trailer(AVFormatContext* @s); /// Write an uncoded frame to an output media file. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecContext* avcodec_alloc_context3(AVCodec* @codec); /// Converts swscale x/y chroma position to AVChromaLocation. /// horizontal chroma sample position /// vertical chroma sample position - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [Obsolete("Use av_chroma_location_pos_to_enum() instead.")] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVChromaLocation avcodec_chroma_pos_to_enum(int @xpos, int @ypos); /// Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext itself). - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_close(AVCodecContext* @avctx); /// Return the libavcodec build-time configuration. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_configuration(); @@ -3461,34 +3508,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_decode_subtitle2(AVCodecContext* @avctx, AVSubtitle* @sub, int* @got_sub_ptr, AVPacket* @avpkt); - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_default_get_encode_buffer(AVCodecContext* @s, AVPacket* @pkt, int @flags); - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecDescriptor* avcodec_descriptor_get_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3500,17 +3547,18 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecDescriptor* avcodec_descriptor_next(AVCodecDescriptor* @prev); /// @{ - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_encode_subtitle(AVCodecContext* @avctx, byte* @buf, int @buf_size, AVSubtitle* @sub); /// Converts AVChromaLocation to swscale x/y chroma position. /// horizontal chroma sample position /// vertical chroma sample position - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [Obsolete("Use av_chroma_location_enum_to_pos() instead.")] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_enum_to_chroma_pos(int* @xpos, int* @ypos, AVChromaLocation @pos); /// Fill AVFrame audio data and linesize pointers. @@ -3521,7 +3569,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. @@ -3530,19 +3578,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* avcodec_find_decoder_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3554,13 +3602,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodec* avcodec_find_encoder_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3570,23 +3618,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avcodec_get_class(); - [Obsolete("This function should not be used.")] - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] - public static extern AVClass* avcodec_get_frame_class(); - /// Retrieve supported hardware configurations for a codec. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. @@ -3595,30 +3639,30 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avcodec_get_subtitle_rect_class(); /// Get the type of the given codec. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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 with no corresponding avcodec_close()), 0 otherwise. /// a positive value if s is open (i.e. avcodec_open2() was called on it with no corresponding avcodec_close()), 0 otherwise. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_is_open(AVCodecContext* @s); /// Return the libavcodec license. - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_license(); @@ -3627,78 +3671,74 @@ 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. On return this object will be filled with options that were not found. /// zero on success, a negative value on error - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_profile_name(AVCodecID @codec_id, int @profile); - /// Return decoded output data from a decoder. + /// 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 decoder. Note that the function will always call av_frame_unref(frame) before doing anything else. - /// 0: success, a frame was returned AVERROR(EAGAIN): output is not available in this state - user must try to send new input AVERROR_EOF: the decoder has been fully flushed, and there will be no more output frames AVERROR(EINVAL): codec not opened, or it is an encoder AVERROR_INPUT_CHANGED: current decoded frame has changed parameters with respect to first decoded frame. Applicable when flag AV_CODEC_FLAG_DROPCHANGED is set. other negative values: legitimate decoding errors - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + /// 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. + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_receive_frame(AVCodecContext* @avctx, AVFrame* @frame); /// 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): output is not available in the current state - user must try to send input AVERROR_EOF: the encoder has been fully flushed, and there will be no more output packets AVERROR(EINVAL): codec not opened, or it is a decoder other errors: legitimate encoding errors - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_packet() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the encoder has been flushed, and no new frames can be sent to it AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate encoding errors - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_frame() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the decoder has been flushed, and no new packets can be sent to it (also returned if more than 1 flush packet is sent) AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate decoding errors - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_send_packet(AVCodecContext* @avctx, AVPacket* @avpkt); /// @} - [DllImport("avcodec-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avcodec_version(); /// Send control message from application to device. @@ -3707,27 +3747,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_app_to_dev_control_message(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size); - /// Initialize capabilities probing API based on AVOption API. - /// Device capabilities data. Pointer to a NULL pointer must be passed. - /// Context of the device. - /// An AVDictionary filled with device-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. 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. - /// >= 0 on success, negative otherwise. - [Obsolete()] - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] - public static extern int avdevice_capabilities_create(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options); - - /// Free resources created by avdevice_capabilities_create() - /// Device capabilities data to be freed. - /// Context of the device. - [Obsolete()] - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] - public static extern void avdevice_capabilities_free(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s); - /// Return the libavdevice build-time configuration. - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avdevice_configuration(); @@ -3737,15 +3761,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", 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(). - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + /// device list to be freed. + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avdevice_free_list_devices(AVDeviceInfoList** @device_list); /// Return the libavdevice license. - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avdevice_license(); @@ -3753,7 +3778,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_list_devices(AVFormatContext* @s, AVDeviceInfoList** @device_list); /// List devices. @@ -3762,7 +3787,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_list_input_sources(AVInputFormat* @device, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3771,7 +3796,7 @@ public static extern int avdevice_list_input_sources(AVInputFormat* @device, #endif string @device_name, AVDictionary* @device_options, AVDeviceInfoList** @device_list); - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3781,37 +3806,37 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avdevice_register_all(); /// Return the LIBAVDEVICE_VERSION_INT constant. - [DllImport("avdevice-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avdevice-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avdevice_version(); /// Negotiate the media format, dimensions, etc of all inputs to a filter. /// the filter to negotiate the properties for its inputs /// zero on successful negotiation - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_config_links(AVFilterContext* @filter); /// Return the libavfilter build-time configuration. - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilter* avfilter_get_by_name( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3822,12 +3847,12 @@ public static extern int avdevice_list_output_sinks(AVOutputFormat* @device, /// Returns AVClass for AVFilterContext. /// AVClass for AVFilterContext. - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avfilter_get_class(); /// Allocate a filter graph. /// the allocated filter graph on success or NULL. - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterGraph* avfilter_graph_alloc(); /// Create a new filter instance in a filter graph. @@ -3835,7 +3860,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterContext* avfilter_graph_alloc_filter(AVFilterGraph* @graph, AVFilter* @filter, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3848,14 +3873,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_config(AVFilterGraph* @graphctx, void* @log_ctx); /// Create and add a filter instance into an existing graph. 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_create_filter(AVFilterContext** @filt_ctx, AVFilter* @filt, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3874,7 +3899,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern byte* avfilter_graph_dump(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3884,14 +3909,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern AVFilterContext* avfilter_graph_get_filter(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3906,7 +3931,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_parse(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3921,7 +3946,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_parse_ptr(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3936,7 +3961,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_parse2(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3951,7 +3976,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -3974,16 +3999,69 @@ 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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. + /// the filtergraph segment to process + /// 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-9", 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-9", 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-9", 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-9", 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-9", CallingConvention = CallingConvention.Cdecl)] + public static extern int avfilter_graph_segment_init(AVFilterGraphSegment* @seg, int @flags); + + /// Link filters in a graph segment. + /// the filtergraph segment to process + /// 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-9", 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. + /// Filter graph the parsed segment is associated with. Will only be used for logging and similar auxiliary purposes. The graph will not be actually modified by this function - the parsing results are instead stored in seg for further processing. + /// 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-9", CallingConvention = CallingConvention.Cdecl)] + public static extern int avfilter_graph_segment_parse(AVFilterGraph* @graph, + #if NETSTANDARD2_1_OR_GREATER + [MarshalAs(UnmanagedType.LPUTF8Str)] + #else + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] + #endif + string @graph_str, int @flags, AVFilterGraphSegment** @seg); + /// Send a command to one or more filter instances. /// the filter graph /// the filter(s) to which the command should be sent "all" sends to all filters otherwise it can be a filter or filter instance name which will send the command to all matching filters. /// 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_graph_send_command(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4006,21 +4084,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_init_str(AVFilterContext* @ctx, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4031,11 +4109,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_inout_free(AVFilterInOut** @inout); /// Insert a filter in the middle of an existing link. @@ -4044,11 +4122,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avfilter_license(); @@ -4058,23 +4136,18 @@ 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_link(AVFilterContext* @src, uint @srcpad, AVFilterContext* @dst, uint @dstpad); /// Free the link in *link, and set its pointer to NULL. - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_link_free(AVFilterLink** @link); - /// Get the number of elements in an AVFilter's inputs or outputs array. - [Obsolete("Use avfilter_filter_pad_count() instead.")] - [DllImport("avfilter-8", CallingConvention = CallingConvention.Cdecl)] - public static extern int avfilter_pad_count(AVFilterPad* @pads); - /// 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avfilter_pad_get_name(AVFilterPad* @pads, int @pad_idx); @@ -4082,11 +4155,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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", CallingConvention = CallingConvention.Cdecl)] public static extern int avfilter_process_command(AVFilterContext* @filter, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4102,19 +4175,20 @@ 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-8", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avfilter-9", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. + /// pointee is set to the created format context, or to NULL in case of failure /// format to use for allocating the context, if NULL format_name and filename are used instead /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, AVOutputFormat* @oformat, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4130,11 +4204,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avformat_close_input(AVFormatContext** @s); /// Return the libavformat build-time configuration. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avformat_configuration(); @@ -4142,79 +4216,79 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_flush(AVFormatContext* @s); /// Free an AVFormatContext and all its streams. /// context to free - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVIndexEntry* avformat_index_get_entry(AVStream* @st, int @idx); /// Get the AVIndexEntry corresponding to the given timestamp. /// Stream containing the requested AVIndexEntry. + /// 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized, negative AVERROR on failure. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + /// 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-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_init_output(AVFormatContext* @s, AVDictionary** @options); /// Return the libavformat license. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_match_stream_specifier(AVFormatContext* @s, AVStream* @st, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4224,18 +4298,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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(). @@ -4244,7 +4318,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, a negative AVERROR on failure. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_open_input(AVFormatContext** @ps, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4258,10 +4332,10 @@ 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_query_codec(AVOutputFormat* @ofmt, AVCodecID @codec_id, int @std_compliance); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_queue_attached_pictures(AVFormatContext* @s); /// 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. @@ -4272,7 +4346,7 @@ public static extern int avformat_open_input(AVFormatContext** @ps, /// largest acceptable timestamp /// flags /// >=0 on success, error code otherwise - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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); /// Transfer internal timing information from one stream to another. @@ -4280,25 +4354,24 @@ public static extern int avformat_open_input(AVFormatContext** @ps, /// output stream which needs timings copy and adjustments /// reference input stream to copy timings from /// define from where the stream codec timebase needs to be imported - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init, negative AVERROR on failure. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + /// 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-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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(). @@ -4310,11 +4383,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_check( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4325,48 +4398,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avio_find_protocol_name( #if NETSTANDARD2_1_OR_GREATER @@ -4377,38 +4450,38 @@ public static extern string avio_find_protocol_name( string @url); /// Force flushing of buffered data. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_flush(AVIOContext* @s); /// Free entry allocated by avio_read_dir(). /// entry to be freed. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_get_str(AVIOContext* @pb, int @maxlen, byte* @buf, int @buflen); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_handshake(AVIOContext* @c); /// Create and initialize a AVIOContext for accessing the resource indicated by url. @@ -4416,7 +4489,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open(AVIOContext** @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4430,7 +4503,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open_dir(AVIODirContext** @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4442,7 +4515,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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. @@ -4452,7 +4525,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_open2(AVIOContext** @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4464,16 +4537,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_printf(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4484,7 +4557,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avio_protocol_get_class( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4495,7 +4568,7 @@ public static extern int avio_printf(AVIOContext* @s, /// Write a NULL-terminated string. /// number of bytes written. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_put_str(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4508,7 +4581,7 @@ public static extern int avio_put_str(AVIOContext* @s, /// the AVIOContext /// NULL-terminated UTF-8 string /// number of bytes written. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_put_str16be(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4521,7 +4594,7 @@ public static extern int avio_put_str16be(AVIOContext* @s, /// the AVIOContext /// NULL-terminated UTF-8 string /// number of bytes written. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_put_str16le(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4531,58 +4604,58 @@ public static extern int avio_put_str16le(AVIOContext* @s, string @str); /// @{ - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_r8(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rb16(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rb24(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rb32(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_read_to_bprint(AVIOContext* @h, AVBPrint* @pb, ulong @max_size); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rl16(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rl24(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern uint avio_rl32(AVIOContext* @s); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern ulong avio_rl64(AVIOContext* @s); /// fseek() equivalent for AVIOContext. /// new position or AVERROR. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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.). @@ -4591,22 +4664,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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern long avio_size(AVIOContext* @s); /// Skip given number of bytes forward /// new position or AVERROR. - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern int avio_vprintf(AVIOContext* @s, #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4615,88 +4688,89 @@ public static extern int avio_vprintf(AVIOContext* @s, #endif string @fmt, byte* @ap); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_w8(AVIOContext* @s, int @b); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb16(AVIOContext* @s, uint @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb24(AVIOContext* @s, uint @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb32(AVIOContext* @s, uint @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wb64(AVIOContext* @s, ulong @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl16(AVIOContext* @s, uint @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl24(AVIOContext* @s, uint @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl32(AVIOContext* @s, uint @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avio_wl64(AVIOContext* @s, ulong @val); - [DllImport("avformat-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avformat-60", 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-59", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avcodec-60", CallingConvention = CallingConvention.Cdecl)] public static extern void avsubtitle_free(AVSubtitle* @sub); /// Return the libavutil build-time configuration. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avutil_configuration(); /// Return the libavutil license. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avutil_license(); /// Return the LIBAVUTIL_VERSION_INT constant. - [DllImport("avutil-57", CallingConvention = CallingConvention.Cdecl)] + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] public static extern uint avutil_version(); /// Return the libpostproc build-time configuration. - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string postproc_configuration(); /// Return the libpostproc license. - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string postproc_license(); /// Return the LIBPOSTPROC_VERSION_INT constant. - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] public static extern uint postproc_version(); - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] public static extern void pp_free_context(void* @ppContext); - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] public static extern void pp_free_mode(void* @mode); - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] public static extern void* pp_get_context(int @width, int @height, int @flags); /// Return a pp_mode or NULL if an error occurred. /// the string after "-pp" on the command line /// a number from 0 to PP_QUALITY_MAX - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] public static extern void* pp_get_mode_by_name_and_quality( #if NETSTANDARD2_1_OR_GREATER [MarshalAs(UnmanagedType.LPUTF8Str)] @@ -4705,7 +4779,7 @@ public static extern int avio_vprintf(AVIOContext* @s, #endif string @name, int @quality); - [DllImport("postproc-56", CallingConvention = CallingConvention.Cdecl)] + [DllImport("postproc-57", CallingConvention = CallingConvention.Cdecl)] public static extern void pp_postprocess(in byte_ptr3 @src, in int3 @srcStride, ref byte_ptr3 @dst, in int3 @dstStride, int @horizontalSize, int @verticalSize, sbyte* @QP_store, int @QP_stride, void* @mode, void* @ppContext, int @pict_type); /// Allocate SwrContext. @@ -4778,6 +4852,8 @@ public static extern int avio_vprintf(AVIOContext* @s, /// Configure or reconfigure the SwrContext using the information provided by the AVFrames. /// audio resample context + /// output AVFrame + /// input AVFrame /// 0 on success, AVERROR on failure. [DllImport("swresample-4", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_config_frame(SwrContext* @swr, AVFrame* @out, AVFrame* @in); @@ -4848,6 +4924,8 @@ public static extern int avio_vprintf(AVIOContext* @s, 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-4", CallingConvention = CallingConvention.Cdecl)] public static extern long swr_next_pts(SwrContext* @s, long @pts); @@ -4890,11 +4968,11 @@ public static extern int avio_vprintf(AVIOContext* @s, public static extern uint swresample_version(); /// Allocate an empty SwsContext. This must be filled and passed to sws_init_context(). For filling see AVOptions, options.c and sws_setColorspaceDetails(). - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern SwsContext* sws_alloc_context(); /// Allocate and return an uninitialized vector with length coefficients. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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. @@ -4902,7 +4980,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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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. @@ -4910,46 +4988,48 @@ 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + /// The scaling context + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_frame_end(SwsContext* @c); /// 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(). + /// The scaling context /// 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_frame_start(SwsContext* @c, AVFrame* @dst, AVFrame* @src); /// Free the swscaler context swsContext. If swsContext is NULL, then does nothing. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_freeContext(SwsContext* @swsContext); - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_freeFilter(SwsFilter* @filter); - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* sws_get_class(); /// Check if context can be reused, otherwise reallocate a new one. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern int* sws_getCoefficients(int @colorspace); - /// #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + /// 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-7", 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(). @@ -4962,49 +5042,51 @@ 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_init_context(SwsContext* @sws_context, SwsFilter* @srcFilter, SwsFilter* @dstFilter); /// 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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(). + /// The scaling context /// 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_receive_slice(SwsContext* @c, uint @slice_start, uint @slice_height); - /// Returns 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. + /// Get the alignment required for slices + /// 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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. @@ -5016,56 +5098,58 @@ 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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 scaling context /// The destination frame. See documentation for sws_frame_start() for more details. /// The source frame. /// 0 on success, a negative AVERROR code on failure - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", 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. + /// The scaling context /// 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-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_send_slice(SwsContext* @c, uint @slice_start, uint @slice_height); - /// Returns negative error code on error, non negative otherwise #else Returns -1 if not supported #endif + /// Returns A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. + /// the scaling context /// the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the input (1=jpeg / 0=mpeg) /// the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the output (1=jpeg / 0=mpeg) /// 16.16 fixed point brightness correction /// 16.16 fixed point contrast correction - /// 16.16 fixed point saturation correction #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + /// 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-7", 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); /// Return the libswscale build-time configuration. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string swscale_configuration(); /// Return the libswscale license. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string swscale_license(); /// Color conversion and scaling library. - [DllImport("swscale-6", CallingConvention = CallingConvention.Cdecl)] + [DllImport("swscale-7", CallingConvention = CallingConvention.Cdecl)] public static extern uint swscale_version(); public unsafe static void Initialize() { - vectors.av_abuffersink_params_alloc = av_abuffersink_params_alloc; vectors.av_add_index_entry = av_add_index_entry; vectors.av_add_q = av_add_q; vectors.av_add_stable = av_add_stable; @@ -5130,7 +5214,6 @@ public unsafe static void Initialize() vectors.av_buffersink_get_time_base = av_buffersink_get_time_base; vectors.av_buffersink_get_type = av_buffersink_get_type; vectors.av_buffersink_get_w = av_buffersink_get_w; - vectors.av_buffersink_params_alloc = av_buffersink_params_alloc; vectors.av_buffersink_set_frame_size = av_buffersink_set_frame_size; vectors.av_buffersrc_add_frame = av_buffersrc_add_frame; vectors.av_buffersrc_add_frame_flags = av_buffersrc_add_frame_flags; @@ -5161,8 +5244,10 @@ public unsafe static void Initialize() vectors.av_channel_layout_uninit = av_channel_layout_uninit; vectors.av_channel_name = av_channel_name; vectors.av_channel_name_bprint = av_channel_name_bprint; + vectors.av_chroma_location_enum_to_pos = av_chroma_location_enum_to_pos; vectors.av_chroma_location_from_name = av_chroma_location_from_name; vectors.av_chroma_location_name = av_chroma_location_name; + vectors.av_chroma_location_pos_to_enum = av_chroma_location_pos_to_enum; vectors.av_codec_get_id = av_codec_get_id; vectors.av_codec_get_tag = av_codec_get_tag; vectors.av_codec_get_tag2 = av_codec_get_tag2; @@ -5195,6 +5280,7 @@ public unsafe static void Initialize() vectors.av_dict_free = av_dict_free; vectors.av_dict_get = av_dict_get; vectors.av_dict_get_string = av_dict_get_string; + vectors.av_dict_iterate = av_dict_iterate; vectors.av_dict_parse_string = av_dict_parse_string; vectors.av_dict_set = av_dict_set; vectors.av_dict_set_int = av_dict_set_int; @@ -5261,7 +5347,6 @@ public unsafe static void Initialize() vectors.av_get_channel_layout_nb_channels = av_get_channel_layout_nb_channels; vectors.av_get_channel_layout_string = av_get_channel_layout_string; vectors.av_get_channel_name = av_get_channel_name; - vectors.av_get_colorspace_name = av_get_colorspace_name; vectors.av_get_cpu_flags = av_get_cpu_flags; vectors.av_get_default_channel_layout = av_get_default_channel_layout; vectors.av_get_exact_bits_per_sample = av_get_exact_bits_per_sample; @@ -5353,7 +5438,6 @@ public unsafe static void Initialize() vectors.av_malloc = av_malloc; vectors.av_malloc_array = av_malloc_array; vectors.av_mallocz = av_mallocz; - vectors.av_mallocz_array = av_mallocz_array; vectors.av_mastering_display_metadata_alloc = av_mastering_display_metadata_alloc; vectors.av_mastering_display_metadata_create_side_data = av_mastering_display_metadata_create_side_data; vectors.av_match_ext = av_match_ext; @@ -5550,7 +5634,6 @@ public unsafe static void Initialize() vectors.avcodec_flush_buffers = avcodec_flush_buffers; vectors.avcodec_free_context = avcodec_free_context; vectors.avcodec_get_class = avcodec_get_class; - vectors.avcodec_get_frame_class = avcodec_get_frame_class; vectors.avcodec_get_hw_config = avcodec_get_hw_config; vectors.avcodec_get_hw_frames_parameters = avcodec_get_hw_frames_parameters; vectors.avcodec_get_name = avcodec_get_name; @@ -5573,8 +5656,6 @@ public unsafe static void Initialize() vectors.avcodec_string = avcodec_string; vectors.avcodec_version = avcodec_version; vectors.avdevice_app_to_dev_control_message = avdevice_app_to_dev_control_message; - vectors.avdevice_capabilities_create = avdevice_capabilities_create; - vectors.avdevice_capabilities_free = avdevice_capabilities_free; vectors.avdevice_configuration = avdevice_configuration; vectors.avdevice_dev_to_app_control_message = avdevice_dev_to_app_control_message; vectors.avdevice_free_list_devices = avdevice_free_list_devices; @@ -5602,6 +5683,13 @@ public unsafe static void Initialize() vectors.avfilter_graph_parse2 = avfilter_graph_parse2; vectors.avfilter_graph_queue_command = avfilter_graph_queue_command; vectors.avfilter_graph_request_oldest = avfilter_graph_request_oldest; + vectors.avfilter_graph_segment_apply = avfilter_graph_segment_apply; + vectors.avfilter_graph_segment_apply_opts = avfilter_graph_segment_apply_opts; + vectors.avfilter_graph_segment_create_filters = avfilter_graph_segment_create_filters; + vectors.avfilter_graph_segment_free = avfilter_graph_segment_free; + vectors.avfilter_graph_segment_init = avfilter_graph_segment_init; + vectors.avfilter_graph_segment_link = avfilter_graph_segment_link; + vectors.avfilter_graph_segment_parse = avfilter_graph_segment_parse; vectors.avfilter_graph_send_command = avfilter_graph_send_command; vectors.avfilter_graph_set_auto_convert = avfilter_graph_set_auto_convert; vectors.avfilter_init_dict = avfilter_init_dict; @@ -5612,7 +5700,6 @@ public unsafe static void Initialize() vectors.avfilter_license = avfilter_license; vectors.avfilter_link = avfilter_link; vectors.avfilter_link_free = avfilter_link_free; - vectors.avfilter_pad_count = avfilter_pad_count; vectors.avfilter_pad_get_name = avfilter_pad_get_name; vectors.avfilter_pad_get_type = avfilter_pad_get_type; vectors.avfilter_process_command = avfilter_process_command; diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/FFmpeg.AutoGen.Bindings.DynamicallyLoaded.csproj b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/FFmpeg.AutoGen.Bindings.DynamicallyLoaded.csproj index 7da6e112..57706460 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/FFmpeg.AutoGen.Bindings.DynamicallyLoaded.csproj +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/FFmpeg.AutoGen.Bindings.DynamicallyLoaded.csproj @@ -1,7 +1,7 @@ - netstandard2.1;netstandard2.0;net45 + netstandard2.1;netstandard2.0 FFmpeg auto generated unsafe bindings for C#/.NET and Mono. The Dynamic Loading implementation relies on lazy import function resolution, and it allows for the specification of the location of native binaries via DynamicallyLoadedBindings.LibrariesPath. diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs index 5aa9c4a4..35f30540 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs @@ -13,12 +13,6 @@ public unsafe static void Initialize() { if (FunctionResolver == null) FunctionResolver = FunctionResolverFactory.Create(); - vectors.av_abuffersink_params_alloc = () => - { - vectors.av_abuffersink_params_alloc = FunctionResolver.GetFunctionDelegate("avfilter", "av_abuffersink_params_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_abuffersink_params_alloc(); - }; - vectors.av_add_index_entry = (AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags) => { vectors.av_add_index_entry = FunctionResolver.GetFunctionDelegate("avformat", "av_add_index_entry", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -403,12 +397,6 @@ public unsafe static void Initialize() return vectors.av_buffersink_get_w(@ctx); }; - vectors.av_buffersink_params_alloc = () => - { - vectors.av_buffersink_params_alloc = FunctionResolver.GetFunctionDelegate("avfilter", "av_buffersink_params_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_buffersink_params_alloc(); - }; - vectors.av_buffersink_set_frame_size = (AVFilterContext* @ctx, uint @frame_size) => { vectors.av_buffersink_set_frame_size = FunctionResolver.GetFunctionDelegate("avfilter", "av_buffersink_set_frame_size", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -589,6 +577,12 @@ public unsafe static void Initialize() vectors.av_channel_name_bprint(@bp, @channel_id); }; + vectors.av_chroma_location_enum_to_pos = (int* @xpos, int* @ypos, AVChromaLocation @pos) => + { + vectors.av_chroma_location_enum_to_pos = FunctionResolver.GetFunctionDelegate("avutil", "av_chroma_location_enum_to_pos", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_chroma_location_enum_to_pos(@xpos, @ypos, @pos); + }; + vectors.av_chroma_location_from_name = (string @name) => { vectors.av_chroma_location_from_name = FunctionResolver.GetFunctionDelegate("avutil", "av_chroma_location_from_name", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -601,6 +595,12 @@ public unsafe static void Initialize() return vectors.av_chroma_location_name(@location); }; + vectors.av_chroma_location_pos_to_enum = (int @xpos, int @ypos) => + { + vectors.av_chroma_location_pos_to_enum = FunctionResolver.GetFunctionDelegate("avutil", "av_chroma_location_pos_to_enum", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_chroma_location_pos_to_enum(@xpos, @ypos); + }; + vectors.av_codec_get_id = (AVCodecTag** @tags, uint @tag) => { vectors.av_codec_get_id = FunctionResolver.GetFunctionDelegate("avformat", "av_codec_get_id", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -793,6 +793,12 @@ public unsafe static void Initialize() return vectors.av_dict_get_string(@m, @buffer, @key_val_sep, @pairs_sep); }; + vectors.av_dict_iterate = (AVDictionary* @m, AVDictionaryEntry* @prev) => + { + vectors.av_dict_iterate = FunctionResolver.GetFunctionDelegate("avutil", "av_dict_iterate", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dict_iterate(@m, @prev); + }; + vectors.av_dict_parse_string = (AVDictionary** @pm, string @str, string @key_val_sep, string @pairs_sep, int @flags) => { vectors.av_dict_parse_string = FunctionResolver.GetFunctionDelegate("avutil", "av_dict_parse_string", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -1189,12 +1195,6 @@ public unsafe static void Initialize() return vectors.av_get_channel_name(@channel); }; - vectors.av_get_colorspace_name = (AVColorSpace @val) => - { - vectors.av_get_colorspace_name = FunctionResolver.GetFunctionDelegate("avutil", "av_get_colorspace_name", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_get_colorspace_name(@val); - }; - vectors.av_get_cpu_flags = () => { vectors.av_get_cpu_flags = FunctionResolver.GetFunctionDelegate("avutil", "av_get_cpu_flags", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -1741,12 +1741,6 @@ public unsafe static void Initialize() return vectors.av_mallocz(@size); }; - vectors.av_mallocz_array = (ulong @nmemb, ulong @size) => - { - vectors.av_mallocz_array = FunctionResolver.GetFunctionDelegate("avutil", "av_mallocz_array", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_mallocz_array(@nmemb, @size); - }; - vectors.av_mastering_display_metadata_alloc = () => { vectors.av_mastering_display_metadata_alloc = FunctionResolver.GetFunctionDelegate("avutil", "av_mastering_display_metadata_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2923,12 +2917,6 @@ public unsafe static void Initialize() return vectors.avcodec_get_class(); }; - vectors.avcodec_get_frame_class = () => - { - vectors.avcodec_get_frame_class = FunctionResolver.GetFunctionDelegate("avcodec", "avcodec_get_frame_class", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avcodec_get_frame_class(); - }; - vectors.avcodec_get_hw_config = (AVCodec* @codec, int @index) => { vectors.avcodec_get_hw_config = FunctionResolver.GetFunctionDelegate("avcodec", "avcodec_get_hw_config", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3061,18 +3049,6 @@ public unsafe static void Initialize() return vectors.avdevice_app_to_dev_control_message(@s, @type, @data, @data_size); }; - vectors.avdevice_capabilities_create = (AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options) => - { - vectors.avdevice_capabilities_create = FunctionResolver.GetFunctionDelegate("avdevice", "avdevice_capabilities_create", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avdevice_capabilities_create(@caps, @s, @device_options); - }; - - vectors.avdevice_capabilities_free = (AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s) => - { - vectors.avdevice_capabilities_free = FunctionResolver.GetFunctionDelegate("avdevice", "avdevice_capabilities_free", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - vectors.avdevice_capabilities_free(@caps, @s); - }; - vectors.avdevice_configuration = () => { vectors.avdevice_configuration = FunctionResolver.GetFunctionDelegate("avdevice", "avdevice_configuration", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3235,6 +3211,48 @@ public unsafe static void Initialize() return vectors.avfilter_graph_request_oldest(@graph); }; + vectors.avfilter_graph_segment_apply = (AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => + { + vectors.avfilter_graph_segment_apply = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_apply", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_apply(@seg, @flags, @inputs, @outputs); + }; + + vectors.avfilter_graph_segment_apply_opts = (AVFilterGraphSegment* @seg, int @flags) => + { + vectors.avfilter_graph_segment_apply_opts = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_apply_opts", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_apply_opts(@seg, @flags); + }; + + vectors.avfilter_graph_segment_create_filters = (AVFilterGraphSegment* @seg, int @flags) => + { + vectors.avfilter_graph_segment_create_filters = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_create_filters", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_create_filters(@seg, @flags); + }; + + vectors.avfilter_graph_segment_free = (AVFilterGraphSegment** @seg) => + { + vectors.avfilter_graph_segment_free = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_free", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + vectors.avfilter_graph_segment_free(@seg); + }; + + vectors.avfilter_graph_segment_init = (AVFilterGraphSegment* @seg, int @flags) => + { + vectors.avfilter_graph_segment_init = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_init", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_init(@seg, @flags); + }; + + vectors.avfilter_graph_segment_link = (AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => + { + vectors.avfilter_graph_segment_link = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_link", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_link(@seg, @flags, @inputs, @outputs); + }; + + vectors.avfilter_graph_segment_parse = (AVFilterGraph* @graph, string @graph_str, int @flags, AVFilterGraphSegment** @seg) => + { + vectors.avfilter_graph_segment_parse = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_parse", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_parse(@graph, @graph_str, @flags, @seg); + }; + vectors.avfilter_graph_send_command = (AVFilterGraph* @graph, string @target, string @cmd, string @arg, byte* @res, int @res_len, int @flags) => { vectors.avfilter_graph_send_command = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_send_command", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3295,12 +3313,6 @@ public unsafe static void Initialize() vectors.avfilter_link_free(@link); }; - vectors.avfilter_pad_count = (AVFilterPad* @pads) => - { - vectors.avfilter_pad_count = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_pad_count", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avfilter_pad_count(@pads); - }; - vectors.avfilter_pad_get_name = (AVFilterPad* @pads, int @pad_idx) => { vectors.avfilter_pad_get_name = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_pad_get_name", 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 797013de..e6118b89 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.libraries.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.libraries.g.cs @@ -6,13 +6,13 @@ public static unsafe partial class DynamicallyLoadedBindings { public static Dictionary LibraryVersionMap = new Dictionary { - {"avcodec", 59}, - {"avdevice", 59}, - {"avfilter", 8}, - {"avformat", 59}, - {"avutil", 57}, - {"postproc", 56}, + {"avcodec", 60}, + {"avdevice", 60}, + {"avfilter", 9}, + {"avformat", 60}, + {"avutil", 58}, + {"postproc", 57}, {"swresample", 4}, - {"swscale", 6}, + {"swscale", 7}, }; } diff --git a/FFmpeg.AutoGen.Bindings.StaticallyLinked/FFmpeg.AutoGen.Bindings.StaticallyLinked.csproj b/FFmpeg.AutoGen.Bindings.StaticallyLinked/FFmpeg.AutoGen.Bindings.StaticallyLinked.csproj index 07a0cf49..bb36f9dc 100644 --- a/FFmpeg.AutoGen.Bindings.StaticallyLinked/FFmpeg.AutoGen.Bindings.StaticallyLinked.csproj +++ b/FFmpeg.AutoGen.Bindings.StaticallyLinked/FFmpeg.AutoGen.Bindings.StaticallyLinked.csproj @@ -1,7 +1,7 @@ - netstandard2.1;netstandard2.0;net45 + netstandard2.1;netstandard2.0 FFmpeg auto generated unsafe bindings for C#/.NET and Mono. The Statically Linked implementation is intended for iOS usage, where FFmpeg is linked into the application binary in a static manner. diff --git a/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs b/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs index b05840cb..11e5ec4d 100644 --- a/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs @@ -6,11 +6,6 @@ namespace FFmpeg.AutoGen.Bindings.StaticallyLinked; public static unsafe partial class StaticallyLinkedBindings { - /// Create an AVABufferSinkParams structure. - [Obsolete()] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern AVABufferSinkParams* av_abuffersink_params_alloc(); - /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -157,6 +152,7 @@ public static unsafe partial class StaticallyLinkedBindings 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_bsf_init(AVBSFContext* @ctx); @@ -218,12 +214,14 @@ public static extern int av_bsf_list_parse_str( string @str, AVBSFContext** @bsf); /// Retrieve a filtered packet. + /// 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("__Internal", 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -387,11 +385,6 @@ public static extern int av_bsf_list_parse_str( [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_buffersink_get_w(AVFilterContext* @ctx); - /// Create an AVBufferSinkParams structure. - [Obsolete()] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern AVBufferSinkParams* av_buffersink_params_alloc(); - /// Set the frame size for an audio buffer sink. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void av_buffersink_set_frame_size(AVFilterContext* @ctx, uint @frame_size); @@ -447,6 +440,7 @@ public static extern int av_bsf_list_parse_str( /// Get a human readable string describing a given channel. /// pre-allocated buffer where to put the generated string /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_description(byte* @buf, ulong @buf_size, AVChannel @channel); @@ -468,12 +462,14 @@ public static extern AVChannel av_channel_from_string( /// 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("__Internal", 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVChannel av_channel_layout_channel_from_string(AVChannelLayout* @channel_layout, @@ -505,6 +501,7 @@ public static extern AVChannel av_channel_layout_channel_from_string(AVChannelLa public static extern int av_channel_layout_copy(AVChannelLayout* @dst, AVChannelLayout* @src); /// Get the default channel layout for a given number of channels. + /// the layout structure to be initialized /// number of channels [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void av_channel_layout_default(AVChannelLayout* @ch_layout, int @nb_channels); @@ -549,12 +546,14 @@ public static extern int av_channel_layout_from_string(AVChannelLayout* @channel /// Get the index of a given channel in a channel layout. In case multiple channels are found, only the first match will be returned. /// 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("__Internal", 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_layout_index_from_string(AVChannelLayout* @channel_layout, @@ -586,6 +585,7 @@ public static extern int av_channel_layout_index_from_string(AVChannelLayout* @c /// Get a human readable string in an abbreviated form describing a given channel. This is the inverse function of av_channel_from_string(). /// pre-allocated buffer where to put the generated string /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_channel_name(byte* @buf, ulong @buf_size, AVChannel @channel); @@ -594,6 +594,12 @@ public static extern int av_channel_layout_index_from_string(AVChannelLayout* @c [DllImport("__Internal", 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("__Internal", 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -611,6 +617,12 @@ public static extern int av_chroma_location_from_name( [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("__Internal", 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 @@ -716,6 +728,8 @@ public static extern int av_color_transfer_from_name( public static extern string av_color_transfer_name(AVColorTransferCharacteristic @transfer); /// Compare the remainders of two integer operands divided by a common divisor. + /// Operand + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -785,9 +799,9 @@ public static extern int av_color_transfer_from_name( public static extern AVInputFormat* av_demuxer_iterate(void** @opaque); /// Copy entries from one AVDictionary struct into another. - /// pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst - /// pointer to source AVDictionary struct - /// flags to use when setting entries in *dst + /// Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL, this function will allocate a struct for you and put it in *dst + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_copy(AVDictionary** @dst, AVDictionary* @src, int @flags); @@ -803,10 +817,10 @@ public static extern int av_color_transfer_from_name( public static extern void av_dict_free(AVDictionary** @m); /// Get a dictionary entry with matching key. - /// matching key + /// Matching key /// 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 + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVDictionaryEntry* av_dict_get(AVDictionary* @m, #if NETSTANDARD2_1_OR_GREATER @@ -817,18 +831,24 @@ public static extern int av_color_transfer_from_name( string @key, AVDictionaryEntry* @prev, int @flags); /// Get dictionary entries as a string. - /// dictionary + /// The dictionary /// Pointer to buffer that will be allocated with string containg entries. Buffer must be freed by the caller when is no longer needed. - /// character used to separate key from value - /// character used to separate two pairs from each other + /// Character used to separate key from value + /// Character used to separate two pairs from each other /// >= 0 on success, negative on error [DllImport("__Internal", 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("__Internal", 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. - /// 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 - /// flags to use when adding to dictionary. AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL are ignored since the key/value tokens will always be duplicated. + /// 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 + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_parse_string(AVDictionary** @pm, @@ -852,9 +872,9 @@ public static extern int av_dict_parse_string(AVDictionary** @pm, string @pairs_sep, int @flags); /// Set the given entry in *pm, overwriting an existing entry. - /// pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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. + /// Pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_set(AVDictionary** @pm, @@ -871,7 +891,7 @@ public static extern int av_dict_set(AVDictionary** @pm, #endif string @value, int @flags); - /// Convenience wrapper for av_dict_set that converts the value to a string and stores it. + /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_dict_set_int(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER @@ -983,6 +1003,9 @@ public static extern void av_dump_format(AVFormatContext* @ic, int @index, 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(). + /// path to the file + /// pointee is set to the mapped or allocated buffer + /// pointee is set to the size in bytes of the buffer /// 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 @@ -996,6 +1019,7 @@ public static extern int av_file_map( string @filename, byte** @bufptr, ulong* @size, int @log_offset, void* @log_ctx); /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void av_file_unmap(byte* @bufptr, ulong @size); @@ -1140,6 +1164,7 @@ public static extern int av_filename_number_test( 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -1210,6 +1235,8 @@ public static extern int av_filename_number_test( 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern long av_gcd(long @a, long @b); @@ -1269,6 +1296,7 @@ public static extern ulong av_get_channel_layout( string @name); /// Get the index of a channel in channel_layout. + /// channel layout bitset /// a channel layout describing exactly one channel which must be present in channel_layout. /// index of channel in channel_layout on success, a negative AVERROR on error. [Obsolete("use av_channel_layout_index_from_channel()")] @@ -1283,6 +1311,8 @@ public static extern ulong av_get_channel_layout( /// Return a description of a channel layout. If nb_channels is <= 0, it is guessed from the channel_layout. /// put here the string containing the channel layout /// size in bytes of the buffer + /// number of channels + /// channel layout bitset [Obsolete("use av_channel_layout_describe()")] [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void av_get_channel_layout_string(byte* @buf, int @buf_size, int @nb_channels, ulong @channel_layout); @@ -1294,13 +1324,6 @@ public static extern ulong av_get_channel_layout( [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string av_get_channel_name(ulong @channel); - /// Get the name of a colorspace. - /// a static string identifying the colorspace; can be NULL. - [Obsolete("use av_color_space_name()")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] - public static extern string av_get_colorspace_name(AVColorSpace @val); - /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_cpu_flags(); @@ -1366,7 +1389,6 @@ 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 - /// 0 if OK, AVERROR(ENOSYS) if the format does not support it Note: some formats or devices may not allow to measure dts and wall atomically. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_get_output_timestamp(AVFormatContext* @s, int @stream, long* @dts, long* @wall); @@ -1654,6 +1676,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVHWDeviceType av_hwdevice_iterate_types(AVHWDeviceType @prev); @@ -1671,6 +1694,7 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// Create and initialise an AVHWFramesContext as a mapping of another existing AVHWFramesContext on a different device. /// On success, a reference to the newly created AVHWFramesContext. + /// The AVPixelFormat for the derived context. /// A reference to the device to create the new AVHWFramesContext on. /// 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. @@ -1718,6 +1742,11 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( 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]). + /// array to be filled with the pointer for each image plane + /// the array filled with the linesize for each plane + /// width of the image in pixels + /// height of the image in pixels + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -1752,14 +1781,22 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( 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. + /// destination image data buffer to copy to /// linesizes for the image in dst_data + /// source image data buffer to copy from /// linesizes for the image in src_data + /// the AVPixelFormat of the image + /// width of the image in pixels + /// height of the image in pixels [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void av_image_copy(ref byte_ptr4 @dst_data, ref 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. + /// destination plane to copy to /// linesize for the image plane in dst + /// source plane to copy from /// linesize for the image plane in src + /// height (number of lines) of the plane [DllImport("__Internal", 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); @@ -1809,6 +1846,8 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// Fill plane linesizes for an image with pixel format pix_fmt and width width. /// array to be filled with the linesize for each plane + /// the AVPixelFormat of the image + /// width of the image in pixels /// >= 0 in case of success, a negative error code otherwise [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_image_fill_linesizes(ref int4 @linesizes, AVPixelFormat @pix_fmt, int @width); @@ -1816,11 +1855,14 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// 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("__Internal", 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. /// the array to be filled with the size of each image plane + /// the AVPixelFormat of the image + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -1828,6 +1870,8 @@ public static extern AVHWDeviceType av_hwdevice_find_type_by_name( /// Fill plane data pointers for an image with pixel format pix_fmt and height height. /// pointers array to be filled with the pointer for each image plane + /// the AVPixelFormat of the image + /// height of the image in pixels /// 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 @@ -2005,10 +2049,6 @@ public static extern void av_log_once(void* @avcl, int @initial_level, int @subs [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void* av_mallocz(ulong @size); - [Obsolete("use av_calloc()")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern void* av_mallocz_array(ulong @nmemb, 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -2072,6 +2112,8 @@ public static extern int av_match_ext( /// Find which of the two rationals is closer to another rational. /// Rational to be compared against + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int av_nearer_q(AVRational @q, AVRational @q1, AVRational @q2); @@ -3008,6 +3050,7 @@ public static extern int av_probe_input_buffer2(AVIOContext* @pb, AVInputFormat* /// aligned size for audio buffer(s), may be NULL /// number of audio channels /// number of samples per channel + /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// >=0 on success or a negative error code on failure [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -3110,6 +3153,8 @@ public static extern int av_set_options_string(void* @ctx, public static extern void av_shrink_packet(AVPacket* @pkt, int @size); /// Multiply two `size_t` values checking for overflow. + /// Operand of multiplication + /// Operand of multiplication /// Pointer to the result of the operation /// 0 on success, AVERROR(EINVAL) on overflow [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -3146,6 +3191,7 @@ public static extern int av_set_options_string(void* @ctx, public static extern AVRational av_stream_get_codec_timebase(AVStream* @st); /// Returns the pts of the last muxed packet + its duration + [Obsolete()] [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern long av_stream_get_end_pts(AVStream* @st); @@ -3444,6 +3490,7 @@ public static extern void av_vlog(void* @avcl, int @level, /// Converts swscale x/y chroma position to AVChromaLocation. /// horizontal chroma sample position /// vertical chroma sample position + [Obsolete("Use av_chroma_location_pos_to_enum() instead.")] [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVChromaLocation avcodec_chroma_pos_to_enum(int @xpos, int @ypos); @@ -3510,6 +3557,7 @@ public static extern void av_vlog(void* @avcl, int @level, /// Converts AVChromaLocation to swscale x/y chroma position. /// horizontal chroma sample position /// vertical chroma sample position + [Obsolete("Use av_chroma_location_enum_to_pos() instead.")] [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_enum_to_chroma_pos(int* @xpos, int* @ypos, AVChromaLocation @pos); @@ -3581,10 +3629,6 @@ public static extern void av_vlog(void* @avcl, int @level, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVClass* avcodec_get_class(); - [Obsolete("This function should not be used.")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern AVClass* avcodec_get_frame_class(); - /// Retrieve supported hardware configurations for a codec. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern AVCodecHWConfig* avcodec_get_hw_config(AVCodec* @codec, int @index); @@ -3665,31 +3709,27 @@ public static extern void av_vlog(void* @avcl, int @level, [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public static extern string avcodec_profile_name(AVCodecID @codec_id, int @profile); - /// Return decoded output data from a decoder. + /// 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 decoder. Note that the function will always call av_frame_unref(frame) before doing anything else. - /// 0: success, a frame was returned AVERROR(EAGAIN): output is not available in this state - user must try to send new input AVERROR_EOF: the decoder has been fully flushed, and there will be no more output frames AVERROR(EINVAL): codec not opened, or it is an encoder AVERROR_INPUT_CHANGED: current decoded frame has changed parameters with respect to first decoded frame. Applicable when flag AV_CODEC_FLAG_DROPCHANGED is set. other negative values: legitimate decoding errors + /// 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. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_receive_frame(AVCodecContext* @avctx, AVFrame* @frame); /// 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): output is not available in the current state - user must try to send input AVERROR_EOF: the encoder has been fully flushed, and there will be no more output packets AVERROR(EINVAL): codec not opened, or it is a decoder other errors: legitimate encoding errors [DllImport("__Internal", 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_packet() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the encoder has been flushed, and no new frames can be sent to it AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate encoding errors [DllImport("__Internal", 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_frame() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the decoder has been flushed, and no new packets can be sent to it (also returned if more than 1 flush packet is sent) AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate decoding errors [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avcodec_send_packet(AVCodecContext* @avctx, AVPacket* @avpkt); @@ -3710,22 +3750,6 @@ public static extern void av_vlog(void* @avcl, int @level, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avdevice_app_to_dev_control_message(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size); - /// Initialize capabilities probing API based on AVOption API. - /// Device capabilities data. Pointer to a NULL pointer must be passed. - /// Context of the device. - /// An AVDictionary filled with device-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. 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. - /// >= 0 on success, negative otherwise. - [Obsolete()] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern int avdevice_capabilities_create(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options); - - /// Free resources created by avdevice_capabilities_create() - /// Device capabilities data to be freed. - /// Context of the device. - [Obsolete()] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern void avdevice_capabilities_free(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s); - /// Return the libavdevice build-time configuration. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] @@ -3741,6 +3765,7 @@ public static extern void av_vlog(void* @avcl, int @level, 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void avdevice_free_list_devices(AVDeviceInfoList** @device_list); @@ -3977,6 +4002,59 @@ public static extern int avfilter_graph_queue_command(AVFilterGraph* @graph, [DllImport("__Internal", 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. + /// the filtergraph segment to process + /// reserved for future use, caller must set to 0 for now + /// passed to avfilter_graph_segment_link() + /// passed to avfilter_graph_segment_link() + [DllImport("__Internal", 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("__Internal", 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("__Internal", 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("__Internal", 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("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern int avfilter_graph_segment_init(AVFilterGraphSegment* @seg, int @flags); + + /// Link filters in a graph segment. + /// the filtergraph segment to process + /// 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("__Internal", 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. + /// Filter graph the parsed segment is associated with. Will only be used for logging and similar auxiliary purposes. The graph will not be actually modified by this function - the parsing results are instead stored in seg for further processing. + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern int avfilter_graph_segment_parse(AVFilterGraph* @graph, + #if NETSTANDARD2_1_OR_GREATER + [MarshalAs(UnmanagedType.LPUTF8Str)] + #else + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] + #endif + string @graph_str, int @flags, AVFilterGraphSegment** @seg); + /// Send a command to one or more filter instances. /// the filter graph /// the filter(s) to which the command should be sent "all" sends to all filters otherwise it can be a filter or filter instance name which will send the command to all matching filters. @@ -4065,11 +4143,6 @@ public static extern int avfilter_init_str(AVFilterContext* @ctx, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void avfilter_link_free(AVFilterLink** @link); - /// Get the number of elements in an AVFilter's inputs or outputs array. - [Obsolete("Use avfilter_filter_pad_count() instead.")] - [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] - public static extern int avfilter_pad_count(AVFilterPad* @pads); - /// 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 @@ -4110,6 +4183,7 @@ public static extern int avfilter_process_command(AVFilterContext* @filter, 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. + /// pointee is set to the created format context, or to NULL in case of failure /// format to use for allocating the context, if NULL format_name and filename are used instead /// 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 @@ -4195,15 +4269,15 @@ public static extern int avformat_alloc_output_context2(AVFormatContext** @ctx, /// Get the AVIndexEntry corresponding to the given timestamp. /// Stream containing the requested AVIndexEntry. + /// 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("__Internal", 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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized, negative AVERROR on failure. + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_init_output(AVFormatContext* @s, AVDictionary** @options); @@ -4288,9 +4362,8 @@ public static extern int avformat_open_input(AVFormatContext** @ps, 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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init, negative AVERROR on failure. + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int avformat_write_header(AVFormatContext* @s, AVDictionary** @options); @@ -4646,6 +4719,7 @@ public static extern int avio_vprintf(AVIOContext* @s, 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("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -4778,6 +4852,8 @@ public static extern int avio_vprintf(AVIOContext* @s, /// Configure or reconfigure the SwrContext using the information provided by the AVFrames. /// audio resample context + /// output AVFrame + /// input AVFrame /// 0 on success, AVERROR on failure. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int swr_config_frame(SwrContext* @swr, AVFrame* @out, AVFrame* @in); @@ -4848,6 +4924,8 @@ public static extern int avio_vprintf(AVIOContext* @s, 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern long swr_next_pts(SwrContext* @s, long @pts); @@ -4914,10 +4992,12 @@ public static extern int avio_vprintf(AVIOContext* @s, 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern void sws_frame_end(SwsContext* @c); /// 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(). + /// The scaling context /// 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 @@ -4947,8 +5027,8 @@ public static extern int avio_vprintf(AVIOContext* @s, [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int* sws_getCoefficients(int @colorspace); - /// #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else + /// 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("__Internal", 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); @@ -4996,13 +5076,15 @@ public static extern int avio_vprintf(AVIOContext* @s, 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(). + /// The scaling context /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_receive_slice(SwsContext* @c, uint @slice_start, uint @slice_height); - /// Returns 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. + /// Get the alignment required for slices + /// 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("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern uint sws_receive_slice_alignment(SwsContext* @c); @@ -5020,6 +5102,7 @@ public static extern int avio_vprintf(AVIOContext* @s, 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 scaling context /// The destination frame. See documentation for sws_frame_start() for more details. /// The source frame. /// 0 on success, a negative AVERROR code on failure @@ -5031,21 +5114,23 @@ public static extern int avio_vprintf(AVIOContext* @s, 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. + /// The scaling context /// first row of the slice /// number of rows in the slice /// a non-negative number on success, a negative AVERROR code on failure. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] public static extern int sws_send_slice(SwsContext* @c, uint @slice_start, uint @slice_height); - /// Returns negative error code on error, non negative otherwise #else Returns -1 if not supported #endif + /// Returns A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. + /// the scaling context /// the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the input (1=jpeg / 0=mpeg) /// the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the output (1=jpeg / 0=mpeg) /// 16.16 fixed point brightness correction /// 16.16 fixed point contrast correction - /// 16.16 fixed point saturation correction #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else + /// 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("__Internal", 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); @@ -5065,7 +5150,6 @@ public static extern int avio_vprintf(AVIOContext* @s, public unsafe static void Initialize() { - vectors.av_abuffersink_params_alloc = av_abuffersink_params_alloc; vectors.av_add_index_entry = av_add_index_entry; vectors.av_add_q = av_add_q; vectors.av_add_stable = av_add_stable; @@ -5130,7 +5214,6 @@ public unsafe static void Initialize() vectors.av_buffersink_get_time_base = av_buffersink_get_time_base; vectors.av_buffersink_get_type = av_buffersink_get_type; vectors.av_buffersink_get_w = av_buffersink_get_w; - vectors.av_buffersink_params_alloc = av_buffersink_params_alloc; vectors.av_buffersink_set_frame_size = av_buffersink_set_frame_size; vectors.av_buffersrc_add_frame = av_buffersrc_add_frame; vectors.av_buffersrc_add_frame_flags = av_buffersrc_add_frame_flags; @@ -5161,8 +5244,10 @@ public unsafe static void Initialize() vectors.av_channel_layout_uninit = av_channel_layout_uninit; vectors.av_channel_name = av_channel_name; vectors.av_channel_name_bprint = av_channel_name_bprint; + vectors.av_chroma_location_enum_to_pos = av_chroma_location_enum_to_pos; vectors.av_chroma_location_from_name = av_chroma_location_from_name; vectors.av_chroma_location_name = av_chroma_location_name; + vectors.av_chroma_location_pos_to_enum = av_chroma_location_pos_to_enum; vectors.av_codec_get_id = av_codec_get_id; vectors.av_codec_get_tag = av_codec_get_tag; vectors.av_codec_get_tag2 = av_codec_get_tag2; @@ -5195,6 +5280,7 @@ public unsafe static void Initialize() vectors.av_dict_free = av_dict_free; vectors.av_dict_get = av_dict_get; vectors.av_dict_get_string = av_dict_get_string; + vectors.av_dict_iterate = av_dict_iterate; vectors.av_dict_parse_string = av_dict_parse_string; vectors.av_dict_set = av_dict_set; vectors.av_dict_set_int = av_dict_set_int; @@ -5261,7 +5347,6 @@ public unsafe static void Initialize() vectors.av_get_channel_layout_nb_channels = av_get_channel_layout_nb_channels; vectors.av_get_channel_layout_string = av_get_channel_layout_string; vectors.av_get_channel_name = av_get_channel_name; - vectors.av_get_colorspace_name = av_get_colorspace_name; vectors.av_get_cpu_flags = av_get_cpu_flags; vectors.av_get_default_channel_layout = av_get_default_channel_layout; vectors.av_get_exact_bits_per_sample = av_get_exact_bits_per_sample; @@ -5353,7 +5438,6 @@ public unsafe static void Initialize() vectors.av_malloc = av_malloc; vectors.av_malloc_array = av_malloc_array; vectors.av_mallocz = av_mallocz; - vectors.av_mallocz_array = av_mallocz_array; vectors.av_mastering_display_metadata_alloc = av_mastering_display_metadata_alloc; vectors.av_mastering_display_metadata_create_side_data = av_mastering_display_metadata_create_side_data; vectors.av_match_ext = av_match_ext; @@ -5550,7 +5634,6 @@ public unsafe static void Initialize() vectors.avcodec_flush_buffers = avcodec_flush_buffers; vectors.avcodec_free_context = avcodec_free_context; vectors.avcodec_get_class = avcodec_get_class; - vectors.avcodec_get_frame_class = avcodec_get_frame_class; vectors.avcodec_get_hw_config = avcodec_get_hw_config; vectors.avcodec_get_hw_frames_parameters = avcodec_get_hw_frames_parameters; vectors.avcodec_get_name = avcodec_get_name; @@ -5573,8 +5656,6 @@ public unsafe static void Initialize() vectors.avcodec_string = avcodec_string; vectors.avcodec_version = avcodec_version; vectors.avdevice_app_to_dev_control_message = avdevice_app_to_dev_control_message; - vectors.avdevice_capabilities_create = avdevice_capabilities_create; - vectors.avdevice_capabilities_free = avdevice_capabilities_free; vectors.avdevice_configuration = avdevice_configuration; vectors.avdevice_dev_to_app_control_message = avdevice_dev_to_app_control_message; vectors.avdevice_free_list_devices = avdevice_free_list_devices; @@ -5602,6 +5683,13 @@ public unsafe static void Initialize() vectors.avfilter_graph_parse2 = avfilter_graph_parse2; vectors.avfilter_graph_queue_command = avfilter_graph_queue_command; vectors.avfilter_graph_request_oldest = avfilter_graph_request_oldest; + vectors.avfilter_graph_segment_apply = avfilter_graph_segment_apply; + vectors.avfilter_graph_segment_apply_opts = avfilter_graph_segment_apply_opts; + vectors.avfilter_graph_segment_create_filters = avfilter_graph_segment_create_filters; + vectors.avfilter_graph_segment_free = avfilter_graph_segment_free; + vectors.avfilter_graph_segment_init = avfilter_graph_segment_init; + vectors.avfilter_graph_segment_link = avfilter_graph_segment_link; + vectors.avfilter_graph_segment_parse = avfilter_graph_segment_parse; vectors.avfilter_graph_send_command = avfilter_graph_send_command; vectors.avfilter_graph_set_auto_convert = avfilter_graph_set_auto_convert; vectors.avfilter_init_dict = avfilter_init_dict; @@ -5612,7 +5700,6 @@ public unsafe static void Initialize() vectors.avfilter_license = avfilter_license; vectors.avfilter_link = avfilter_link; vectors.avfilter_link_free = avfilter_link_free; - vectors.avfilter_pad_count = avfilter_pad_count; vectors.avfilter_pad_get_name = avfilter_pad_get_name; vectors.avfilter_pad_get_type = avfilter_pad_get_type; vectors.avfilter_process_command = avfilter_process_command; diff --git a/FFmpeg.AutoGen/FFmpeg.AutoGen.csproj b/FFmpeg.AutoGen/FFmpeg.AutoGen.csproj index 3094c627..4d9333f9 100644 --- a/FFmpeg.AutoGen/FFmpeg.AutoGen.csproj +++ b/FFmpeg.AutoGen/FFmpeg.AutoGen.csproj @@ -1,7 +1,7 @@  - netstandard2.1;netstandard2.0;net45 + netstandard2.1;netstandard2.0 FFmpeg auto generated unsafe bindings for C#/.NET and Mono. true diff --git a/FFmpeg.AutoGen/generated/Delegates.g.cs b/FFmpeg.AutoGen/generated/Delegates.g.cs index 9989085d..7d90efb4 100644 --- a/FFmpeg.AutoGen/generated/Delegates.g.cs +++ b/FFmpeg.AutoGen/generated/Delegates.g.cs @@ -255,14 +255,6 @@ public unsafe struct AVFilter_activate_func public static implicit operator AVFilter_activate_func(AVFilter_activate func) => new AVFilter_activate_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; } -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVFilter_init_dict (AVFilterContext* @ctx, AVDictionary** @options); -public unsafe struct AVFilter_init_dict_func -{ - public IntPtr Pointer; - public static implicit operator AVFilter_init_dict_func(AVFilter_init_dict func) => new AVFilter_init_dict_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public unsafe delegate int AVFilter_init (AVFilterContext* @ctx); public unsafe struct AVFilter_init_func @@ -601,102 +593,6 @@ public unsafe struct AVIOInterruptCB_callback_func public static implicit operator AVIOInterruptCB_callback_func(AVIOInterruptCB_callback func) => new AVIOInterruptCB_callback_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; } -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_check_bitstream (AVFormatContext* @s, AVStream* @st, AVPacket* @pkt); -public unsafe struct AVOutputFormat_check_bitstream_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_check_bitstream_func(AVOutputFormat_check_bitstream func) => new AVOutputFormat_check_bitstream_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_control_message (AVFormatContext* @s, int @type, void* @data, ulong @data_size); -public unsafe struct AVOutputFormat_control_message_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_control_message_func(AVOutputFormat_control_message func) => new AVOutputFormat_control_message_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate void AVOutputFormat_deinit (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_deinit_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_deinit_func(AVOutputFormat_deinit func) => new AVOutputFormat_deinit_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_get_device_list (AVFormatContext* @s, AVDeviceInfoList* @device_list); -public unsafe struct AVOutputFormat_get_device_list_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_get_device_list_func(AVOutputFormat_get_device_list func) => new AVOutputFormat_get_device_list_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate void AVOutputFormat_get_output_timestamp (AVFormatContext* @s, int @stream, long* @dts, long* @wall); -public unsafe struct AVOutputFormat_get_output_timestamp_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_get_output_timestamp_func(AVOutputFormat_get_output_timestamp func) => new AVOutputFormat_get_output_timestamp_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_init (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_init_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_init_func(AVOutputFormat_init func) => new AVOutputFormat_init_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_interleave_packet (AVFormatContext* @s, AVPacket* @pkt, int @flush, int @has_packet); -public unsafe struct AVOutputFormat_interleave_packet_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_interleave_packet_func(AVOutputFormat_interleave_packet func) => new AVOutputFormat_interleave_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_query_codec (AVCodecID @id, int @std_compliance); -public unsafe struct AVOutputFormat_query_codec_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_query_codec_func(AVOutputFormat_query_codec func) => new AVOutputFormat_query_codec_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_header (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_write_header_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_header_func(AVOutputFormat_write_header func) => new AVOutputFormat_write_header_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_packet (AVFormatContext* @p0, AVPacket* @pkt); -public unsafe struct AVOutputFormat_write_packet_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_packet_func(AVOutputFormat_write_packet func) => new AVOutputFormat_write_packet_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_trailer (AVFormatContext* @p0); -public unsafe struct AVOutputFormat_write_trailer_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_trailer_func(AVOutputFormat_write_trailer func) => new AVOutputFormat_write_trailer_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - -[UnmanagedFunctionPointer(CallingConvention.Cdecl)] -public unsafe delegate int AVOutputFormat_write_uncoded_frame (AVFormatContext* @p0, int @stream_index, AVFrame** @frame, uint @flags); -public unsafe struct AVOutputFormat_write_uncoded_frame_func -{ - public IntPtr Pointer; - public static implicit operator AVOutputFormat_write_uncoded_frame_func(AVOutputFormat_write_uncoded_frame func) => new AVOutputFormat_write_uncoded_frame_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) }; -} - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public unsafe delegate int func (AVFilterContext* @ctx, void* @arg, int @jobnr, int @nb_jobs); public unsafe struct func_func diff --git a/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs b/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs index 12e22d93..75f7cb20 100644 --- a/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs +++ b/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs @@ -12,12 +12,6 @@ public unsafe static void Initialize() { if (FunctionResolver == null) FunctionResolver = FunctionResolverFactory.Create(); - vectors.av_abuffersink_params_alloc = () => - { - vectors.av_abuffersink_params_alloc = FunctionResolver.GetFunctionDelegate("avfilter", "av_abuffersink_params_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_abuffersink_params_alloc(); - }; - vectors.av_add_index_entry = (AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags) => { vectors.av_add_index_entry = FunctionResolver.GetFunctionDelegate("avformat", "av_add_index_entry", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -402,12 +396,6 @@ public unsafe static void Initialize() return vectors.av_buffersink_get_w(@ctx); }; - vectors.av_buffersink_params_alloc = () => - { - vectors.av_buffersink_params_alloc = FunctionResolver.GetFunctionDelegate("avfilter", "av_buffersink_params_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_buffersink_params_alloc(); - }; - vectors.av_buffersink_set_frame_size = (AVFilterContext* @ctx, uint @frame_size) => { vectors.av_buffersink_set_frame_size = FunctionResolver.GetFunctionDelegate("avfilter", "av_buffersink_set_frame_size", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -588,6 +576,12 @@ public unsafe static void Initialize() vectors.av_channel_name_bprint(@bp, @channel_id); }; + vectors.av_chroma_location_enum_to_pos = (int* @xpos, int* @ypos, AVChromaLocation @pos) => + { + vectors.av_chroma_location_enum_to_pos = FunctionResolver.GetFunctionDelegate("avutil", "av_chroma_location_enum_to_pos", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_chroma_location_enum_to_pos(@xpos, @ypos, @pos); + }; + vectors.av_chroma_location_from_name = (string @name) => { vectors.av_chroma_location_from_name = FunctionResolver.GetFunctionDelegate("avutil", "av_chroma_location_from_name", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -600,6 +594,12 @@ public unsafe static void Initialize() return vectors.av_chroma_location_name(@location); }; + vectors.av_chroma_location_pos_to_enum = (int @xpos, int @ypos) => + { + vectors.av_chroma_location_pos_to_enum = FunctionResolver.GetFunctionDelegate("avutil", "av_chroma_location_pos_to_enum", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_chroma_location_pos_to_enum(@xpos, @ypos); + }; + vectors.av_codec_get_id = (AVCodecTag** @tags, uint @tag) => { vectors.av_codec_get_id = FunctionResolver.GetFunctionDelegate("avformat", "av_codec_get_id", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -792,6 +792,12 @@ public unsafe static void Initialize() return vectors.av_dict_get_string(@m, @buffer, @key_val_sep, @pairs_sep); }; + vectors.av_dict_iterate = (AVDictionary* @m, AVDictionaryEntry* @prev) => + { + vectors.av_dict_iterate = FunctionResolver.GetFunctionDelegate("avutil", "av_dict_iterate", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.av_dict_iterate(@m, @prev); + }; + vectors.av_dict_parse_string = (AVDictionary** @pm, string @str, string @key_val_sep, string @pairs_sep, int @flags) => { vectors.av_dict_parse_string = FunctionResolver.GetFunctionDelegate("avutil", "av_dict_parse_string", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -1188,12 +1194,6 @@ public unsafe static void Initialize() return vectors.av_get_channel_name(@channel); }; - vectors.av_get_colorspace_name = (AVColorSpace @val) => - { - vectors.av_get_colorspace_name = FunctionResolver.GetFunctionDelegate("avutil", "av_get_colorspace_name", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_get_colorspace_name(@val); - }; - vectors.av_get_cpu_flags = () => { vectors.av_get_cpu_flags = FunctionResolver.GetFunctionDelegate("avutil", "av_get_cpu_flags", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -1740,12 +1740,6 @@ public unsafe static void Initialize() return vectors.av_mallocz(@size); }; - vectors.av_mallocz_array = (ulong @nmemb, ulong @size) => - { - vectors.av_mallocz_array = FunctionResolver.GetFunctionDelegate("avutil", "av_mallocz_array", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.av_mallocz_array(@nmemb, @size); - }; - vectors.av_mastering_display_metadata_alloc = () => { vectors.av_mastering_display_metadata_alloc = FunctionResolver.GetFunctionDelegate("avutil", "av_mastering_display_metadata_alloc", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -2922,12 +2916,6 @@ public unsafe static void Initialize() return vectors.avcodec_get_class(); }; - vectors.avcodec_get_frame_class = () => - { - vectors.avcodec_get_frame_class = FunctionResolver.GetFunctionDelegate("avcodec", "avcodec_get_frame_class", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avcodec_get_frame_class(); - }; - vectors.avcodec_get_hw_config = (AVCodec* @codec, int @index) => { vectors.avcodec_get_hw_config = FunctionResolver.GetFunctionDelegate("avcodec", "avcodec_get_hw_config", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3060,18 +3048,6 @@ public unsafe static void Initialize() return vectors.avdevice_app_to_dev_control_message(@s, @type, @data, @data_size); }; - vectors.avdevice_capabilities_create = (AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options) => - { - vectors.avdevice_capabilities_create = FunctionResolver.GetFunctionDelegate("avdevice", "avdevice_capabilities_create", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avdevice_capabilities_create(@caps, @s, @device_options); - }; - - vectors.avdevice_capabilities_free = (AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s) => - { - vectors.avdevice_capabilities_free = FunctionResolver.GetFunctionDelegate("avdevice", "avdevice_capabilities_free", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - vectors.avdevice_capabilities_free(@caps, @s); - }; - vectors.avdevice_configuration = () => { vectors.avdevice_configuration = FunctionResolver.GetFunctionDelegate("avdevice", "avdevice_configuration", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3234,6 +3210,48 @@ public unsafe static void Initialize() return vectors.avfilter_graph_request_oldest(@graph); }; + vectors.avfilter_graph_segment_apply = (AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => + { + vectors.avfilter_graph_segment_apply = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_apply", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_apply(@seg, @flags, @inputs, @outputs); + }; + + vectors.avfilter_graph_segment_apply_opts = (AVFilterGraphSegment* @seg, int @flags) => + { + vectors.avfilter_graph_segment_apply_opts = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_apply_opts", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_apply_opts(@seg, @flags); + }; + + vectors.avfilter_graph_segment_create_filters = (AVFilterGraphSegment* @seg, int @flags) => + { + vectors.avfilter_graph_segment_create_filters = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_create_filters", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_create_filters(@seg, @flags); + }; + + vectors.avfilter_graph_segment_free = (AVFilterGraphSegment** @seg) => + { + vectors.avfilter_graph_segment_free = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_free", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + vectors.avfilter_graph_segment_free(@seg); + }; + + vectors.avfilter_graph_segment_init = (AVFilterGraphSegment* @seg, int @flags) => + { + vectors.avfilter_graph_segment_init = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_init", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_init(@seg, @flags); + }; + + vectors.avfilter_graph_segment_link = (AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => + { + vectors.avfilter_graph_segment_link = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_link", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_link(@seg, @flags, @inputs, @outputs); + }; + + vectors.avfilter_graph_segment_parse = (AVFilterGraph* @graph, string @graph_str, int @flags, AVFilterGraphSegment** @seg) => + { + vectors.avfilter_graph_segment_parse = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_segment_parse", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; + return vectors.avfilter_graph_segment_parse(@graph, @graph_str, @flags, @seg); + }; + vectors.avfilter_graph_send_command = (AVFilterGraph* @graph, string @target, string @cmd, string @arg, byte* @res, int @res_len, int @flags) => { vectors.avfilter_graph_send_command = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_graph_send_command", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; @@ -3294,12 +3312,6 @@ public unsafe static void Initialize() vectors.avfilter_link_free(@link); }; - vectors.avfilter_pad_count = (AVFilterPad* @pads) => - { - vectors.avfilter_pad_count = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_pad_count", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; - return vectors.avfilter_pad_count(@pads); - }; - vectors.avfilter_pad_get_name = (AVFilterPad* @pads, int @pad_idx) => { vectors.avfilter_pad_get_name = FunctionResolver.GetFunctionDelegate("avfilter", "avfilter_pad_get_name", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; diff --git a/FFmpeg.AutoGen/generated/Enums.g.cs b/FFmpeg.AutoGen/generated/Enums.g.cs index ca5913c3..672210f7 100644 --- a/FFmpeg.AutoGen/generated/Enums.g.cs +++ b/FFmpeg.AutoGen/generated/Enums.g.cs @@ -55,7 +55,7 @@ public enum AVAudioServiceType : int @AV_AUDIO_SERVICE_TYPE_NB = 9, } -/// @{ +/// Audio channel layout utility functions public enum AVChannel : int { @AV_CHAN_NONE = -1, @@ -429,6 +429,10 @@ public enum AVCodecID : int @AV_CODEC_ID_JPEGXL = 259, @AV_CODEC_ID_QOI = 260, @AV_CODEC_ID_PHM = 261, + @AV_CODEC_ID_RADIANCE_HDR = 262, + @AV_CODEC_ID_WBMP = 263, + @AV_CODEC_ID_MEDIA100 = 264, + @AV_CODEC_ID_VQC = 265, /// A dummy id pointing at the start of audio codecs @AV_CODEC_ID_FIRST_AUDIO = 65536, @AV_CODEC_ID_PCM_S16LE = 65536, @@ -519,6 +523,7 @@ public enum AVCodecID : int @AV_CODEC_ID_ADPCM_IMA_CUNNING = 69680, @AV_CODEC_ID_ADPCM_IMA_MOFLEX = 69681, @AV_CODEC_ID_ADPCM_IMA_ACORN = 69682, + @AV_CODEC_ID_ADPCM_XMD = 69683, @AV_CODEC_ID_AMR_NB = 73728, @AV_CODEC_ID_AMR_WB = 73729, @AV_CODEC_ID_RA_144 = 77824, @@ -530,6 +535,8 @@ public enum AVCodecID : int @AV_CODEC_ID_SDX2_DPCM = 81924, @AV_CODEC_ID_GREMLIN_DPCM = 81925, @AV_CODEC_ID_DERF_DPCM = 81926, + @AV_CODEC_ID_WADY_DPCM = 81927, + @AV_CODEC_ID_CBD2_DPCM = 81928, @AV_CODEC_ID_MP2 = 86016, /// preferred ID for decoding MPEG audio layer 1, 2 or 3 @AV_CODEC_ID_MP3 = 86017, @@ -629,6 +636,12 @@ public enum AVCodecID : int @AV_CODEC_ID_FASTAUDIO = 86110, @AV_CODEC_ID_MSNSIREN = 86111, @AV_CODEC_ID_DFPWM = 86112, + @AV_CODEC_ID_BONK = 86113, + @AV_CODEC_ID_MISC4 = 86114, + @AV_CODEC_ID_APAC = 86115, + @AV_CODEC_ID_FTR = 86116, + @AV_CODEC_ID_WAVARC = 86117, + @AV_CODEC_ID_RKA = 86118, /// A dummy ID pointing at the start of subtitle codecs. @AV_CODEC_ID_FIRST_SUBTITLE = 94208, @AV_CODEC_ID_DVD_SUBTITLE = 94208, @@ -682,6 +695,10 @@ public enum AVCodecID : int @AV_CODEC_ID_FFMETADATA = 135168, /// Passthrough codec, AVFrames wrapped in AVPacket @AV_CODEC_ID_WRAPPED_AVFRAME = 135169, + /// Dummy null video codec, useful mainly for development and debugging. Null encoder/decoder discard all input and never return any output. + @AV_CODEC_ID_VNULL = 135170, + /// Dummy null audio codec, useful mainly for development and debugging. Null encoder/decoder discard all input and never return any output. + @AV_CODEC_ID_ANULL = 135171, } /// Chromaticity coordinates of the source primaries. These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273. @@ -866,13 +883,18 @@ public enum AVDurationEstimationMethod : int @AVFMT_DURATION_FROM_BITRATE = 2, } +/// @{ public enum AVFieldOrder : int { @AV_FIELD_UNKNOWN = 0, @AV_FIELD_PROGRESSIVE = 1, + /// Top coded_first, top displayed first @AV_FIELD_TT = 2, + /// Bottom coded first, bottom displayed first @AV_FIELD_BB = 3, + /// Top coded first, bottom displayed first @AV_FIELD_TB = 4, + /// Bottom coded first, top displayed first @AV_FIELD_BT = 5, } @@ -942,6 +964,8 @@ public enum AVFrameSideDataType : int @AV_FRAME_DATA_DOVI_METADATA = 24, /// HDR Vivid dynamic metadata associated with a video frame. The payload is an AVDynamicHDRVivid type and contains information for color volume transform - CUVA 005.1-2021. @AV_FRAME_DATA_DYNAMIC_HDR_VIVID = 25, + /// Ambient viewing environment metadata, as defined by H.274. + @AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT = 26, } /// Option for overlapping elliptical pixel selectors in an image. @@ -1137,9 +1161,13 @@ public enum AVPacketSideDataType : int /// @{ public enum AVPictureStructure : int { + /// unknown @AV_PICTURE_STRUCTURE_UNKNOWN = 0, + /// coded as top field @AV_PICTURE_STRUCTURE_TOP_FIELD = 1, + /// coded as bottom field @AV_PICTURE_STRUCTURE_BOTTOM_FIELD = 2, + /// coded as frame @AV_PICTURE_STRUCTURE_FRAME = 3, } @@ -1585,8 +1613,40 @@ public enum AVPixelFormat : int @AV_PIX_FMT_P416BE = 204, /// interleaved chroma YUV 4:4:4, 48bpp, little-endian @AV_PIX_FMT_P416LE = 205, + /// packed VUYA 4:4:4, 32bpp, VUYAVUYA... + @AV_PIX_FMT_VUYA = 206, + /// IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian + @AV_PIX_FMT_RGBAF16BE = 207, + /// IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian + @AV_PIX_FMT_RGBAF16LE = 208, + /// packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined + @AV_PIX_FMT_VUYX = 209, + /// like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian + @AV_PIX_FMT_P012LE = 210, + /// like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian + @AV_PIX_FMT_P012BE = 211, + /// packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, big-endian + @AV_PIX_FMT_Y212BE = 212, + /// packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, little-endian + @AV_PIX_FMT_Y212LE = 213, + /// packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel is left undefined + @AV_PIX_FMT_XV30BE = 214, + /// packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channel is left undefined + @AV_PIX_FMT_XV30LE = 215, + /// packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian, variant of Y412 where alpha channel is left undefined + @AV_PIX_FMT_XV36BE = 216, + /// packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian, variant of Y412 where alpha channel is left undefined + @AV_PIX_FMT_XV36LE = 217, + /// IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian + @AV_PIX_FMT_RGBF32BE = 218, + /// IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian + @AV_PIX_FMT_RGBF32LE = 219, + /// IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian + @AV_PIX_FMT_RGBAF32BE = 220, + /// IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian + @AV_PIX_FMT_RGBAF32LE = 221, /// number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions - @AV_PIX_FMT_NB = 206, + @AV_PIX_FMT_NB = 222, } /// Rounding methods. diff --git a/FFmpeg.AutoGen/generated/Structs.g.cs b/FFmpeg.AutoGen/generated/Structs.g.cs index fe83ddd6..e81a1c93 100644 --- a/FFmpeg.AutoGen/generated/Structs.g.cs +++ b/FFmpeg.AutoGen/generated/Structs.g.cs @@ -16,21 +16,6 @@ public unsafe partial struct _iobuf public void* @_Placeholder; } -/// Deprecated and unused struct to use for initializing an abuffersink context. -public unsafe partial struct AVABufferSinkParams -{ - /// list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE - public AVSampleFormat* @sample_fmts; - /// list of allowed channel layouts, terminated by -1 - public long* @channel_layouts; - /// list of allowed channel counts, terminated by -1 - public int* @channel_counts; - /// if not 0, accept any channel count or layout - public int @all_channel_counts; - /// list of allowed sample rates, terminated by -1 - public int* @sample_rates; -} - public unsafe partial struct AVBitStreamFilter { public byte* @name; @@ -69,13 +54,6 @@ public unsafe partial struct AVBufferRef public ulong @size; } -/// Deprecated and unused struct to use for initializing a buffersink context. -public unsafe partial struct AVBufferSinkParams -{ - /// list of allowed pixel formats, terminated by AV_PIX_FMT_NONE - public AVPixelFormat* @pixel_fmts; -} - /// This structure contains the parameters describing the frames that will be passed to this filter. public unsafe partial struct AVBufferSrcParameters { @@ -358,6 +336,7 @@ public unsafe partial struct AVCodecContext /// Number of samples per channel in an audio frame. public int @frame_size; /// Frame counter, set by libavcodec. + [Obsolete("use frame_num instead")] public int @frame_number; /// number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs. public int @block_align; @@ -408,19 +387,20 @@ public unsafe partial struct AVCodecContext public byte* @stats_in; /// Work around bugs in encoders which sometimes cannot be detected automatically. - encoding: Set by user - decoding: Set by user public int @workaround_bugs; - /// strictly follow the standard (MPEG-4, ...). - encoding: Set by user. - decoding: Set by user. Setting this to STRICT or higher means the encoder and decoder will generally do stupid things, whereas setting it to unofficial or lower will mean the encoder might produce output that is not supported by all spec-compliant decoders. Decoders don't differentiate between normal, unofficial and experimental (that is, they always try to decode things when they can) unless they are explicitly asked to behave stupidly (=strictly conform to the specs) + /// strictly follow the standard (MPEG-4, ...). - encoding: Set by user. - decoding: Set by user. Setting this to STRICT or higher means the encoder and decoder will generally do stupid things, whereas setting it to unofficial or lower will mean the encoder might produce output that is not supported by all spec-compliant decoders. Decoders don't differentiate between normal, unofficial and experimental (that is, they always try to decode things when they can) unless they are explicitly asked to behave stupidly (=strictly conform to the specs) This may only be set to one of the FF_COMPLIANCE_* values in defs.h. public int @strict_std_compliance; /// error concealment flags - encoding: unused - decoding: Set by user. public int @error_concealment; /// debug - encoding: Set by user. - decoding: Set by user. public int @debug; - /// Error recognition; may misdetect some more or less valid parts as errors. - encoding: Set by user. - decoding: Set by user. + /// Error recognition; may misdetect some more or less valid parts as errors. This is a bitfield of the AV_EF_* values defined in defs.h. public int @err_recognition; /// opaque 64-bit number (generally a PTS) that will be reordered and output in AVFrame.reordered_opaque - encoding: Set by libavcodec to the reordered_opaque of the input frame corresponding to the last returned packet. Only supported by encoders with the AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability. - decoding: Set by user. + [Obsolete("Use AV_CODEC_FLAG_COPY_OPAQUE instead")] public long @reordered_opaque; /// Hardware accelerator in use - encoding: unused. - decoding: Set by libavcodec public AVHWAccel* @hwaccel; - /// Hardware accelerator context. For some hardware accelerators, a global context needs to be provided by the user. In that case, this holds display-dependent data FFmpeg cannot instantiate itself. Please refer to the FFmpeg HW accelerator documentation to know how to fill this. - encoding: unused - decoding: Set by user + /// Legacy hardware accelerator context. public void* @hwaccel_context; /// error - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR. - decoding: unused public ulong_array8 @error; @@ -440,9 +420,6 @@ public unsafe partial struct AVCodecContext public int @thread_type; /// Which multithreading methods are in use by the codec. - encoding: Set by libavcodec. - decoding: Set by libavcodec. public int @active_thread_type; - /// Set by the client if its custom get_buffer() callback can be called synchronously from another thread, which allows faster multithreaded decoding. draw_horiz_band() will be called from other threads regardless of this setting. Ignored if the default get_buffer() is used. - encoding: Set by user. - decoding: Set by user. - [Obsolete("the custom get_buffer2() callback should always be thread-safe. Thread-unsafe get_buffer2() implementations will be invalid starting with LIBAVCODEC_VERSION_MAJOR=60; in other words, libavcodec will behave as if this field was always set to 1. Callers that want to be forward compatible with future libavcodec versions should wrap access to this field in #if LIBAVCODEC_VERSION_MAJOR < 60")] - public int @thread_safe_callbacks; /// The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. public AVCodecContext_execute_func @execute; /// The codec may call this to execute several independent things. It will return only after finishing all tasks. The user may replace this with some multithreaded implementation, the default implementation will execute the parts serially. @@ -488,8 +465,6 @@ public unsafe partial struct AVCodecContext public int @skip_alpha; /// Number of samples to skip after a discontinuity - decoding: unused - encoding: set by libavcodec public int @seek_preroll; - [Obsolete("unused")] - public int @debug_mv; /// custom intra quantization matrix - encoding: Set by user, can be NULL. - decoding: unused. public ushort* @chroma_intra_matrix; /// dump format separator. can be ", " or " " or anything else - encoding: Set by user. - decoding: Set by user. @@ -503,8 +478,6 @@ public unsafe partial struct AVCodecContext public int @nb_coded_side_data; /// A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames. The reference is set by the caller and afterwards owned (and freed) by libavcodec - it should never be read by the caller after being set. public AVBufferRef* @hw_frames_ctx; - [Obsolete("unused")] - public int @sub_text_format; /// 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. public int @trailing_padding; /// The number of pixels per image to maximally accept. @@ -526,6 +499,8 @@ public unsafe partial struct AVCodecContext public AVCodecContext_get_encode_buffer_func @get_encode_buffer; /// Audio channel layout. - encoding: must be set by the caller, to one of AVCodec.ch_layouts. - decoding: may be set by the caller if known e.g. from the container. The decoder can then override during decoding as needed. public AVChannelLayout @ch_layout; + /// Frame counter, set by libavcodec. + public long @frame_num; } /// This struct describes the properties of a single codec described by an AVCodecID. @@ -778,24 +753,6 @@ public unsafe partial struct AVD3D11VAFramesContext public AVD3D11FrameDescriptor* @texture_infos; } -/// Structure describes device capabilities. -public unsafe partial struct AVDeviceCapabilitiesQuery -{ - public AVClass* @av_class; - public AVFormatContext* @device_context; - public AVCodecID @codec; - public AVSampleFormat @sample_format; - public AVPixelFormat @pixel_format; - public int @sample_rate; - public int @channels; - public long @channel_layout; - public int @window_width; - public int @window_height; - public int @frame_width; - public int @frame_height; - public AVRational @fps; -} - /// Structure describes basic parameters of the device. public unsafe partial struct AVDeviceInfo { @@ -832,6 +789,7 @@ public unsafe partial struct AVDeviceRect public int @height; } +/// @} public unsafe partial struct AVDictionaryEntry { public byte* @key; @@ -912,8 +870,6 @@ public unsafe partial struct AVFilter public AVFilter_preinit_func @preinit; /// Filter initialization function. public AVFilter_init_func @init; - /// Should be set instead of AVFilter.init "init" by the filters that want to pass a dictionary of AVOptions to nested contexts that are allocated during init. - public AVFilter_init_dict_func @init_dict; /// Filter uninitialization function. public AVFilter_uninit_func @uninit; public AVFilter_formats @formats; @@ -948,6 +904,13 @@ public unsafe partial struct AVFilter_formats public AVSampleFormat @sample_fmt; } +/// A filterchain is a list of filter specifications. +public unsafe partial struct AVFilterChain +{ + public AVFilterParams** @filters; + public ulong @nb_filters; +} + /// An instance of a filter public unsafe partial struct AVFilterContext { @@ -1032,6 +995,18 @@ public unsafe partial struct AVFilterGraph public uint @disable_auto_convert; } +/// A parsed representation of a filtergraph segment. +public unsafe partial struct AVFilterGraphSegment +{ + /// The filtergraph this segment is associated with. Set by avfilter_graph_segment_parse(). + public AVFilterGraph* @graph; + /// A list of filter chain contained in this segment. Set in avfilter_graph_segment_parse(). + public AVFilterChain** @chains; + public ulong @nb_chains; + /// A string containing a colon-separated list of key=value options applied to all scale filters in this segment. + public byte* @scale_sws_opts; +} + /// A linked-list of the inputs/outputs of the filter chain. public unsafe partial struct AVFilterInOut { @@ -1112,6 +1087,30 @@ public unsafe partial struct AVFilterLink public byte_array61440 @reserved; } +/// Parameters of a filter's input or output pad. +public unsafe partial struct AVFilterPadParams +{ + /// An av_malloc()'ed string containing the pad label. + public byte* @label; +} + +/// Parameters describing a filter to be created in a filtergraph. +public unsafe partial struct AVFilterParams +{ + /// The filter context. + public AVFilterContext* @filter; + /// Name of the AVFilter to be used. + public byte* @filter_name; + /// Name to be used for this filter instance. + public byte* @instance_name; + /// Options to be apllied to the filter. + public AVDictionary* @opts; + public AVFilterPadParams** @inputs; + public uint @nb_inputs; + public AVFilterPadParams** @outputs; + public uint @nb_outputs; +} + /// Format I/O context. New fields can be added to the end with minor version bumps. Removal, reordering and changes to existing fields require a major version bump. sizeof(AVFormatContext) must not be used outside libav*, use avformat_alloc_context() to create an AVFormatContext. public unsafe partial struct AVFormatContext { @@ -1243,6 +1242,7 @@ public unsafe partial struct AVFormatContext /// A callback for opening new IO streams. public AVFormatContext_io_open_func @io_open; /// A callback for closing the streams opened with AVFormatContext.io_open(). + [Obsolete("use io_close2")] public AVFormatContext_io_close_func @io_close; /// ',' separated list of disallowed protocols. - encoding: unused - decoding: set by user public byte* @protocol_blacklist; @@ -1302,6 +1302,7 @@ public unsafe partial struct AVFrame /// Tell user application that palette has changed from previous frame. public int @palette_has_changed; /// reordered opaque 64 bits (generally an integer or a double precision float PTS but can be anything). The user sets AVCodecContext.reordered_opaque to represent the input at that time, the decoder reorders values as needed and sets AVFrame.reordered_opaque to exactly one of the values provided by the user through AVCodecContext.reordered_opaque + [Obsolete("Use AV_CODEC_FLAG_COPY_OPAQUE instead")] public long @reordered_opaque; /// Sample rate of the audio data. public int @sample_rate; @@ -1330,6 +1331,7 @@ public unsafe partial struct AVFrame /// reordered pos from the last AVPacket that has been input into the decoder - encoding: unused - decoding: Read by user. public long @pkt_pos; /// duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown. - encoding: unused - decoding: Read by user. + [Obsolete("use duration instead")] public long @pkt_duration; /// metadata. - encoding: Set by user. - decoding: Set by libavcodec. public AVDictionary* @metadata; @@ -1353,6 +1355,8 @@ public unsafe partial struct AVFrame public AVBufferRef* @private_ref; /// Channel layout of the audio data. public AVChannelLayout @ch_layout; + /// Duration of the frame, in the same units as pts. 0 if unknown. + public long @duration; } /// Structure to hold side data for an AVFrame. @@ -1627,8 +1631,6 @@ public unsafe partial struct AVIOContext public AVIOContext_write_data_type_func @write_data_type; /// If set, don't call write_data_type separately for AVIO_DATA_MARKER_BOUNDARY_POINT, but ignore them and treat them as AVIO_DATA_MARKER_UNKNOWN (to avoid needlessly small chunks of data returned from the callback). public int @ignore_boundary_point; - [Obsolete("field utilized privately by libavformat. For a public statistic of how many bytes were written out, see AVIOContext::bytes_written.")] - public long @written; /// Maximum reached position before a backward seek in the write buffer, used keeping track of already written data for a later flush. public byte* @buf_ptr_max; /// Read-only statistic of bytes read for this AVIOContext. @@ -1772,33 +1774,6 @@ public unsafe partial struct AVOutputFormat public AVCodecTag** @codec_tag; /// AVClass for the private context public AVClass* @priv_class; - /// *************************************************************** No fields below this line are part of the public API. They may not be used outside of libavformat and can be changed and removed at will. New public fields should be added right above. **************************************************************** - public int @priv_data_size; - /// Internal flags. See FF_FMT_FLAG_* in internal.h. - public int @flags_internal; - public AVOutputFormat_write_header_func @write_header; - /// Write a packet. If AVFMT_ALLOW_FLUSH is set in flags, pkt can be NULL in order to flush data buffered in the muxer. When flushing, return 0 if there still is more data to flush, or 1 if everything was flushed and there is no more buffered data. - public AVOutputFormat_write_packet_func @write_packet; - public AVOutputFormat_write_trailer_func @write_trailer; - /// A format-specific function for interleavement. If unset, packets will be interleaved by dts. - public AVOutputFormat_interleave_packet_func @interleave_packet; - /// Test if the given codec can be stored in this container. - public AVOutputFormat_query_codec_func @query_codec; - public AVOutputFormat_get_output_timestamp_func @get_output_timestamp; - /// Allows sending messages from application to device. - public AVOutputFormat_control_message_func @control_message; - /// Write an uncoded AVFrame. - public AVOutputFormat_write_uncoded_frame_func @write_uncoded_frame; - /// Returns device list with it properties. - public AVOutputFormat_get_device_list_func @get_device_list; - /// default data codec - public AVCodecID @data_codec; - /// Initialize format. May allocate data here, and set any AVFormatContext or AVStream parameters that need to be set before packets are sent. This method must not write output. - public AVOutputFormat_init_func @init; - /// Deinitialize format. If present, this is called whenever the muxer is being destroyed, regardless of whether or not the header has been written. - public AVOutputFormat_deinit_func @deinit; - /// Set up any necessary bitstream filtering and extract any extra data needed for the global header. - public AVOutputFormat_check_bitstream_func @check_bitstream; } /// This structure stores compressed data. It is typically exported by demuxers and then passed as input to decoders, or received as output from encoders and then passed to muxers. @@ -1950,10 +1925,14 @@ public unsafe partial struct AVRegionOfInterest /// Stream 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. sizeof(AVStream) must not be used outside libav*. public unsafe partial struct AVStream { + /// A class for avoptions. Set on stream creation. + public AVClass* @av_class; /// stream index in AVFormatContext public int @index; /// Format-specific stream ID. decoding: set by libavformat encoding: set by the user, replaced by libavformat if left unset public int @id; + /// Codec parameters associated with this stream. Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively. + public AVCodecParameters* @codecpar; public void* @priv_data; /// This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. public AVRational @time_base; @@ -1982,8 +1961,6 @@ public unsafe partial struct AVStream public int @event_flags; /// Real base framerate of the stream. This is the lowest framerate with which all timestamps can be represented accurately (it is the least common multiple of all framerates in the stream). Note, this value is just a guess! For example, if the time base is 1/90000 and all frames have either approximately 3600 or 1800 timer ticks, then r_frame_rate will be 50/1. public AVRational @r_frame_rate; - /// Codec parameters associated with this stream. Allocated and freed by libavformat in avformat_new_stream() and avformat_free_context() respectively. - public AVCodecParameters* @codecpar; /// Number of bits in timestamps. Used for wrapping control. public int @pts_wrap_bits; } @@ -2484,6 +2461,7 @@ public unsafe partial struct AVAudioFifo { } +/// @} /// This struct is incomplete. public unsafe partial struct AVBPrint { diff --git a/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs index f68f29ca..4cb15579 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs @@ -5,10 +5,6 @@ namespace FFmpeg.AutoGen; public static unsafe partial class ffmpeg { - /// Create an AVABufferSinkParams structure. - [Obsolete()] - public static AVABufferSinkParams* av_abuffersink_params_alloc() => vectors.av_abuffersink_params_alloc(); - /// 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 public static int av_add_index_entry(AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags) => vectors.av_add_index_entry(@st, @pos, @timestamp, @size, @distance, @flags); @@ -127,6 +123,7 @@ public static unsafe partial class ffmpeg public static int av_bsf_get_null_filter(AVBSFContext** @bsf) => vectors.av_bsf_get_null_filter(@bsf); /// Prepare the filter for use, after all the parameters and options have been set. + /// a AVBSFContext previously allocated with av_bsf_alloc() public static int av_bsf_init(AVBSFContext* @ctx) => vectors.av_bsf_init(@ctx); /// Iterate over all registered bitstream filters. @@ -168,11 +165,13 @@ public static unsafe partial class ffmpeg public static int av_bsf_list_parse_str(string @str, AVBSFContext** @bsf) => vectors.av_bsf_list_parse_str(@str, @bsf); /// Retrieve a filtered packet. + /// 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. public static int av_bsf_receive_packet(AVBSFContext* @ctx, AVPacket* @pkt) => vectors.av_bsf_receive_packet(@ctx, @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. public static int av_bsf_send_packet(AVBSFContext* @ctx, AVPacket* @pkt) => vectors.av_bsf_send_packet(@ctx, @pkt); @@ -303,10 +302,6 @@ public static unsafe partial class ffmpeg public static int av_buffersink_get_w(AVFilterContext* @ctx) => vectors.av_buffersink_get_w(@ctx); - /// Create an AVBufferSinkParams structure. - [Obsolete()] - public static AVBufferSinkParams* av_buffersink_params_alloc() => vectors.av_buffersink_params_alloc(); - /// Set the frame size for an audio buffer sink. public static void av_buffersink_set_frame_size(AVFilterContext* @ctx, uint @frame_size) => vectors.av_buffersink_set_frame_size(@ctx, @frame_size); @@ -353,6 +348,7 @@ public static unsafe partial class ffmpeg /// Get a human readable string describing a given channel. /// pre-allocated buffer where to put the generated string /// 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. public static int av_channel_description(byte* @buf, ulong @buf_size, AVChannel @channel) => vectors.av_channel_description(@buf, @buf_size, @channel); @@ -365,11 +361,13 @@ public static unsafe partial class ffmpeg /// 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) public static AVChannel av_channel_layout_channel_from_index(AVChannelLayout* @channel_layout, uint @idx) => vectors.av_channel_layout_channel_from_index(@channel_layout, @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) public static AVChannel av_channel_layout_channel_from_string(AVChannelLayout* @channel_layout, string @name) => vectors.av_channel_layout_channel_from_string(@channel_layout, @name); @@ -391,6 +389,7 @@ public static unsafe partial class ffmpeg public static int av_channel_layout_copy(AVChannelLayout* @dst, AVChannelLayout* @src) => vectors.av_channel_layout_copy(@dst, @src); /// Get the default channel layout for a given number of channels. + /// the layout structure to be initialized /// number of channels public static void av_channel_layout_default(AVChannelLayout* @ch_layout, int @nb_channels) => vectors.av_channel_layout_default(@ch_layout, @nb_channels); @@ -423,11 +422,13 @@ public static unsafe partial class ffmpeg /// Get the index of a given channel in a channel layout. In case multiple channels are found, only the first match will be returned. /// 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. public static int av_channel_layout_index_from_channel(AVChannelLayout* @channel_layout, AVChannel @channel) => vectors.av_channel_layout_index_from_channel(@channel_layout, @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. public static int av_channel_layout_index_from_string(AVChannelLayout* @channel_layout, string @name) => vectors.av_channel_layout_index_from_string(@channel_layout, @name); @@ -449,12 +450,18 @@ public static unsafe partial class ffmpeg /// Get a human readable string in an abbreviated form describing a given channel. This is the inverse function of av_channel_from_string(). /// pre-allocated buffer where to put the generated string /// 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. public static int av_channel_name(byte* @buf, ulong @buf_size, AVChannel @channel) => vectors.av_channel_name(@buf, @buf_size, @channel); /// bprint variant of av_channel_name(). public static void av_channel_name_bprint(AVBPrint* @bp, AVChannel @channel_id) => vectors.av_channel_name_bprint(@bp, @channel_id); + /// Converts AVChromaLocation to swscale x/y chroma position. + /// horizontal chroma sample position + /// vertical chroma sample position + public static int av_chroma_location_enum_to_pos(int* @xpos, int* @ypos, AVChromaLocation @pos) => vectors.av_chroma_location_enum_to_pos(@xpos, @ypos, @pos); + /// Returns the AVChromaLocation value for name or an AVError if not found. /// the AVChromaLocation value for name or an AVError if not found. public static int av_chroma_location_from_name(string @name) => vectors.av_chroma_location_from_name(@name); @@ -463,6 +470,11 @@ public static unsafe partial class ffmpeg /// the name for provided chroma location or NULL if unknown. public static string av_chroma_location_name(AVChromaLocation @location) => vectors.av_chroma_location_name(@location); + /// Converts swscale x/y chroma position to AVChromaLocation. + /// horizontal chroma sample position + /// vertical chroma sample position + public static AVChromaLocation av_chroma_location_pos_to_enum(int @xpos, int @ypos) => vectors.av_chroma_location_pos_to_enum(@xpos, @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 @@ -526,6 +538,8 @@ public static unsafe partial class ffmpeg public static string av_color_transfer_name(AVColorTransferCharacteristic @transfer) => vectors.av_color_transfer_name(@transfer); /// Compare the remainders of two integer operands divided by a common divisor. + /// Operand + /// 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` public static long av_compare_mod(ulong @a, ulong @b, ulong @mod) => vectors.av_compare_mod(@a, @b, @mod); @@ -581,9 +595,9 @@ public static unsafe partial class ffmpeg public static AVInputFormat* av_demuxer_iterate(void** @opaque) => vectors.av_demuxer_iterate(@opaque); /// Copy entries from one AVDictionary struct into another. - /// pointer to a pointer to a AVDictionary struct. If *dst is NULL, this function will allocate a struct for you and put it in *dst - /// pointer to source AVDictionary struct - /// flags to use when setting entries in *dst + /// Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL, this function will allocate a struct for you and put it in *dst + /// 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. public static int av_dict_copy(AVDictionary** @dst, AVDictionary* @src, int @flags) => vectors.av_dict_copy(@dst, @src, @flags); @@ -596,35 +610,40 @@ public static unsafe partial class ffmpeg public static void av_dict_free(AVDictionary** @m) => vectors.av_dict_free(@m); /// Get a dictionary entry with matching key. - /// matching key + /// Matching key /// 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 + /// 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 public static AVDictionaryEntry* av_dict_get(AVDictionary* @m, string @key, AVDictionaryEntry* @prev, int @flags) => vectors.av_dict_get(@m, @key, @prev, @flags); /// Get dictionary entries as a string. - /// dictionary + /// The dictionary /// Pointer to buffer that will be allocated with string containg entries. Buffer must be freed by the caller when is no longer needed. - /// character used to separate key from value - /// character used to separate two pairs from each other + /// Character used to separate key from value + /// Character used to separate two pairs from each other /// >= 0 on success, negative on error public static int av_dict_get_string(AVDictionary* @m, byte** @buffer, byte @key_val_sep, byte @pairs_sep) => vectors.av_dict_get_string(@m, @buffer, @key_val_sep, @pairs_sep); + /// Iterate over a dictionary + /// The dictionary to iterate over + /// Pointer to the previous AVDictionaryEntry, NULL initially + public static AVDictionaryEntry* av_dict_iterate(AVDictionary* @m, AVDictionaryEntry* @prev) => vectors.av_dict_iterate(@m, @prev); + /// Parse the key/value pairs list and add the parsed entries to a dictionary. - /// 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 - /// flags to use when adding to dictionary. AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL are ignored since the key/value tokens will always be duplicated. + /// 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 + /// 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 public static int av_dict_parse_string(AVDictionary** @pm, string @str, string @key_val_sep, string @pairs_sep, int @flags) => vectors.av_dict_parse_string(@pm, @str, @key_val_sep, @pairs_sep, @flags); /// Set the given entry in *pm, overwriting an existing entry. - /// pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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. + /// Pointer to a pointer to a dictionary struct. If *pm is NULL a dictionary struct is allocated and put in *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 public static int av_dict_set(AVDictionary** @pm, string @key, string @value, int @flags) => vectors.av_dict_set(@pm, @key, @value, @flags); - /// Convenience wrapper for av_dict_set that converts the value to a string and stores it. + /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. public static int av_dict_set_int(AVDictionary** @pm, string @key, long @value, int @flags) => vectors.av_dict_set_int(@pm, @key, @value, @flags); /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. @@ -702,12 +721,16 @@ public static unsafe partial class ffmpeg public static void* av_fast_realloc(void* @ptr, uint* @size, ulong @min_size) => vectors.av_fast_realloc(@ptr, @size, @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(). + /// path to the file + /// pointee is set to the mapped or allocated buffer + /// pointee is set to the size in bytes of the buffer /// 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 public static int av_file_map(string @filename, byte** @bufptr, ulong* @size, int @log_offset, void* @log_ctx) => vectors.av_file_map(@filename, @bufptr, @size, @log_offset, @log_ctx); /// 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() public static void av_file_unmap(byte* @bufptr, ulong @size) => vectors.av_file_unmap(@bufptr, @size); @@ -807,6 +830,7 @@ public static unsafe partial class ffmpeg public static int av_frame_get_buffer(AVFrame* @frame, int @align) => vectors.av_frame_get_buffer(@frame, @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. public static AVBufferRef* av_frame_get_plane_buffer(AVFrame* @frame, int @plane) => vectors.av_frame_get_plane_buffer(@frame, @plane); @@ -863,6 +887,8 @@ public static unsafe partial class ffmpeg public static void av_freep(void* @ptr) => vectors.av_freep(@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. public static long av_gcd(long @a, long @b) => vectors.av_gcd(@a, @b); @@ -905,6 +931,7 @@ public static unsafe partial class ffmpeg public static ulong av_get_channel_layout(string @name) => vectors.av_get_channel_layout(@name); /// Get the index of a channel in channel_layout. + /// channel layout bitset /// a channel layout describing exactly one channel which must be present in channel_layout. /// index of channel in channel_layout on success, a negative AVERROR on error. [Obsolete("use av_channel_layout_index_from_channel()")] @@ -917,6 +944,8 @@ public static unsafe partial class ffmpeg /// Return a description of a channel layout. If nb_channels is <= 0, it is guessed from the channel_layout. /// put here the string containing the channel layout /// size in bytes of the buffer + /// number of channels + /// channel layout bitset [Obsolete("use av_channel_layout_describe()")] public static void av_get_channel_layout_string(byte* @buf, int @buf_size, int @nb_channels, ulong @channel_layout) => vectors.av_get_channel_layout_string(@buf, @buf_size, @nb_channels, @channel_layout); @@ -925,11 +954,6 @@ public static unsafe partial class ffmpeg [Obsolete("use av_channel_name()")] public static string av_get_channel_name(ulong @channel) => vectors.av_get_channel_name(@channel); - /// Get the name of a colorspace. - /// a static string identifying the colorspace; can be NULL. - [Obsolete("use av_color_space_name()")] - public static string av_get_colorspace_name(AVColorSpace @val) => vectors.av_get_colorspace_name(@val); - /// 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. public static int av_get_cpu_flags() => vectors.av_get_cpu_flags(); @@ -969,7 +993,6 @@ public static unsafe partial class ffmpeg /// 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 - /// 0 if OK, AVERROR(ENOSYS) if the format does not support it Note: some formats or devices may not allow to measure dts and wall atomically. public static int av_get_output_timestamp(AVFormatContext* @s, int @stream, long* @dts, long* @wall) => vectors.av_get_output_timestamp(@s, @stream, @dts, @wall); /// Get the packed alternative form of the given sample format. @@ -1157,6 +1180,7 @@ public static unsafe partial class ffmpeg public static void* av_hwdevice_hwconfig_alloc(AVBufferRef* @device_ctx) => vectors.av_hwdevice_hwconfig_alloc(@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. public static AVHWDeviceType av_hwdevice_iterate_types(AVHWDeviceType @prev) => vectors.av_hwdevice_iterate_types(@prev); @@ -1171,6 +1195,7 @@ public static unsafe partial class ffmpeg /// Create and initialise an AVHWFramesContext as a mapping of another existing AVHWFramesContext on a different device. /// On success, a reference to the newly created AVHWFramesContext. + /// The AVPixelFormat for the derived context. /// A reference to the device to create the new AVHWFramesContext on. /// 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. @@ -1212,6 +1237,11 @@ public static unsafe partial class ffmpeg public static int av_hwframe_transfer_get_formats(AVBufferRef* @hwframe_ctx, AVHWFrameTransferDirection @dir, AVPixelFormat** @formats, int @flags) => vectors.av_hwframe_transfer_get_formats(@hwframe_ctx, @dir, @formats, @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]). + /// array to be filled with the pointer for each image plane + /// the array filled with the linesize for each plane + /// width of the image in pixels + /// height of the image in pixels + /// 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 public static int av_image_alloc(ref byte_ptrArray4 @pointers, ref int_array4 @linesizes, int @w, int @h, AVPixelFormat @pix_fmt, int @align) => vectors.av_image_alloc(ref @pointers, ref @linesizes, @w, @h, @pix_fmt, @align); @@ -1242,13 +1272,21 @@ public static unsafe partial class ffmpeg public static int av_image_check_size2(uint @w, uint @h, long @max_pixels, AVPixelFormat @pix_fmt, int @log_offset, void* @log_ctx) => vectors.av_image_check_size2(@w, @h, @max_pixels, @pix_fmt, @log_offset, @log_ctx); /// Copy image in src_data to dst_data. + /// destination image data buffer to copy to /// linesizes for the image in dst_data + /// source image data buffer to copy from /// linesizes for the image in src_data + /// the AVPixelFormat of the image + /// width of the image in pixels + /// height of the image in pixels public static void av_image_copy(ref byte_ptrArray4 @dst_data, ref int_array4 @dst_linesizes, in byte_ptrArray4 @src_data, in int_array4 @src_linesizes, AVPixelFormat @pix_fmt, int @width, int @height) => vectors.av_image_copy(ref @dst_data, ref @dst_linesizes, @src_data, @src_linesizes, @pix_fmt, @width, @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. + /// destination plane to copy to /// linesize for the image plane in dst + /// source plane to copy from /// linesize for the image plane in src + /// height (number of lines) of the plane public static void av_image_copy_plane(byte* @dst, int @dst_linesize, byte* @src, int @src_linesize, int @bytewidth, int @height) => vectors.av_image_copy_plane(@dst, @dst_linesize, @src, @src_linesize, @bytewidth, @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(). @@ -1292,22 +1330,29 @@ public static unsafe partial class ffmpeg /// Fill plane linesizes for an image with pixel format pix_fmt and width width. /// array to be filled with the linesize for each plane + /// the AVPixelFormat of the image + /// width of the image in pixels /// >= 0 in case of success, a negative error code otherwise public static int av_image_fill_linesizes(ref int_array4 @linesizes, AVPixelFormat @pix_fmt, int @width) => vectors.av_image_fill_linesizes(ref @linesizes, @pix_fmt, @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 public static void av_image_fill_max_pixsteps(ref int_array4 @max_pixsteps, ref int_array4 @max_pixstep_comps, AVPixFmtDescriptor* @pixdesc) => vectors.av_image_fill_max_pixsteps(ref @max_pixsteps, ref @max_pixstep_comps, @pixdesc); /// Fill plane sizes for an image with pixel format pix_fmt and height height. /// the array to be filled with the size of each image plane + /// the AVPixelFormat of the image + /// 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 public static int av_image_fill_plane_sizes(ref ulong_array4 @size, AVPixelFormat @pix_fmt, int @height, in long_array4 @linesizes) => vectors.av_image_fill_plane_sizes(ref @size, @pix_fmt, @height, @linesizes); /// Fill plane data pointers for an image with pixel format pix_fmt and height height. /// pointers array to be filled with the pointer for each image plane + /// the AVPixelFormat of the image + /// height of the image in pixels /// 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 @@ -1430,9 +1475,6 @@ public static unsafe partial class ffmpeg /// Pointer to the allocated block, or `NULL` if it cannot be allocated public static void* av_mallocz(ulong @size) => vectors.av_mallocz(@size); - [Obsolete("use av_calloc()")] - public static void* av_mallocz_array(ulong @nmemb, ulong @size) => vectors.av_mallocz_array(@nmemb, @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. public static AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc() => vectors.av_mastering_display_metadata_alloc(); @@ -1476,6 +1518,8 @@ public static unsafe partial class ffmpeg /// Find which of the two rationals is closer to another rational. /// Rational to be compared against + /// 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 public static int av_nearer_q(AVRational @q, AVRational @q1, AVRational @q2) => vectors.av_nearer_q(@q, @q1, @q2); @@ -2011,6 +2055,7 @@ public static unsafe partial class ffmpeg /// aligned size for audio buffer(s), may be NULL /// number of audio channels /// number of samples per channel + /// the sample format /// buffer size alignment (0 = default, 1 = no alignment) /// >=0 on success or a negative error code on failure public static int av_samples_alloc(byte** @audio_data, int* @linesize, int @nb_channels, int @nb_samples, AVSampleFormat @sample_fmt, int @align) => vectors.av_samples_alloc(@audio_data, @linesize, @nb_channels, @nb_samples, @sample_fmt, @align); @@ -2085,6 +2130,8 @@ public static unsafe partial class ffmpeg public static void av_shrink_packet(AVPacket* @pkt, int @size) => vectors.av_shrink_packet(@pkt, @size); /// Multiply two `size_t` values checking for overflow. + /// Operand of multiplication + /// Operand of multiplication /// Pointer to the result of the operation /// 0 on success, AVERROR(EINVAL) on overflow public static int av_size_mult(ulong @a, ulong @b, ulong* @r) => vectors.av_size_mult(@a, @b, @r); @@ -2110,6 +2157,7 @@ public static unsafe partial class ffmpeg public static AVRational av_stream_get_codec_timebase(AVStream* @st) => vectors.av_stream_get_codec_timebase(@st); /// Returns the pts of the last muxed packet + its duration + [Obsolete()] public static long av_stream_get_end_pts(AVStream* @st) => vectors.av_stream_get_end_pts(@st); public static AVCodecParserContext* av_stream_get_parser(AVStream* @s) => vectors.av_stream_get_parser(@s); @@ -2339,6 +2387,7 @@ public static unsafe partial class ffmpeg /// Converts swscale x/y chroma position to AVChromaLocation. /// horizontal chroma sample position /// vertical chroma sample position + [Obsolete("Use av_chroma_location_pos_to_enum() instead.")] public static AVChromaLocation avcodec_chroma_pos_to_enum(int @xpos, int @ypos) => vectors.avcodec_chroma_pos_to_enum(@xpos, @ypos); /// Close a given AVCodecContext and free all the data associated with it (but not the AVCodecContext itself). @@ -2385,6 +2434,7 @@ public static unsafe partial class ffmpeg /// Converts AVChromaLocation to swscale x/y chroma position. /// horizontal chroma sample position /// vertical chroma sample position + [Obsolete("Use av_chroma_location_enum_to_pos() instead.")] public static int avcodec_enum_to_chroma_pos(int* @xpos, int* @ypos, AVChromaLocation @pos) => vectors.avcodec_enum_to_chroma_pos(@xpos, @ypos, @pos); /// Fill AVFrame audio data and linesize pointers. @@ -2434,9 +2484,6 @@ public static unsafe partial class ffmpeg /// Get the AVClass for AVCodecContext. It can be used in combination with AV_OPT_SEARCH_FAKE_OBJ for examining options. public static AVClass* avcodec_get_class() => vectors.avcodec_get_class(); - [Obsolete("This function should not be used.")] - public static AVClass* avcodec_get_frame_class() => vectors.avcodec_get_frame_class(); - /// Retrieve supported hardware configurations for a codec. public static AVCodecHWConfig* avcodec_get_hw_config(AVCodec* @codec, int @index) => vectors.avcodec_get_hw_config(@codec, @index); @@ -2499,28 +2546,24 @@ public static unsafe partial class ffmpeg /// A name for the profile if found, NULL otherwise. public static string avcodec_profile_name(AVCodecID @codec_id, int @profile) => vectors.avcodec_profile_name(@codec_id, @profile); - /// Return decoded output data from a decoder. + /// 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 decoder. Note that the function will always call av_frame_unref(frame) before doing anything else. - /// 0: success, a frame was returned AVERROR(EAGAIN): output is not available in this state - user must try to send new input AVERROR_EOF: the decoder has been fully flushed, and there will be no more output frames AVERROR(EINVAL): codec not opened, or it is an encoder AVERROR_INPUT_CHANGED: current decoded frame has changed parameters with respect to first decoded frame. Applicable when flag AV_CODEC_FLAG_DROPCHANGED is set. other negative values: legitimate decoding errors + /// 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. public static int avcodec_receive_frame(AVCodecContext* @avctx, AVFrame* @frame) => vectors.avcodec_receive_frame(@avctx, @frame); /// 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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): output is not available in the current state - user must try to send input AVERROR_EOF: the encoder has been fully flushed, and there will be no more output packets AVERROR(EINVAL): codec not opened, or it is a decoder other errors: legitimate encoding errors public static int avcodec_receive_packet(AVCodecContext* @avctx, AVPacket* @avpkt) => vectors.avcodec_receive_packet(@avctx, @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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_packet() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the encoder has been flushed, and no new frames can be sent to it AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate encoding errors public static int avcodec_send_frame(AVCodecContext* @avctx, AVFrame* @frame) => vectors.avcodec_send_frame(@avctx, @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. - /// 0 on success, otherwise negative error code: AVERROR(EAGAIN): input is not accepted in the current state - user must read output with avcodec_receive_frame() (once all output is read, the packet should be resent, and the call will not fail with EAGAIN). AVERROR_EOF: the decoder has been flushed, and no new packets can be sent to it (also returned if more than 1 flush packet is sent) AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush AVERROR(ENOMEM): failed to add packet to internal queue, or similar other errors: legitimate decoding errors public static int avcodec_send_packet(AVCodecContext* @avctx, AVPacket* @avpkt) => vectors.avcodec_send_packet(@avctx, @avpkt); /// @} @@ -2537,20 +2580,6 @@ public static unsafe partial class ffmpeg /// >= 0 on success, negative on error. AVERROR(ENOSYS) when device doesn't implement handler of the message. public static int avdevice_app_to_dev_control_message(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size) => vectors.avdevice_app_to_dev_control_message(@s, @type, @data, @data_size); - /// Initialize capabilities probing API based on AVOption API. - /// Device capabilities data. Pointer to a NULL pointer must be passed. - /// Context of the device. - /// An AVDictionary filled with device-private options. On return this parameter will be destroyed and replaced with a dict containing options that were not found. 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. - /// >= 0 on success, negative otherwise. - [Obsolete()] - public static int avdevice_capabilities_create(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options) => vectors.avdevice_capabilities_create(@caps, @s, @device_options); - - /// Free resources created by avdevice_capabilities_create() - /// Device capabilities data to be freed. - /// Context of the device. - [Obsolete()] - public static void avdevice_capabilities_free(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s) => vectors.avdevice_capabilities_free(@caps, @s); - /// Return the libavdevice build-time configuration. public static string avdevice_configuration() => vectors.avdevice_configuration(); @@ -2563,6 +2592,7 @@ public static unsafe partial class ffmpeg public static int avdevice_dev_to_app_control_message(AVFormatContext* @s, AVDevToAppMessageType @type, void* @data, ulong @data_size) => vectors.avdevice_dev_to_app_control_message(@s, @type, @data, @data_size); /// Convenient function to free result of avdevice_list_devices(). + /// device list to be freed. public static void avdevice_free_list_devices(AVDeviceInfoList** @device_list) => vectors.avdevice_free_list_devices(@device_list); /// Return the libavdevice license. @@ -2688,6 +2718,46 @@ public static unsafe partial class ffmpeg /// the return value of ff_request_frame(), or AVERROR_EOF if all links returned AVERROR_EOF public static int avfilter_graph_request_oldest(AVFilterGraph* @graph) => vectors.avfilter_graph_request_oldest(@graph); + /// Apply all filter/link descriptions from a graph segment to the associated filtergraph. + /// the filtergraph segment to process + /// reserved for future use, caller must set to 0 for now + /// passed to avfilter_graph_segment_link() + /// passed to avfilter_graph_segment_link() + public static int avfilter_graph_segment_apply(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => vectors.avfilter_graph_segment_apply(@seg, @flags, @inputs, @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 + public static int avfilter_graph_segment_apply_opts(AVFilterGraphSegment* @seg, int @flags) => vectors.avfilter_graph_segment_apply_opts(@seg, @flags); + + /// Create filters specified in a graph segment. + /// the filtergraph segment to process + /// reserved for future use, caller must set to 0 for now + public static int avfilter_graph_segment_create_filters(AVFilterGraphSegment* @seg, int @flags) => vectors.avfilter_graph_segment_create_filters(@seg, @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. + public static void avfilter_graph_segment_free(AVFilterGraphSegment** @seg) => vectors.avfilter_graph_segment_free(@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 + public static int avfilter_graph_segment_init(AVFilterGraphSegment* @seg, int @flags) => vectors.avfilter_graph_segment_init(@seg, @flags); + + /// Link filters in a graph segment. + /// the filtergraph segment to process + /// 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(). + public static int avfilter_graph_segment_link(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs) => vectors.avfilter_graph_segment_link(@seg, @flags, @inputs, @outputs); + + /// Parse a textual filtergraph description into an intermediate form. + /// Filter graph the parsed segment is associated with. Will only be used for logging and similar auxiliary purposes. The graph will not be actually modified by this function - the parsing results are instead stored in seg for further processing. + /// 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. + public static int avfilter_graph_segment_parse(AVFilterGraph* @graph, string @graph_str, int @flags, AVFilterGraphSegment** @seg) => vectors.avfilter_graph_segment_parse(@graph, @graph_str, @flags, @seg); + /// Send a command to one or more filter instances. /// the filter graph /// the filter(s) to which the command should be sent "all" sends to all filters otherwise it can be a filter or filter instance name which will send the command to all matching filters. @@ -2741,10 +2811,6 @@ public static unsafe partial class ffmpeg /// Free the link in *link, and set its pointer to NULL. public static void avfilter_link_free(AVFilterLink** @link) => vectors.avfilter_link_free(@link); - /// Get the number of elements in an AVFilter's inputs or outputs array. - [Obsolete("Use avfilter_filter_pad_count() instead.")] - public static int avfilter_pad_count(AVFilterPad* @pads) => vectors.avfilter_pad_count(@pads); - /// 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 @@ -2767,6 +2833,7 @@ public static unsafe partial class ffmpeg public static AVFormatContext* avformat_alloc_context() => vectors.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. + /// pointee is set to the created format context, or to NULL in case of failure /// format to use for allocating the context, if NULL format_name and filename are used instead /// 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 @@ -2826,14 +2893,14 @@ public static unsafe partial class ffmpeg /// Get the AVIndexEntry corresponding to the given timestamp. /// Stream containing the requested AVIndexEntry. + /// 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. public static AVIndexEntry* avformat_index_get_entry_from_timestamp(AVStream* @st, long @wanted_timestamp, int @flags) => vectors.avformat_index_get_entry_from_timestamp(@st, @wanted_timestamp, @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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized, negative AVERROR on failure. + /// 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. public static int avformat_init_output(AVFormatContext* @s, AVDictionary** @options) => vectors.avformat_init_output(@s, @options); /// Return the libavformat license. @@ -2893,9 +2960,8 @@ public static unsafe partial class ffmpeg public static uint avformat_version() => vectors.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. - /// AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init, AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init, negative AVERROR on failure. + /// 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. public static int avformat_write_header(AVFormatContext* @s, AVDictionary** @options) => vectors.avformat_write_header(@s, @options); /// Accept and allocate a client context on a server context. @@ -3125,6 +3191,7 @@ public static unsafe partial class ffmpeg public static void avio_write(AVIOContext* @s, byte* @buf, int @size) => vectors.avio_write(@s, @buf, @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 public static void avio_write_marker(AVIOContext* @s, long @time, AVIODataMarkerType @type) => vectors.avio_write_marker(@s, @time, @type); @@ -3228,6 +3295,8 @@ public static unsafe partial class ffmpeg /// Configure or reconfigure the SwrContext using the information provided by the AVFrames. /// audio resample context + /// output AVFrame + /// input AVFrame /// 0 on success, AVERROR on failure. public static int swr_config_frame(SwrContext* @swr, AVFrame* @out, AVFrame* @in) => vectors.swr_config_frame(@swr, @out, @in); @@ -3287,6 +3356,8 @@ public static unsafe partial class ffmpeg public static int swr_is_initialized(SwrContext* @s) => vectors.swr_is_initialized(@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 public static long swr_next_pts(SwrContext* @s, long @pts) => vectors.swr_next_pts(@s, @pts); @@ -3340,9 +3411,11 @@ public static unsafe partial class ffmpeg public static void sws_convertPalette8ToPacked32(byte* @src, byte* @dst, int @num_pixels, byte* @palette) => vectors.sws_convertPalette8ToPacked32(@src, @dst, @num_pixels, @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 public static void sws_frame_end(SwsContext* @c) => vectors.sws_frame_end(@c); /// 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(). + /// The scaling context /// 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 @@ -3365,8 +3438,8 @@ public static unsafe partial class ffmpeg /// One of the SWS_CS_* macros. If invalid, SWS_CS_DEFAULT is used. public static int* sws_getCoefficients(int @colorspace) => vectors.sws_getCoefficients(@colorspace); - /// #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else + /// 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. public static int sws_getColorspaceDetails(SwsContext* @c, int** @inv_table, int* @srcRange, int** @table, int* @dstRange, int* @brightness, int* @contrast, int* @saturation) => vectors.sws_getColorspaceDetails(@c, @inv_table, @srcRange, @table, @dstRange, @brightness, @contrast, @saturation); /// Allocate and return an SwsContext. You need it to perform scaling/conversion operations using sws_scale(). @@ -3405,12 +3478,14 @@ public static unsafe partial class ffmpeg public static void sws_normalizeVec(SwsVector* @a, double @height) => vectors.sws_normalizeVec(@a, @height); /// Request a horizontal slice of the output data to be written into the frame previously provided to sws_frame_start(). + /// The scaling context /// 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 public static int sws_receive_slice(SwsContext* @c, uint @slice_start, uint @slice_height) => vectors.sws_receive_slice(@c, @slice_start, @slice_height); - /// Returns 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. + /// Get the alignment required for slices + /// 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. public static uint sws_receive_slice_alignment(SwsContext* @c) => vectors.sws_receive_slice_alignment(@c); @@ -3426,6 +3501,7 @@ public static unsafe partial class ffmpeg public static int sws_scale(SwsContext* @c, byte*[] @srcSlice, int[] @srcStride, int @srcSliceY, int @srcSliceH, byte*[] @dst, int[] @dstStride) => vectors.sws_scale(@c, @srcSlice, @srcStride, @srcSliceY, @srcSliceH, @dst, @dstStride); /// Scale source data from src and write the output to dst. + /// The scaling context /// The destination frame. See documentation for sws_frame_start() for more details. /// The source frame. /// 0 on success, a negative AVERROR code on failure @@ -3435,20 +3511,22 @@ public static unsafe partial class ffmpeg public static void sws_scaleVec(SwsVector* @a, double @scalar) => vectors.sws_scaleVec(@a, @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. + /// The scaling context /// first row of the slice /// number of rows in the slice /// a non-negative number on success, a negative AVERROR code on failure. public static int sws_send_slice(SwsContext* @c, uint @slice_start, uint @slice_height) => vectors.sws_send_slice(@c, @slice_start, @slice_height); - /// Returns negative error code on error, non negative otherwise #else Returns -1 if not supported #endif + /// Returns A negative error code on error, non negative otherwise. If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. + /// the scaling context /// the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the input (1=jpeg / 0=mpeg) /// the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] /// flag indicating the while-black range of the output (1=jpeg / 0=mpeg) /// 16.16 fixed point brightness correction /// 16.16 fixed point contrast correction - /// 16.16 fixed point saturation correction #if LIBSWSCALE_VERSION_MAJOR > 6 - /// negative error code on error, non negative otherwise #else + /// 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. public static int sws_setColorspaceDetails(SwsContext* @c, in int_array4 @inv_table, int @srcRange, in int_array4 @table, int @dstRange, int @brightness, int @contrast, int @saturation) => vectors.sws_setColorspaceDetails(@c, @inv_table, @srcRange, @table, @dstRange, @brightness, @contrast, @saturation); /// Return the libswscale build-time configuration. diff --git a/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs index 839d4c8d..393b960e 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.libraries.g.cs @@ -6,13 +6,13 @@ public static unsafe partial class ffmpeg { public static Dictionary LibraryVersionMap = new Dictionary { - {"avcodec", 59}, - {"avdevice", 59}, - {"avfilter", 8}, - {"avformat", 59}, - {"avutil", 57}, - {"postproc", 56}, + {"avcodec", 60}, + {"avdevice", 60}, + {"avfilter", 9}, + {"avformat", 60}, + {"avutil", 58}, + {"postproc", 57}, {"swresample", 4}, - {"swscale", 6}, + {"swscale", 7}, }; } diff --git a/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs index 24d99d8c..78151a88 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.macros.g.cs @@ -77,10 +77,14 @@ public static unsafe partial class ffmpeg public static readonly ulong AV_CH_LAYOUT_7POINT0_FRONT = AV_CH_LAYOUT_5POINT0 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER; /// AV_CH_LAYOUT_7POINT1 = (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) public static readonly ulong AV_CH_LAYOUT_7POINT1 = AV_CH_LAYOUT_5POINT1 | AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT; + /// AV_CH_LAYOUT_7POINT1_TOP_BACK = (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) + public static readonly ulong AV_CH_LAYOUT_7POINT1_TOP_BACK = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT; /// AV_CH_LAYOUT_7POINT1_WIDE = (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) public static readonly ulong AV_CH_LAYOUT_7POINT1_WIDE = AV_CH_LAYOUT_5POINT1 | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER; /// AV_CH_LAYOUT_7POINT1_WIDE_BACK = (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) public static readonly ulong AV_CH_LAYOUT_7POINT1_WIDE_BACK = AV_CH_LAYOUT_5POINT1_BACK | AV_CH_FRONT_LEFT_OF_CENTER | AV_CH_FRONT_RIGHT_OF_CENTER; + /// AV_CH_LAYOUT_CUBE = (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT) + public static readonly ulong AV_CH_LAYOUT_CUBE = AV_CH_LAYOUT_QUAD | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT; /// AV_CH_LAYOUT_HEXADECAGONAL = (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) public static readonly ulong AV_CH_LAYOUT_HEXADECAGONAL = AV_CH_LAYOUT_OCTAGONAL | AV_CH_WIDE_LEFT | AV_CH_WIDE_RIGHT | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT | AV_CH_TOP_BACK_CENTER | AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT; /// AV_CH_LAYOUT_HEXAGONAL = (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER) @@ -156,9 +160,11 @@ public static unsafe partial class ffmpeg // public static AV_CHANNEL_LAYOUT_7POINT0 = AV_CHANNEL_LAYOUT_MASK(0x7, AV_CH_LAYOUT_7POINT0); // public static AV_CHANNEL_LAYOUT_7POINT0_FRONT = AV_CHANNEL_LAYOUT_MASK(0x7, AV_CH_LAYOUT_7POINT0_FRONT); // public static AV_CHANNEL_LAYOUT_7POINT1 = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1); + // public static AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1_TOP_BACK); // public static AV_CHANNEL_LAYOUT_7POINT1_WIDE = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1_WIDE); // public static AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_7POINT1_WIDE_BACK); // public static AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER = { .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }}; + // public static AV_CHANNEL_LAYOUT_CUBE = AV_CHANNEL_LAYOUT_MASK(0x8, AV_CH_LAYOUT_CUBE); // public static AV_CHANNEL_LAYOUT_HEXADECAGONAL = AV_CHANNEL_LAYOUT_MASK(0x10, AV_CH_LAYOUT_HEXADECAGONAL); // public static AV_CHANNEL_LAYOUT_HEXAGONAL = AV_CHANNEL_LAYOUT_MASK(0x6, AV_CH_LAYOUT_HEXAGONAL); // public static AV_CHANNEL_LAYOUT_MASK = nb; @@ -179,8 +185,6 @@ public static unsafe partial class ffmpeg // public static av_clipd = av_clipd_c; // public static av_clipf = av_clipf_c; // public static av_clipl_int32 = av_clipl_int32_c; - /// AV_CODEC_CAP_AUTO_THREADS = AV_CODEC_CAP_OTHER_THREADS - public const int AV_CODEC_CAP_AUTO_THREADS = AV_CODEC_CAP_OTHER_THREADS; /// AV_CODEC_CAP_AVOID_PROBING = (1 << 17) public const int AV_CODEC_CAP_AVOID_PROBING = 0x1 << 0x11; /// AV_CODEC_CAP_CHANNEL_CONF = (1 << 10) @@ -193,6 +197,8 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_CAP_DRAW_HORIZ_BAND = 0x1 << 0x0; /// AV_CODEC_CAP_ENCODER_FLUSH = (1 << 21) public const int AV_CODEC_CAP_ENCODER_FLUSH = 0x1 << 0x15; + /// AV_CODEC_CAP_ENCODER_RECON_FRAME = (1 << 22) + public const int AV_CODEC_CAP_ENCODER_RECON_FRAME = 0x1 << 0x16; /// AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE = (1 << 20) public const int AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE = 0x1 << 0x14; /// AV_CODEC_CAP_EXPERIMENTAL = (1 << 9) @@ -203,10 +209,6 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_CAP_HARDWARE = 0x1 << 0x12; /// AV_CODEC_CAP_HYBRID = (1 << 19) public const int AV_CODEC_CAP_HYBRID = 0x1 << 0x13; - /// AV_CODEC_CAP_INTRA_ONLY = 0x40000000 - public const int AV_CODEC_CAP_INTRA_ONLY = 0x40000000; - /// AV_CODEC_CAP_LOSSLESS = 0x80000000 - public const uint AV_CODEC_CAP_LOSSLESS = 0x80000000U; /// AV_CODEC_CAP_OTHER_THREADS = (1 << 15) public const int AV_CODEC_CAP_OTHER_THREADS = 0x1 << 0xf; /// AV_CODEC_CAP_PARAM_CHANGE = (1 << 14) @@ -217,8 +219,6 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_CAP_SMALL_LAST_FRAME = 0x1 << 0x6; /// AV_CODEC_CAP_SUBFRAMES = (1 << 8) public const int AV_CODEC_CAP_SUBFRAMES = 0x1 << 0x8; - /// AV_CODEC_CAP_TRUNCATED = (1 << 3) - public const int AV_CODEC_CAP_TRUNCATED = 0x1 << 0x3; /// AV_CODEC_CAP_VARIABLE_FRAME_SIZE = (1 << 16) public const int AV_CODEC_CAP_VARIABLE_FRAME_SIZE = 0x1 << 0x10; /// AV_CODEC_EXPORT_DATA_FILM_GRAIN = 0x1 << 0x3 @@ -237,8 +237,12 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_FLAG_BITEXACT = 0x1 << 0x17; /// AV_CODEC_FLAG_CLOSED_GOP = 0x1U << 0x1f public const uint AV_CODEC_FLAG_CLOSED_GOP = 0x1U << 0x1f; + /// AV_CODEC_FLAG_COPY_OPAQUE = 0x1 << 0x7 + public const int AV_CODEC_FLAG_COPY_OPAQUE = 0x1 << 0x7; /// AV_CODEC_FLAG_DROPCHANGED = 0x1 << 0x5 public const int AV_CODEC_FLAG_DROPCHANGED = 0x1 << 0x5; + /// AV_CODEC_FLAG_FRAME_DURATION = 0x1 << 0x8 + public const int AV_CODEC_FLAG_FRAME_DURATION = 0x1 << 0x8; /// AV_CODEC_FLAG_GLOBAL_HEADER = 0x1 << 0x16 public const int AV_CODEC_FLAG_GLOBAL_HEADER = 0x1 << 0x16; /// AV_CODEC_FLAG_GRAY = 0x1 << 0xd @@ -263,18 +267,18 @@ public static unsafe partial class ffmpeg public const int AV_CODEC_FLAG_QPEL = 0x1 << 0x4; /// AV_CODEC_FLAG_QSCALE = 0x1 << 0x1 public const int AV_CODEC_FLAG_QSCALE = 0x1 << 0x1; - /// AV_CODEC_FLAG_TRUNCATED = 0x1 << 0x10 - public const int AV_CODEC_FLAG_TRUNCATED = 0x1 << 0x10; + /// AV_CODEC_FLAG_RECON_FRAME = 0x1 << 0x6 + public const int AV_CODEC_FLAG_RECON_FRAME = 0x1 << 0x6; /// AV_CODEC_FLAG_UNALIGNED = 0x1 << 0x0 public const int AV_CODEC_FLAG_UNALIGNED = 0x1 << 0x0; /// AV_CODEC_FLAG2_CHUNKS = 0x1 << 0xf public const int AV_CODEC_FLAG2_CHUNKS = 0x1 << 0xf; - /// AV_CODEC_FLAG2_DROP_FRAME_TIMECODE = 0x1 << 0xd - public const int AV_CODEC_FLAG2_DROP_FRAME_TIMECODE = 0x1 << 0xd; /// AV_CODEC_FLAG2_EXPORT_MVS = 0x1 << 0x1c 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_ICC_PROFILES = 0x1U << 0x1f + public const uint AV_CODEC_FLAG2_ICC_PROFILES = 0x1U << 0x1f; /// AV_CODEC_FLAG2_IGNORE_CROP = 0x1 << 0x10 public const int AV_CODEC_FLAG2_IGNORE_CROP = 0x1 << 0x10; /// AV_CODEC_FLAG2_LOCAL_HEADER = 0x1 << 0x3 @@ -365,6 +369,22 @@ public static unsafe partial class ffmpeg public const int AV_CPU_FLAG_NEON = 0x1 << 0x5; /// AV_CPU_FLAG_POWER8 = 0x4 public const int AV_CPU_FLAG_POWER8 = 0x4; + /// 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 + public const int AV_CPU_FLAG_RVV_F32 = 0x1 << 0x4; + /// AV_CPU_FLAG_RVV_F64 = 0x1 << 0x6 + public const int AV_CPU_FLAG_RVV_F64 = 0x1 << 0x6; + /// AV_CPU_FLAG_RVV_I32 = 0x1 << 0x3 + public const int AV_CPU_FLAG_RVV_I32 = 0x1 << 0x3; + /// AV_CPU_FLAG_RVV_I64 = 0x1 << 0x5 + public const int AV_CPU_FLAG_RVV_I64 = 0x1 << 0x5; /// AV_CPU_FLAG_SETEND = 0x1 << 0x10 public const int AV_CPU_FLAG_SETEND = 0x1 << 0x10; /// AV_CPU_FLAG_SLOW_GATHER = 0x2000000 @@ -447,21 +467,21 @@ public static unsafe partial class ffmpeg public const int AV_DISPOSITION_TIMED_THUMBNAILS = 0x1 << 0xb; /// AV_DISPOSITION_VISUAL_IMPAIRED = (1 << 8) public const int AV_DISPOSITION_VISUAL_IMPAIRED = 0x1 << 0x8; - /// AV_EF_AGGRESSIVE = 0x1 << 0x12 + /// AV_EF_AGGRESSIVE = (1<<18) public const int AV_EF_AGGRESSIVE = 0x1 << 0x12; - /// AV_EF_BITSTREAM = 0x1 << 0x1 + /// AV_EF_BITSTREAM = (1<<1) public const int AV_EF_BITSTREAM = 0x1 << 0x1; - /// AV_EF_BUFFER = 0x1 << 0x2 + /// AV_EF_BUFFER = (1<<2) public const int AV_EF_BUFFER = 0x1 << 0x2; - /// AV_EF_CAREFUL = 0x1 << 0x10 + /// AV_EF_CAREFUL = (1<<16) public const int AV_EF_CAREFUL = 0x1 << 0x10; - /// AV_EF_COMPLIANT = 0x1 << 0x11 + /// AV_EF_COMPLIANT = (1<<17) public const int AV_EF_COMPLIANT = 0x1 << 0x11; - /// AV_EF_CRCCHECK = 0x1 << 0x0 + /// AV_EF_CRCCHECK = (1<<0) public const int AV_EF_CRCCHECK = 0x1 << 0x0; - /// AV_EF_EXPLODE = 0x1 << 0x3 + /// AV_EF_EXPLODE = (1<<3) public const int AV_EF_EXPLODE = 0x1 << 0x3; - /// AV_EF_IGNORE_ERR = 0x1 << 0xf + /// AV_EF_IGNORE_ERR = (1<<15) public const int AV_EF_IGNORE_ERR = 0x1 << 0xf; // public static av_err2str = (errnum) av_make_error_string((char[AV_ERROR_MAX_STRING_SIZE]){0}, AV_ERROR_MAX_STRING_SIZE, errnum); /// AV_ERROR_MAX_STRING_SIZE = 64 @@ -496,6 +516,8 @@ public static unsafe partial class ffmpeg public const int AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH = 0x1 << 0x2; /// AV_HWACCEL_FLAG_IGNORE_LEVEL = 0x1 << 0x0 public const int AV_HWACCEL_FLAG_IGNORE_LEVEL = 0x1 << 0x0; + /// AV_HWACCEL_FLAG_UNSAFE_OUTPUT = 0x1 << 0x3 + public const int AV_HWACCEL_FLAG_UNSAFE_OUTPUT = 0x1 << 0x3; /// AV_INPUT_BUFFER_MIN_SIZE = 0x4000 public const int AV_INPUT_BUFFER_MIN_SIZE = 0x4000; /// AV_INPUT_BUFFER_PADDING_SIZE = 64 @@ -629,6 +651,7 @@ public static unsafe partial class ffmpeg // public static AV_PIX_FMT_NE = (be, le) AV_PIX_FMT_##le; // public static AV_PIX_FMT_NV20 = AV_PIX_FMT_NE(NV20BE, NV20LE); // public static AV_PIX_FMT_P010 = AV_PIX_FMT_NE(P010BE, P010LE); + // public static AV_PIX_FMT_P012 = AV_PIX_FMT_NE(P012BE, P012LE); // public static AV_PIX_FMT_P016 = AV_PIX_FMT_NE(P016BE, P016LE); // public static AV_PIX_FMT_P210 = AV_PIX_FMT_NE(P210BE, P210LE); // public static AV_PIX_FMT_P216 = AV_PIX_FMT_NE(P216BE, P216LE); @@ -641,10 +664,16 @@ public static unsafe partial class ffmpeg // public static AV_PIX_FMT_RGB555 = AV_PIX_FMT_NE(RGB555BE, RGB555LE); // public static AV_PIX_FMT_RGB565 = AV_PIX_FMT_NE(RGB565BE, RGB565LE); // public static AV_PIX_FMT_RGBA64 = AV_PIX_FMT_NE(RGBA64BE, RGBA64LE); + // public static AV_PIX_FMT_RGBAF16 = AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE); + // public static AV_PIX_FMT_RGBAF32 = AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE); + // public static AV_PIX_FMT_RGBF32 = AV_PIX_FMT_NE(RGBF32BE, RGBF32LE); // public static AV_PIX_FMT_X2BGR10 = AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE); // public static AV_PIX_FMT_X2RGB10 = AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE); + // public static AV_PIX_FMT_XV30 = AV_PIX_FMT_NE(XV30BE, XV30LE); + // public static AV_PIX_FMT_XV36 = AV_PIX_FMT_NE(XV36BE, XV36LE); // public static AV_PIX_FMT_XYZ12 = AV_PIX_FMT_NE(XYZ12BE, XYZ12LE); // public static AV_PIX_FMT_Y210 = AV_PIX_FMT_NE(Y210BE, Y210LE); + // public static AV_PIX_FMT_Y212 = AV_PIX_FMT_NE(Y212BE, Y212LE); // public static AV_PIX_FMT_YA16 = AV_PIX_FMT_NE(YA16BE, YA16LE); // public static AV_PIX_FMT_YUV420P10 = AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE); // public static AV_PIX_FMT_YUV420P12 = AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE); @@ -838,8 +867,6 @@ public static unsafe partial class ffmpeg public const int AVFMT_FLAG_NONBLOCK = 0x4; /// AVFMT_FLAG_NOPARSE = 0x0020 public const int AVFMT_FLAG_NOPARSE = 0x20; - /// AVFMT_FLAG_PRIV_OPT = 0x20000 - public const int AVFMT_FLAG_PRIV_OPT = 0x20000; /// AVFMT_FLAG_SHORTEST = 0x100000 public const int AVFMT_FLAG_SHORTEST = 0x100000; /// AVFMT_FLAG_SORT_DTS = 0x10000 @@ -936,71 +963,48 @@ public static unsafe partial class ffmpeg /// AVSTREAM_INIT_IN_WRITE_HEADER = 0 public const int AVSTREAM_INIT_IN_WRITE_HEADER = 0x0; // public static AVUNERROR = (e) (-(e)); - // public static DECLARE_ALIGNED = n; - // public static DECLARE_ASM_ALIGNED = n; - // public static DECLARE_ASM_CONST = n; - /// FF_API_AUTO_THREADS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_AUTO_THREADS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_AV_FOPEN_UTF8 = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_AV_FOPEN_UTF8 = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_AV_MALLOCZ_ARRAY = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_AV_MALLOCZ_ARRAY = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_AVCTX_TIMEBASE = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_AVCTX_TIMEBASE = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_AVIOCONTEXT_WRITTEN = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_API_AVIOCONTEXT_WRITTEN = LIBAVFORMAT_VERSION_MAJOR < 0x3c; - /// FF_API_AVSTREAM_CLASS = (LIBAVFORMAT_VERSION_MAJOR > 59) - public const bool FF_API_AVSTREAM_CLASS = LIBAVFORMAT_VERSION_MAJOR > 0x3b; - /// FF_API_BUFFERSINK_ALLOC = LIBAVFILTER_VERSION_MAJOR < 0x9 - public const bool FF_API_BUFFERSINK_ALLOC = LIBAVFILTER_VERSION_MAJOR < 0x9; - /// FF_API_COLORSPACE_NAME = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_COLORSPACE_NAME = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x3c; - /// FF_API_D2STR = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_D2STR = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_DEBUG_MV = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_DEBUG_MV = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_DECLARE_ALIGNED = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_DECLARE_ALIGNED = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_DEVICE_CAPABILITIES = (LIBAVDEVICE_VERSION_MAJOR < 60) - public const bool FF_API_DEVICE_CAPABILITIES = LIBAVDEVICE_VERSION_MAJOR < 0x3c; - /// FF_API_FIFO_OLD_API = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_FIFO_OLD_API = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_FIFO_PEEK2 = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_FIFO_PEEK2 = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_FLAG_TRUNCATED = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_FLAG_TRUNCATED = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_GET_FRAME_CLASS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_GET_FRAME_CLASS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_IDCT_NONE = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_IDCT_NONE = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_LAVF_PRIV_OPT = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_API_LAVF_PRIV_OPT = LIBAVFORMAT_VERSION_MAJOR < 0x3c; - /// FF_API_OLD_CHANNEL_LAYOUT = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_OLD_CHANNEL_LAYOUT = LIBAVUTIL_VERSION_MAJOR < 0x3a; - /// FF_API_OPENH264_CABAC = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_OPENH264_CABAC = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_OPENH264_SLICE_MODE = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_OPENH264_SLICE_MODE = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_PAD_COUNT = LIBAVFILTER_VERSION_MAJOR < 0x9 - public const bool FF_API_PAD_COUNT = LIBAVFILTER_VERSION_MAJOR < 0x9; + /// FF_API_AV_FOPEN_UTF8 = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_AV_FOPEN_UTF8 = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_AVCODEC_CHROMA_POS = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_AVCODEC_CHROMA_POS = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_AVCTX_FRAME_NUMBER = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_AVCTX_FRAME_NUMBER = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_AVFORMAT_IO_CLOSE = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_AVFORMAT_IO_CLOSE = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_AVIODIRCONTEXT = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_AVIODIRCONTEXT = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_AYUV_CODECID = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_AYUV_CODECID = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_COMPUTE_PKT_FIELDS2 = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_COMPUTE_PKT_FIELDS2 = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_FIFO_OLD_API = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_FIFO_OLD_API = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_FIFO_PEEK2 = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_FIFO_PEEK2 = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_FRAME_PICTURE_NUMBER = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_FRAME_PICTURE_NUMBER = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_GET_END_PTS = (LIBAVFORMAT_VERSION_MAJOR < 61) + public const bool FF_API_GET_END_PTS = LIBAVFORMAT_VERSION_MAJOR < 0x3d; + /// FF_API_IDCT_NONE = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_IDCT_NONE = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_INIT_PACKET = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_INIT_PACKET = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_OLD_CHANNEL_LAYOUT = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_OLD_CHANNEL_LAYOUT = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_PKT_DURATION = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_PKT_DURATION = LIBAVUTIL_VERSION_MAJOR < 0x3b; /// FF_API_R_FRAME_RATE = 1 public const int FF_API_R_FRAME_RATE = 0x1; - /// FF_API_SUB_TEXT_FORMAT = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_SUB_TEXT_FORMAT = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_SVTAV1_OPTS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_SVTAV1_OPTS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_SWS_PARAM_OPTION = LIBAVFILTER_VERSION_MAJOR < 0x9 - public const bool FF_API_SWS_PARAM_OPTION = LIBAVFILTER_VERSION_MAJOR < 0x9; - /// FF_API_THREAD_SAFE_CALLBACKS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_THREAD_SAFE_CALLBACKS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_UNUSED_CODEC_CAPS = (LIBAVCODEC_VERSION_MAJOR < 60) - public const bool FF_API_UNUSED_CODEC_CAPS = LIBAVCODEC_VERSION_MAJOR < 0x3c; - /// FF_API_XVMC = (LIBAVUTIL_VERSION_MAJOR < 58) - public const bool FF_API_XVMC = LIBAVUTIL_VERSION_MAJOR < 0x3a; + /// FF_API_REORDERED_OPAQUE = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_REORDERED_OPAQUE = LIBAVUTIL_VERSION_MAJOR < 0x3b; + /// FF_API_SVTAV1_OPTS = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_SVTAV1_OPTS = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_VT_HWACCEL_CONTEXT = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_VT_HWACCEL_CONTEXT = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_VT_OUTPUT_CALLBACK = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_API_VT_OUTPUT_CALLBACK = LIBAVCODEC_VERSION_MAJOR < 0x3d; + /// FF_API_XVMC = (LIBAVUTIL_VERSION_MAJOR < 59) + public const bool FF_API_XVMC = LIBAVUTIL_VERSION_MAJOR < 0x3b; // public static FF_ARRAY_ELEMS = (a) (sizeof(a) / sizeof((a)[0])); /// FF_BUG_AMV = 0x20 public const int FF_BUG_AMV = 0x20; @@ -1067,21 +1071,23 @@ 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_CRYSTAL_HD = (LIBAVCODEC_VERSION_MAJOR < 61) + public const bool FF_CODEC_CRYSTAL_HD = LIBAVCODEC_VERSION_MAJOR < 0x3d; /// 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_COMPLIANCE_EXPERIMENTAL = -0x2 + /// FF_COMPLIANCE_EXPERIMENTAL = -2 public const int FF_COMPLIANCE_EXPERIMENTAL = -0x2; - /// FF_COMPLIANCE_NORMAL = 0x0 + /// FF_COMPLIANCE_NORMAL = 0 public const int FF_COMPLIANCE_NORMAL = 0x0; - /// FF_COMPLIANCE_STRICT = 0x1 + /// FF_COMPLIANCE_STRICT = 1 public const int FF_COMPLIANCE_STRICT = 0x1; - /// FF_COMPLIANCE_UNOFFICIAL = -0x1 + /// FF_COMPLIANCE_UNOFFICIAL = -1 public const int FF_COMPLIANCE_UNOFFICIAL = -0x1; - /// FF_COMPLIANCE_VERY_STRICT = 0x2 + /// FF_COMPLIANCE_VERY_STRICT = 2 public const int FF_COMPLIANCE_VERY_STRICT = 0x2; /// FF_COMPRESSION_DEFAULT = -0x1 public const int FF_COMPRESSION_DEFAULT = -0x1; @@ -1127,12 +1133,6 @@ public static unsafe partial class ffmpeg public const int FF_DEBUG_STARTCODE = 0x100; /// FF_DEBUG_THREADS = 0x10000 public const int FF_DEBUG_THREADS = 0x10000; - /// FF_DEBUG_VIS_MV_B_BACK = 0x4 - public const int FF_DEBUG_VIS_MV_B_BACK = 0x4; - /// FF_DEBUG_VIS_MV_B_FOR = 0x2 - public const int FF_DEBUG_VIS_MV_B_FOR = 0x2; - /// FF_DEBUG_VIS_MV_P_FOR = 0x1 - public const int FF_DEBUG_VIS_MV_P_FOR = 0x1; /// FF_DECODE_ERROR_CONCEALMENT_ACTIVE = 4 public const int FF_DECODE_ERROR_CONCEALMENT_ACTIVE = 0x4; /// FF_DECODE_ERROR_DECODE_SLICES = 8 @@ -1153,8 +1153,6 @@ public static unsafe partial class ffmpeg public const int FF_EC_GUESS_MVS = 0x1; /// FF_FDEBUG_TS = 0x0001 public const int FF_FDEBUG_TS = 0x1; - /// FF_HLS_TS_OPTIONS = (LIBAVFORMAT_VERSION_MAJOR < 60) - public const bool FF_HLS_TS_OPTIONS = LIBAVFORMAT_VERSION_MAJOR < 0x3c; /// FF_IDCT_ALTIVEC = 0x8 public const int FF_IDCT_ALTIVEC = 0x8; /// FF_IDCT_ARM = 0x7 @@ -1201,6 +1199,10 @@ public static unsafe partial class ffmpeg public const int FF_LOSS_COLORSPACE = 0x4; /// FF_LOSS_DEPTH = 0x2 public const int FF_LOSS_DEPTH = 0x2; + /// FF_LOSS_EXCESS_DEPTH = 0x80 + public const int FF_LOSS_EXCESS_DEPTH = 0x80; + /// FF_LOSS_EXCESS_RESOLUTION = 0x40 + public const int FF_LOSS_EXCESS_RESOLUTION = 0x40; /// FF_LOSS_RESOLUTION = 0x1 public const int FF_LOSS_RESOLUTION = 0x1; /// FF_MB_DECISION_BITS = 0x1 @@ -1423,8 +1425,6 @@ public static unsafe partial class ffmpeg public const int FF_SUB_CHARENC_MODE_IGNORE = 0x2; /// FF_SUB_CHARENC_MODE_PRE_DECODER = 0x1 public const int FF_SUB_CHARENC_MODE_PRE_DECODER = 0x1; - /// FF_SUB_TEXT_FMT_ASS = 0x0 - public const int FF_SUB_TEXT_FMT_ASS = 0x0; /// FF_THREAD_FRAME = 0x1 public const int FF_THREAD_FRAME = 0x1; /// FF_THREAD_SLICE = 0x2 @@ -1454,12 +1454,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 = 59 - public const int LIBAVCODEC_VERSION_MAJOR = 0x3b; + /// LIBAVCODEC_VERSION_MAJOR = 60 + public const int LIBAVCODEC_VERSION_MAJOR = 0x3c; /// LIBAVCODEC_VERSION_MICRO = 0x64 public const int LIBAVCODEC_VERSION_MICRO = 0x64; - /// LIBAVCODEC_VERSION_MINOR = 0x25 - public const int LIBAVCODEC_VERSION_MINOR = 0x25; + /// LIBAVCODEC_VERSION_MINOR = 0x3 + public const int LIBAVCODEC_VERSION_MINOR = 0x3; /// LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT public static readonly int LIBAVDEVICE_BUILD = LIBAVDEVICE_VERSION_INT; /// LIBAVDEVICE_IDENT = "Lavd" AV_STRINGIFY(LIBAVDEVICE_VERSION) @@ -1468,12 +1468,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 = 59 - public const int LIBAVDEVICE_VERSION_MAJOR = 0x3b; + /// LIBAVDEVICE_VERSION_MAJOR = 60 + public const int LIBAVDEVICE_VERSION_MAJOR = 0x3c; /// LIBAVDEVICE_VERSION_MICRO = 100 public const int LIBAVDEVICE_VERSION_MICRO = 0x64; - /// LIBAVDEVICE_VERSION_MINOR = 7 - public const int LIBAVDEVICE_VERSION_MINOR = 0x7; + /// 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" @@ -1482,12 +1482,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 = 0x8 - public const int LIBAVFILTER_VERSION_MAJOR = 0x8; + /// LIBAVFILTER_VERSION_MAJOR = 0x9 + public const int LIBAVFILTER_VERSION_MAJOR = 0x9; /// LIBAVFILTER_VERSION_MICRO = 0x64 public const int LIBAVFILTER_VERSION_MICRO = 0x64; - /// LIBAVFILTER_VERSION_MINOR = 0x2c - public const int LIBAVFILTER_VERSION_MINOR = 0x2c; + /// LIBAVFILTER_VERSION_MINOR = 0x3 + public const int LIBAVFILTER_VERSION_MINOR = 0x3; /// LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT public static readonly int LIBAVFORMAT_BUILD = LIBAVFORMAT_VERSION_INT; /// LIBAVFORMAT_IDENT = "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -1496,12 +1496,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 = 59 - public const int LIBAVFORMAT_VERSION_MAJOR = 0x3b; + /// LIBAVFORMAT_VERSION_MAJOR = 60 + public const int LIBAVFORMAT_VERSION_MAJOR = 0x3c; /// LIBAVFORMAT_VERSION_MICRO = 100 public const int LIBAVFORMAT_VERSION_MICRO = 0x64; - /// LIBAVFORMAT_VERSION_MINOR = 27 - public const int LIBAVFORMAT_VERSION_MINOR = 0x1b; + /// LIBAVFORMAT_VERSION_MINOR = 3 + public const int LIBAVFORMAT_VERSION_MINOR = 0x3; /// LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT public static readonly int LIBAVUTIL_BUILD = LIBAVUTIL_VERSION_INT; /// LIBAVUTIL_IDENT = "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION) @@ -1510,12 +1510,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 = 57 - public const int LIBAVUTIL_VERSION_MAJOR = 0x39; + /// LIBAVUTIL_VERSION_MAJOR = 58 + public const int LIBAVUTIL_VERSION_MAJOR = 0x3a; /// LIBAVUTIL_VERSION_MICRO = 100 public const int LIBAVUTIL_VERSION_MICRO = 0x64; - /// LIBAVUTIL_VERSION_MINOR = 28 - public const int LIBAVUTIL_VERSION_MINOR = 0x1c; + /// LIBAVUTIL_VERSION_MINOR = 2 + public const int LIBAVUTIL_VERSION_MINOR = 0x2; /// LIBPOSTPROC_BUILD = LIBPOSTPROC_VERSION_INT public static readonly int LIBPOSTPROC_BUILD = LIBPOSTPROC_VERSION_INT; /// LIBPOSTPROC_IDENT = "postproc" @@ -1524,12 +1524,12 @@ public static unsafe partial class ffmpeg public static readonly string LIBPOSTPROC_VERSION = AV_VERSION(LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO); /// LIBPOSTPROC_VERSION_INT = AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO) public static readonly int LIBPOSTPROC_VERSION_INT = AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO); - /// LIBPOSTPROC_VERSION_MAJOR = 0x38 - public const int LIBPOSTPROC_VERSION_MAJOR = 0x38; + /// LIBPOSTPROC_VERSION_MAJOR = 0x39 + public const int LIBPOSTPROC_VERSION_MAJOR = 0x39; /// LIBPOSTPROC_VERSION_MICRO = 0x64 public const int LIBPOSTPROC_VERSION_MICRO = 0x64; - /// LIBPOSTPROC_VERSION_MINOR = 0x6 - public const int LIBPOSTPROC_VERSION_MINOR = 0x6; + /// LIBPOSTPROC_VERSION_MINOR = 0x1 + public const int LIBPOSTPROC_VERSION_MINOR = 0x1; /// LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT public static readonly int LIBSWRESAMPLE_BUILD = LIBSWRESAMPLE_VERSION_INT; /// LIBSWRESAMPLE_IDENT = "SwR" @@ -1542,8 +1542,8 @@ public static unsafe partial class ffmpeg public const int LIBSWRESAMPLE_VERSION_MAJOR = 0x4; /// LIBSWRESAMPLE_VERSION_MICRO = 0x64 public const int LIBSWRESAMPLE_VERSION_MICRO = 0x64; - /// LIBSWRESAMPLE_VERSION_MINOR = 0x7 - public const int LIBSWRESAMPLE_VERSION_MINOR = 0x7; + /// LIBSWRESAMPLE_VERSION_MINOR = 0xa + public const int LIBSWRESAMPLE_VERSION_MINOR = 0xa; /// LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT public static readonly int LIBSWSCALE_BUILD = LIBSWSCALE_VERSION_INT; /// LIBSWSCALE_IDENT = "SwS" @@ -1552,12 +1552,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 = 0x6 - public const int LIBSWSCALE_VERSION_MAJOR = 0x6; + /// LIBSWSCALE_VERSION_MAJOR = 0x7 + public const int LIBSWSCALE_VERSION_MAJOR = 0x7; /// LIBSWSCALE_VERSION_MICRO = 0x64 public const int LIBSWSCALE_VERSION_MICRO = 0x64; - /// LIBSWSCALE_VERSION_MINOR = 0x7 - public const int LIBSWSCALE_VERSION_MINOR = 0x7; + /// LIBSWSCALE_VERSION_MINOR = 0x1 + public const int LIBSWSCALE_VERSION_MINOR = 0x1; /// M_E = 2.7182818284590452354 public const double M_E = 2.718281828459045D; /// M_LN10 = 2.30258509299404568402 diff --git a/FFmpeg.AutoGen/generated/vectors.g.cs b/FFmpeg.AutoGen/generated/vectors.g.cs index 9c307833..226fcf53 100644 --- a/FFmpeg.AutoGen/generated/vectors.g.cs +++ b/FFmpeg.AutoGen/generated/vectors.g.cs @@ -5,10 +5,6 @@ namespace FFmpeg.AutoGen; public static unsafe partial class vectors { - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVABufferSinkParams* av_abuffersink_params_alloc_delegate(); - public static av_abuffersink_params_alloc_delegate av_abuffersink_params_alloc; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_add_index_entry_delegate(AVStream* @st, long @pos, long @timestamp, int @size, int @distance, int @flags); public static av_add_index_entry_delegate av_add_index_entry; @@ -283,10 +279,6 @@ public delegate int av_bsf_list_parse_str_delegate( public delegate int av_buffersink_get_w_delegate(AVFilterContext* @ctx); public static av_buffersink_get_w_delegate av_buffersink_get_w; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVBufferSinkParams* av_buffersink_params_alloc_delegate(); - public static av_buffersink_params_alloc_delegate av_buffersink_params_alloc; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void av_buffersink_set_frame_size_delegate(AVFilterContext* @ctx, uint @frame_size); public static av_buffersink_set_frame_size_delegate av_buffersink_set_frame_size; @@ -431,6 +423,10 @@ public delegate int av_channel_layout_index_from_string_delegate(AVChannelLayout public delegate void av_channel_name_bprint_delegate(AVBPrint* @bp, AVChannel @channel_id); public static av_channel_name_bprint_delegate av_channel_name_bprint; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int av_chroma_location_enum_to_pos_delegate(int* @xpos, int* @ypos, AVChromaLocation @pos); + public static av_chroma_location_enum_to_pos_delegate av_chroma_location_enum_to_pos; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_chroma_location_from_name_delegate( #if NETSTANDARD2_1_OR_GREATER @@ -446,6 +442,10 @@ public delegate int av_chroma_location_from_name_delegate( public delegate string av_chroma_location_name_delegate(AVChromaLocation @location); public static av_chroma_location_name_delegate av_chroma_location_name; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVChromaLocation av_chroma_location_pos_to_enum_delegate(int @xpos, int @ypos); + public static av_chroma_location_pos_to_enum_delegate av_chroma_location_pos_to_enum; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVCodecID av_codec_get_id_delegate(AVCodecTag** @tags, uint @tag); public static av_codec_get_id_delegate av_codec_get_id; @@ -609,6 +609,10 @@ public delegate int av_color_transfer_from_name_delegate( public delegate int av_dict_get_string_delegate(AVDictionary* @m, byte** @buffer, byte @key_val_sep, byte @pairs_sep); public static av_dict_get_string_delegate av_dict_get_string; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate AVDictionaryEntry* av_dict_iterate_delegate(AVDictionary* @m, AVDictionaryEntry* @prev); + public static av_dict_iterate_delegate av_dict_iterate; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_dict_parse_string_delegate(AVDictionary** @pm, #if NETSTANDARD2_1_OR_GREATER @@ -961,11 +965,6 @@ public delegate ulong av_get_channel_layout_delegate( public delegate string av_get_channel_name_delegate(ulong @channel); public static av_get_channel_name_delegate av_get_channel_name; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] - public delegate string av_get_colorspace_name_delegate(AVColorSpace @val); - public static av_get_colorspace_name_delegate av_get_colorspace_name; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int av_get_cpu_flags_delegate(); public static av_get_cpu_flags_delegate av_get_cpu_flags; @@ -1443,10 +1442,6 @@ public delegate void av_log_once_delegate(void* @avcl, int @initial_level, int @ public delegate void* av_mallocz_delegate(ulong @size); public static av_mallocz_delegate av_mallocz; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void* av_mallocz_array_delegate(ulong @nmemb, ulong @size); - public static av_mallocz_array_delegate av_mallocz_array; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVMasteringDisplayMetadata* av_mastering_display_metadata_alloc_delegate(); public static av_mastering_display_metadata_alloc_delegate av_mastering_display_metadata_alloc; @@ -2606,10 +2601,6 @@ public delegate void av_vlog_delegate(void* @avcl, int @level, public delegate AVClass* avcodec_get_class_delegate(); public static avcodec_get_class_delegate avcodec_get_class; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate AVClass* avcodec_get_frame_class_delegate(); - public static avcodec_get_frame_class_delegate avcodec_get_frame_class; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate AVCodecHWConfig* avcodec_get_hw_config_delegate(AVCodec* @codec, int @index); public static avcodec_get_hw_config_delegate avcodec_get_hw_config; @@ -2701,14 +2692,6 @@ public delegate void av_vlog_delegate(void* @avcl, int @level, public delegate int avdevice_app_to_dev_control_message_delegate(AVFormatContext* @s, AVAppToDevMessageType @type, void* @data, ulong @data_size); public static avdevice_app_to_dev_control_message_delegate avdevice_app_to_dev_control_message; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int avdevice_capabilities_create_delegate(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s, AVDictionary** @device_options); - public static avdevice_capabilities_create_delegate avdevice_capabilities_create; - - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void avdevice_capabilities_free_delegate(AVDeviceCapabilitiesQuery** @caps, AVFormatContext* @s); - public static avdevice_capabilities_free_delegate avdevice_capabilities_free; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public delegate string avdevice_configuration_delegate(); @@ -2904,6 +2887,40 @@ public delegate int avfilter_graph_queue_command_delegate(AVFilterGraph* @graph, public delegate int avfilter_graph_request_oldest_delegate(AVFilterGraph* @graph); public static avfilter_graph_request_oldest_delegate avfilter_graph_request_oldest; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_apply_delegate(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs); + public static avfilter_graph_segment_apply_delegate avfilter_graph_segment_apply; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_apply_opts_delegate(AVFilterGraphSegment* @seg, int @flags); + public static avfilter_graph_segment_apply_opts_delegate avfilter_graph_segment_apply_opts; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_create_filters_delegate(AVFilterGraphSegment* @seg, int @flags); + public static avfilter_graph_segment_create_filters_delegate avfilter_graph_segment_create_filters; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate void avfilter_graph_segment_free_delegate(AVFilterGraphSegment** @seg); + public static avfilter_graph_segment_free_delegate avfilter_graph_segment_free; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_init_delegate(AVFilterGraphSegment* @seg, int @flags); + public static avfilter_graph_segment_init_delegate avfilter_graph_segment_init; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_link_delegate(AVFilterGraphSegment* @seg, int @flags, AVFilterInOut** @inputs, AVFilterInOut** @outputs); + public static avfilter_graph_segment_link_delegate avfilter_graph_segment_link; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + public delegate int avfilter_graph_segment_parse_delegate(AVFilterGraph* @graph, + #if NETSTANDARD2_1_OR_GREATER + [MarshalAs(UnmanagedType.LPUTF8Str)] + #else + [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] + #endif + string @graph_str, int @flags, AVFilterGraphSegment** @seg); + public static avfilter_graph_segment_parse_delegate avfilter_graph_segment_parse; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate int avfilter_graph_send_command_delegate(AVFilterGraph* @graph, #if NETSTANDARD2_1_OR_GREATER @@ -2969,10 +2986,6 @@ public delegate int avfilter_init_str_delegate(AVFilterContext* @ctx, public delegate void avfilter_link_free_delegate(AVFilterLink** @link); public static avfilter_link_free_delegate avfilter_link_free; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int avfilter_pad_count_delegate(AVFilterPad* @pads); - public static avfilter_pad_count_delegate avfilter_pad_count; - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ConstCharPtrMarshaler))] public delegate string avfilter_pad_get_name_delegate(AVFilterPad* @pads, int @pad_idx); diff --git a/FFmpeg/bin/x64/avcodec-59.dll b/FFmpeg/bin/x64/avcodec-60.dll similarity index 86% rename from FFmpeg/bin/x64/avcodec-59.dll rename to FFmpeg/bin/x64/avcodec-60.dll index a25a5ea4..d79d7a68 100644 Binary files a/FFmpeg/bin/x64/avcodec-59.dll and b/FFmpeg/bin/x64/avcodec-60.dll differ diff --git a/FFmpeg/bin/x64/avdevice-59.dll b/FFmpeg/bin/x64/avdevice-60.dll similarity index 70% rename from FFmpeg/bin/x64/avdevice-59.dll rename to FFmpeg/bin/x64/avdevice-60.dll index 9d72b3d7..3058b431 100644 Binary files a/FFmpeg/bin/x64/avdevice-59.dll and b/FFmpeg/bin/x64/avdevice-60.dll differ diff --git a/FFmpeg/bin/x64/avfilter-8.dll b/FFmpeg/bin/x64/avfilter-9.dll similarity index 83% rename from FFmpeg/bin/x64/avfilter-8.dll rename to FFmpeg/bin/x64/avfilter-9.dll index 7b2d9748..b2663353 100644 Binary files a/FFmpeg/bin/x64/avfilter-8.dll and b/FFmpeg/bin/x64/avfilter-9.dll differ diff --git a/FFmpeg/bin/x64/avformat-59.dll b/FFmpeg/bin/x64/avformat-60.dll similarity index 68% rename from FFmpeg/bin/x64/avformat-59.dll rename to FFmpeg/bin/x64/avformat-60.dll index a90b7baa..9534bc63 100644 Binary files a/FFmpeg/bin/x64/avformat-59.dll and b/FFmpeg/bin/x64/avformat-60.dll differ diff --git a/FFmpeg/bin/x64/avutil-57.dll b/FFmpeg/bin/x64/avutil-57.dll deleted file mode 100644 index 99f2277d..00000000 Binary files a/FFmpeg/bin/x64/avutil-57.dll and /dev/null differ diff --git a/FFmpeg/bin/x64/avutil-58.dll b/FFmpeg/bin/x64/avutil-58.dll new file mode 100644 index 00000000..53b4aa53 Binary files /dev/null and b/FFmpeg/bin/x64/avutil-58.dll differ diff --git a/FFmpeg/bin/x64/postproc-56.dll b/FFmpeg/bin/x64/postproc-56.dll deleted file mode 100644 index 1c4424e3..00000000 Binary files a/FFmpeg/bin/x64/postproc-56.dll and /dev/null differ diff --git a/FFmpeg/bin/x64/postproc-57.dll b/FFmpeg/bin/x64/postproc-57.dll new file mode 100644 index 00000000..8442ec99 Binary files /dev/null and b/FFmpeg/bin/x64/postproc-57.dll differ diff --git a/FFmpeg/bin/x64/swresample-4.dll b/FFmpeg/bin/x64/swresample-4.dll index d5641842..a4bec2dc 100644 Binary files a/FFmpeg/bin/x64/swresample-4.dll and b/FFmpeg/bin/x64/swresample-4.dll differ diff --git a/FFmpeg/bin/x64/swscale-6.dll b/FFmpeg/bin/x64/swscale-6.dll deleted file mode 100644 index b4fdbdcf..00000000 Binary files a/FFmpeg/bin/x64/swscale-6.dll and /dev/null differ diff --git a/FFmpeg/bin/x64/swscale-7.dll b/FFmpeg/bin/x64/swscale-7.dll new file mode 100644 index 00000000..8a4a1d72 Binary files /dev/null and b/FFmpeg/bin/x64/swscale-7.dll differ diff --git a/FFmpeg/include/libavcodec/avcodec.h b/FFmpeg/include/libavcodec/avcodec.h index cb5c25bf..39881a1d 100644 --- a/FFmpeg/include/libavcodec/avcodec.h +++ b/FFmpeg/include/libavcodec/avcodec.h @@ -231,6 +231,58 @@ typedef struct RcOverride{ * decoded frame in stream. */ #define AV_CODEC_FLAG_DROPCHANGED (1 << 5) +/** + * Request the encoder to output reconstructed frames, i.e.\ frames that would + * be produced by decoding the encoded bistream. These frames may be retrieved + * by calling avcodec_receive_frame() immediately after a successful call to + * avcodec_receive_packet(). + * + * Should only be used with encoders flagged with the + * @ref AV_CODEC_CAP_ENCODER_RECON_FRAME capability. + */ +#define AV_CODEC_FLAG_RECON_FRAME (1 << 6) +/** + * @par decoding + * Request the decoder to propagate each packets AVPacket.opaque and + * AVPacket.opaque_ref to its corresponding output AVFrame. + * + * @par encoding: + * Request the encoder to propagate each frame's AVFrame.opaque and + * AVFrame.opaque_ref values to its corresponding output AVPacket. + * + * @par + * May only be set on encoders that have the + * @ref AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability flag. + * + * @note + * While in typical cases one input frame produces exactly one output packet + * (perhaps after a delay), in general the mapping of frames to packets is + * M-to-N, so + * - Any number of input frames may be associated with any given output packet. + * This includes zero - e.g. some encoders may output packets that carry only + * metadata about the whole stream. + * - A given input frame may be associated with any number of output packets. + * Again this includes zero - e.g. some encoders may drop frames under certain + * conditions. + * . + * This implies that when using this flag, the caller must NOT assume that + * - a given input frame's opaques will necessarily appear on some output packet; + * - every output packet will have some non-NULL opaque value. + * . + * When an output packet contains multiple frames, the opaque values will be + * taken from the first of those. + * + * @note + * The converse holds for decoders, with frames and packets switched. + */ +#define AV_CODEC_FLAG_COPY_OPAQUE (1 << 7) +/** + * Signal to the encoder that the values of AVFrame.duration are valid and + * should be used (typically for transferring them to output packets). + * + * If this flag is not set, frame durations are ignored. + */ +#define AV_CODEC_FLAG_FRAME_DURATION (1 << 8) /** * Use internal 2pass ratecontrol in first pass mode. */ @@ -251,15 +303,6 @@ typedef struct RcOverride{ * error[?] variables will be set during encoding. */ #define AV_CODEC_FLAG_PSNR (1 << 15) -#if FF_API_FLAG_TRUNCATED -/** - * Input bitstream might be truncated at a random location - * instead of only at frame boundaries. - * - * @deprecated use codec parsers for packetizing input - */ -#define AV_CODEC_FLAG_TRUNCATED (1 << 16) -#endif /** * Use interlaced DCT. */ @@ -300,11 +343,6 @@ typedef struct RcOverride{ */ #define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3) -/** - * timecode is in drop frame format. DEPRECATED!!!! - */ -#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13) - /** * Input bitstream might be truncated at a packet boundaries * instead of only at frame boundaries. @@ -331,13 +369,12 @@ typedef struct RcOverride{ * Do not reset ASS ReadOrder field on flush (subtitles decoding) */ #define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30) - -/* Unsupported options : - * Syntax Arithmetic coding (SAC) - * Reference Picture Selection - * Independent Segment Decoding */ -/* /Fx */ -/* codec capabilities */ +/** + * Generate/parse ICC profiles on encode/decode, as appropriate for the type of + * file. No effect on codecs which cannot contain embedded ICC profiles, or + * when compiled without support for lcms2. + */ +#define AV_CODEC_FLAG2_ICC_PROFILES (1U << 31) /* Exported side data. These flags can be passed in AVCodecContext.export_side_data before initialization. @@ -506,8 +543,7 @@ typedef struct AVCodecContext { * (fixed_vop_rate == 0 implies that it is different from the framerate) * * - encoding: MUST be set by user. - * - decoding: the use of this field for decoding is deprecated. - * Use framerate instead. + * - decoding: unused. */ AVRational time_base; @@ -1025,6 +1061,7 @@ typedef struct AVCodecContext { */ int frame_size; +#if FF_API_AVCTX_FRAME_NUMBER /** * Frame counter, set by libavcodec. * @@ -1033,8 +1070,11 @@ typedef struct AVCodecContext { * * @note the counter is not incremented if encoding/decoding resulted in * an error. + * @deprecated use frame_num instead */ + attribute_deprecated int frame_number; +#endif /** * number of bytes per packet if constant and known or 0 @@ -1296,13 +1336,9 @@ typedef struct AVCodecContext { * unofficial and experimental (that is, they always try to decode things * when they can) unless they are explicitly asked to behave stupidly * (=strictly conform to the specs) + * This may only be set to one of the FF_COMPLIANCE_* values in defs.h. */ int strict_std_compliance; -#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software. -#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences. -#define FF_COMPLIANCE_NORMAL 0 -#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions -#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things. /** * error concealment flags @@ -1338,28 +1374,14 @@ typedef struct AVCodecContext { /** * Error recognition; may misdetect some more or less valid parts as errors. + * This is a bitfield of the AV_EF_* values defined in defs.h. + * * - encoding: Set by user. * - decoding: Set by user. */ int err_recognition; -/** - * Verify checksums embedded in the bitstream (could be of either encoded or - * decoded data, depending on the codec) and print an error message on mismatch. - * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the - * decoder returning an error. - */ -#define AV_EF_CRCCHECK (1<<0) -#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations -#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length -#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection - -#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue -#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors -#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors -#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error - - +#if FF_API_REORDERED_OPAQUE /** * opaque 64-bit number (generally a PTS) that will be reordered and * output in AVFrame.reordered_opaque @@ -1368,8 +1390,12 @@ typedef struct AVCodecContext { * supported by encoders with the * AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability. * - decoding: Set by user. + * + * @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead */ + attribute_deprecated int64_t reordered_opaque; +#endif /** * Hardware accelerator in use @@ -1379,13 +1405,26 @@ typedef struct AVCodecContext { const struct AVHWAccel *hwaccel; /** - * Hardware accelerator context. - * For some hardware accelerators, a global context needs to be - * provided by the user. In that case, this holds display-dependent - * data FFmpeg cannot instantiate itself. Please refer to the - * FFmpeg HW accelerator documentation to know how to fill this. - * - encoding: unused - * - decoding: Set by user + * Legacy hardware accelerator context. + * + * For some hardware acceleration methods, the caller may use this field to + * signal hwaccel-specific data to the codec. The struct pointed to by this + * pointer is hwaccel-dependent and defined in the respective header. Please + * refer to the FFmpeg HW accelerator documentation to know how to fill + * this. + * + * In most cases this field is optional - the necessary information may also + * be provided to libavcodec through @ref hw_frames_ctx or @ref + * hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it + * may be the only method of signalling some (optional) information. + * + * The struct and its contents are owned by the caller. + * + * - encoding: May be set by the caller before avcodec_open2(). Must remain + * valid until avcodec_free_context(). + * - decoding: May be set by the caller in the get_format() callback. + * Must remain valid until the next get_format() call, + * or avcodec_free_context() (whichever comes first). */ void *hwaccel_context; @@ -1481,27 +1520,6 @@ typedef struct AVCodecContext { */ int active_thread_type; -#if FF_API_THREAD_SAFE_CALLBACKS - /** - * Set by the client if its custom get_buffer() callback can be called - * synchronously from another thread, which allows faster multithreaded decoding. - * draw_horiz_band() will be called from other threads regardless of this setting. - * Ignored if the default get_buffer() is used. - * - encoding: Set by user. - * - decoding: Set by user. - * - * @deprecated the custom get_buffer2() callback should always be - * thread-safe. Thread-unsafe get_buffer2() implementations will be - * invalid starting with LIBAVCODEC_VERSION_MAJOR=60; in other words, - * libavcodec will behave as if this field was always set to 1. - * Callers that want to be forward compatible with future libavcodec - * versions should wrap access to this field in - * #if LIBAVCODEC_VERSION_MAJOR < 60 - */ - attribute_deprecated - int thread_safe_callbacks; -#endif - /** * The codec may call this to execute several independent things. * It will return only after finishing all tasks. @@ -1802,17 +1820,6 @@ typedef struct AVCodecContext { */ int seek_preroll; -#if FF_API_DEBUG_MV - /** - * @deprecated unused - */ - attribute_deprecated - int debug_mv; -#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames -#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames -#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames -#endif - /** * custom intra quantization matrix * - encoding: Set by user, can be NULL. @@ -1879,15 +1886,6 @@ typedef struct AVCodecContext { */ AVBufferRef *hw_frames_ctx; -#if FF_API_SUB_TEXT_FORMAT - /** - * @deprecated unused - */ - attribute_deprecated - int sub_text_format; -#define FF_SUB_TEXT_FMT_ASS 0 -#endif - /** * 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 @@ -2054,6 +2052,17 @@ typedef struct AVCodecContext { * The decoder can then override during decoding as needed. */ AVChannelLayout ch_layout; + + /** + * Frame counter, set by libavcodec. + * + * - decoding: total number of frames returned from the decoder so far. + * - encoding: total number of frames passed to the encoder so far. + * + * @note the counter is not incremented if encoding/decoding resulted in + * an error. + */ + int64_t frame_num; } AVCodecContext; /** @@ -2250,6 +2259,22 @@ typedef struct AVHWAccel { */ #define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2) +/** + * Some hardware decoders (namely nvdec) can either output direct decoder + * surfaces, or make an on-device copy and return said copy. + * There is a hard limit on how many decoder surfaces there can be, and it + * cannot be accurately guessed ahead of time. + * For some processing chains, this can be okay, but others will run into the + * limit and in turn produce very confusing errors that require fine tuning of + * more or less obscure options by the user, or in extreme cases cannot be + * resolved at all without inserting an avfilter that forces a copy. + * + * Thus, the hwaccel will by default make a copy for safety and resilience. + * If a users really wants to minimize the amount of copies, they can set this + * flag and ensure their processing chain does not exhaust the surface pool. + */ +#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT (1 << 3) + /** * @} */ @@ -2355,14 +2380,6 @@ void avcodec_free_context(AVCodecContext **avctx); */ const AVClass *avcodec_get_class(void); -#if FF_API_GET_FRAME_CLASS -/** - * @deprecated This function should not be used. - */ -attribute_deprecated -const AVClass *avcodec_get_frame_class(void); -#endif - /** * Get the AVClass for AVSubtitleRect. It can be used in combination with * AV_OPT_SEARCH_FAKE_OBJ for examining options. @@ -2493,6 +2510,7 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height); void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int linesize_align[AV_NUM_DATA_POINTERS]); +#ifdef FF_API_AVCODEC_CHROMA_POS /** * Converts AVChromaLocation to swscale x/y chroma position. * @@ -2501,7 +2519,9 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, * * @param xpos horizontal chroma sample position * @param ypos vertical chroma sample position + * @deprecated Use av_chroma_location_enum_to_pos() instead. */ + attribute_deprecated int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos); /** @@ -2512,8 +2532,11 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos); * * @param xpos horizontal chroma sample position * @param ypos vertical chroma sample position + * @deprecated Use av_chroma_location_pos_to_enum() instead. */ + attribute_deprecated enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); +#endif /** * Decode a subtitle message. @@ -2543,8 +2566,7 @@ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos); * @param[in] avpkt The input AVPacket containing the input buffer. */ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, - int *got_sub_ptr, - AVPacket *avpkt); + int *got_sub_ptr, const AVPacket *avpkt); /** * Supply raw packet data as input to a decoder. @@ -2580,40 +2602,41 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, * still has frames buffered, it will return them after sending * a flush packet. * - * @return 0 on success, otherwise negative error code: - * AVERROR(EAGAIN): input is not accepted in the current state - user - * must read output with avcodec_receive_frame() (once - * all output is read, the packet should be resent, and - * the call will not fail with EAGAIN). - * AVERROR_EOF: the decoder has been flushed, and no new packets can - * be sent to it (also returned if more than 1 flush - * packet is sent) - * AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush - * AVERROR(ENOMEM): failed to add packet to internal queue, or similar - * other errors: legitimate decoding errors + * @retval 0 success + * @retval AVERROR(EAGAIN) input is not accepted in the current state - user + * must read output with avcodec_receive_frame() (once + * all output is read, the packet should be resent, + * and the call will not fail with EAGAIN). + * @retval AVERROR_EOF the decoder has been flushed, and no new packets can be + * sent to it (also returned if more than 1 flush + * packet is sent) + * @retval AVERROR(EINVAL) codec not opened, it is an encoder, or requires flush + * @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar + * @retval "another negative error code" legitimate decoding errors */ int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt); /** - * Return decoded output data from a decoder. + * Return decoded output data from a decoder or encoder (when the + * AV_CODEC_FLAG_RECON_FRAME flag is used). * * @param avctx codec context * @param frame This will be set to a reference-counted video or audio * frame (depending on the decoder type) allocated by the - * decoder. Note that the function will always call + * codec. Note that the function will always call * av_frame_unref(frame) before doing anything else. * - * @return - * 0: success, a frame was returned - * AVERROR(EAGAIN): output is not available in this state - user must try - * to send new input - * AVERROR_EOF: the decoder has been fully flushed, and there will be - * no more output frames - * AVERROR(EINVAL): codec not opened, or it is an encoder - * AVERROR_INPUT_CHANGED: current decoded frame has changed parameters - * with respect to first decoded frame. Applicable - * when flag AV_CODEC_FLAG_DROPCHANGED is set. - * other negative values: legitimate decoding errors + * @retval 0 success, a frame was returned + * @retval AVERROR(EAGAIN) output is not available in this state - user must + * try to send new input + * @retval AVERROR_EOF the codec has been fully flushed, and there will be + * no more output frames + * @retval AVERROR(EINVAL) codec not opened, or it is an encoder without the + * AV_CODEC_FLAG_RECON_FRAME flag enabled + * @retval AVERROR_INPUT_CHANGED current decoded frame has changed parameters with + * respect to first decoded frame. Applicable when flag + * AV_CODEC_FLAG_DROPCHANGED is set. + * @retval "other negative error code" legitimate decoding errors */ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame); @@ -2640,16 +2663,16 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame); * If it is not set, frame->nb_samples must be equal to * avctx->frame_size for all frames except the last. * The final frame may be smaller than avctx->frame_size. - * @return 0 on success, otherwise negative error code: - * AVERROR(EAGAIN): input is not accepted in the current state - user - * must read output with avcodec_receive_packet() (once - * all output is read, the packet should be resent, and - * the call will not fail with EAGAIN). - * AVERROR_EOF: the encoder has been flushed, and no new frames can - * be sent to it - * AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush - * AVERROR(ENOMEM): failed to add packet to internal queue, or similar - * other errors: legitimate encoding errors + * @retval 0 success + * @retval AVERROR(EAGAIN) input is not accepted in the current state - user must + * read output with avcodec_receive_packet() (once all + * output is read, the packet should be resent, and the + * call will not fail with EAGAIN). + * @retval AVERROR_EOF the encoder has been flushed, and no new frames can + * be sent to it + * @retval AVERROR(EINVAL) codec not opened, it is a decoder, or requires flush + * @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar + * @retval "another negative error code" legitimate encoding errors */ int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame); @@ -2660,13 +2683,13 @@ int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame); * @param avpkt 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. - * @return 0 on success, otherwise negative error code: - * AVERROR(EAGAIN): output is not available in the current state - user - * must try to send input - * AVERROR_EOF: the encoder has been fully flushed, and there will be - * no more output packets - * AVERROR(EINVAL): codec not opened, or it is a decoder - * other errors: legitimate encoding errors + * @retval 0 success + * @retval AVERROR(EAGAIN) output is not available in the current state - user must + * try to send input + * @retval AVERROR_EOF the encoder has been fully flushed, and there will be no + * more output packets + * @retval AVERROR(EINVAL) codec not opened, or it is a decoder + * @retval "another negative error code" legitimate encoding errors */ int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt); @@ -2780,10 +2803,10 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx, */ enum AVPictureStructure { - AV_PICTURE_STRUCTURE_UNKNOWN, //< unknown - AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field - AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field - AV_PICTURE_STRUCTURE_FRAME, //< coded as frame + AV_PICTURE_STRUCTURE_UNKNOWN, ///< unknown + AV_PICTURE_STRUCTURE_TOP_FIELD, ///< coded as top field + AV_PICTURE_STRUCTURE_BOTTOM_FIELD, ///< coded as bottom field + AV_PICTURE_STRUCTURE_FRAME, ///< coded as frame }; typedef struct AVCodecParserContext { diff --git a/FFmpeg/include/libavcodec/bsf.h b/FFmpeg/include/libavcodec/bsf.h index 69d91a16..a09c69f2 100644 --- a/FFmpeg/include/libavcodec/bsf.h +++ b/FFmpeg/include/libavcodec/bsf.h @@ -164,6 +164,8 @@ int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx); /** * Prepare the filter for use, after all the parameters and options have been * set. + * + * @param ctx a AVBSFContext previously allocated with av_bsf_alloc() */ int av_bsf_init(AVBSFContext *ctx); @@ -174,6 +176,7 @@ int av_bsf_init(AVBSFContext *ctx); * av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or * AVERROR_EOF. * + * @param ctx an initialized AVBSFContext * @param pkt 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), @@ -192,6 +195,7 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt); /** * Retrieve a filtered packet. * + * @param ctx an initialized AVBSFContext * @param[out] pkt 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. diff --git a/FFmpeg/include/libavcodec/codec.h b/FFmpeg/include/libavcodec/codec.h index 03e8be90..3b1995bc 100644 --- a/FFmpeg/include/libavcodec/codec.h +++ b/FFmpeg/include/libavcodec/codec.h @@ -50,12 +50,6 @@ * avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer. */ #define AV_CODEC_CAP_DR1 (1 << 1) -#if FF_API_FLAG_TRUNCATED -/** - * @deprecated Use parsers to always send proper frames. - */ -#define AV_CODEC_CAP_TRUNCATED (1 << 3) -#endif /** * Encoder or decoder requires flushing with NULL input at the end in order to * give the complete and correct output. @@ -125,9 +119,6 @@ * multithreading-capable external libraries. */ #define AV_CODEC_CAP_OTHER_THREADS (1 << 15) -#if FF_API_AUTO_THREADS -#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS -#endif /** * Audio encoder supports receiving a different number of samples in each call. */ @@ -143,17 +134,6 @@ */ #define AV_CODEC_CAP_AVOID_PROBING (1 << 17) -#if FF_API_UNUSED_CODEC_CAPS -/** - * Deprecated and unused. Use AVCodecDescriptor.props instead - */ -#define AV_CODEC_CAP_INTRA_ONLY 0x40000000 -/** - * Deprecated and unused. Use AVCodecDescriptor.props instead - */ -#define AV_CODEC_CAP_LOSSLESS 0x80000000 -#endif - /** * Codec is backed by a hardware implementation. Typically used to * identify a non-hwaccel hardware decoder. For information about hwaccels, use @@ -169,9 +149,9 @@ #define AV_CODEC_CAP_HYBRID (1 << 19) /** - * This codec takes the reordered_opaque field from input AVFrames - * and returns it in the corresponding field in AVCodecContext after - * encoding. + * This encoder can reorder user opaque values from input AVFrames and return + * them with corresponding output packets. + * @see AV_CODEC_FLAG_COPY_OPAQUE */ #define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20) @@ -182,6 +162,14 @@ */ #define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21) +/** + * The encoder is able to output reconstructed frame data, i.e. raw frames that + * would be produced by decoding the encoded bitstream. + * + * Reconstructed frame output is enabled by the AV_CODEC_FLAG_RECON_FRAME flag. + */ +#define AV_CODEC_CAP_ENCODER_RECON_FRAME (1 << 22) + /** * AVProfile. */ diff --git a/FFmpeg/include/libavcodec/codec_id.h b/FFmpeg/include/libavcodec/codec_id.h index 81fb316c..89a4a0cb 100644 --- a/FFmpeg/include/libavcodec/codec_id.h +++ b/FFmpeg/include/libavcodec/codec_id.h @@ -24,6 +24,8 @@ #include "libavutil/avutil.h" #include "libavutil/samplefmt.h" +#include "version_major.h" + /** * @addtogroup lavc_core * @{ @@ -251,7 +253,9 @@ enum AVCodecID { AV_CODEC_ID_AVRP, AV_CODEC_ID_012V, AV_CODEC_ID_AVUI, +#if FF_API_AYUV_CODECID AV_CODEC_ID_AYUV, +#endif AV_CODEC_ID_TARGA_Y216, AV_CODEC_ID_V308, AV_CODEC_ID_V408, @@ -312,6 +316,10 @@ enum AVCodecID { AV_CODEC_ID_JPEGXL, AV_CODEC_ID_QOI, AV_CODEC_ID_PHM, + AV_CODEC_ID_RADIANCE_HDR, + AV_CODEC_ID_WBMP, + AV_CODEC_ID_MEDIA100, + AV_CODEC_ID_VQC, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs @@ -405,6 +413,7 @@ enum AVCodecID { AV_CODEC_ID_ADPCM_IMA_CUNNING, AV_CODEC_ID_ADPCM_IMA_MOFLEX, AV_CODEC_ID_ADPCM_IMA_ACORN, + AV_CODEC_ID_ADPCM_XMD, /* AMR */ AV_CODEC_ID_AMR_NB = 0x12000, @@ -422,6 +431,8 @@ enum AVCodecID { AV_CODEC_ID_SDX2_DPCM, AV_CODEC_ID_GREMLIN_DPCM, AV_CODEC_ID_DERF_DPCM, + AV_CODEC_ID_WADY_DPCM, + AV_CODEC_ID_CBD2_DPCM, /* audio codecs */ AV_CODEC_ID_MP2 = 0x15000, @@ -521,6 +532,12 @@ enum AVCodecID { AV_CODEC_ID_FASTAUDIO, AV_CODEC_ID_MSNSIREN, AV_CODEC_ID_DFPWM, + AV_CODEC_ID_BONK, + AV_CODEC_ID_MISC4, + AV_CODEC_ID_APAC, + AV_CODEC_ID_FTR, + AV_CODEC_ID_WAVARC, + AV_CODEC_ID_RKA, /* subtitle codecs */ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. @@ -575,6 +592,16 @@ enum AVCodecID { * stream (only used by libavformat) */ AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information. AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket + /** + * Dummy null video codec, useful mainly for development and debugging. + * Null encoder/decoder discard all input and never return any output. + */ + AV_CODEC_ID_VNULL, + /** + * Dummy null audio codec, useful mainly for development and debugging. + * Null encoder/decoder discard all input and never return any output. + */ + AV_CODEC_ID_ANULL, }; /** diff --git a/FFmpeg/include/libavcodec/codec_par.h b/FFmpeg/include/libavcodec/codec_par.h index 7660791a..f51d27c5 100644 --- a/FFmpeg/include/libavcodec/codec_par.h +++ b/FFmpeg/include/libavcodec/codec_par.h @@ -32,15 +32,16 @@ /** * @addtogroup lavc_core + * @{ */ enum AVFieldOrder { AV_FIELD_UNKNOWN, AV_FIELD_PROGRESSIVE, - AV_FIELD_TT, //< Top coded_first, top displayed first - AV_FIELD_BB, //< Bottom coded first, bottom displayed first - AV_FIELD_TB, //< Top coded first, bottom displayed first - AV_FIELD_BT, //< Bottom coded first, top displayed first + AV_FIELD_TT, ///< Top coded_first, top displayed first + AV_FIELD_BB, ///< Bottom coded first, bottom displayed first + AV_FIELD_TB, ///< Top coded first, bottom displayed first + AV_FIELD_BT, ///< Bottom coded first, top displayed first }; /** diff --git a/FFmpeg/include/libavcodec/defs.h b/FFmpeg/include/libavcodec/defs.h index 420a042b..fbe3254d 100644 --- a/FFmpeg/include/libavcodec/defs.h +++ b/FFmpeg/include/libavcodec/defs.h @@ -39,6 +39,28 @@ */ #define AV_INPUT_BUFFER_PADDING_SIZE 64 +/** + * Verify checksums embedded in the bitstream (could be of either encoded or + * decoded data, depending on the format) and print an error message on mismatch. + * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the + * decoder/demuxer returning an error. + */ +#define AV_EF_CRCCHECK (1<<0) +#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations +#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length +#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection + +#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue +#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors +#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors +#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder/muxer should not do as an error + +#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software. +#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences. +#define FF_COMPLIANCE_NORMAL 0 +#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions +#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things. + /** * @ingroup lavc_decoding */ diff --git a/FFmpeg/include/libavcodec/mediacodec.h b/FFmpeg/include/libavcodec/mediacodec.h index 4c8545df..4e9b56a6 100644 --- a/FFmpeg/include/libavcodec/mediacodec.h +++ b/FFmpeg/include/libavcodec/mediacodec.h @@ -88,13 +88,15 @@ int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render); /** * Release a MediaCodec buffer and render it at the given time to the surface * that is associated with the decoder. The timestamp must be within one second - * of the current java/lang/System#nanoTime() (which is implemented using - * CLOCK_MONOTONIC on Android). See the Android MediaCodec documentation - * of android/media/MediaCodec#releaseOutputBuffer(int,long) for more details. + * of the current `java/lang/System#nanoTime()` (which is implemented using + * `CLOCK_MONOTONIC` on Android). See the Android MediaCodec documentation + * of [`android/media/MediaCodec#releaseOutputBuffer(int,long)`][0] for more details. * * @param buffer the buffer to render * @param time timestamp in nanoseconds of when to render the buffer * @return 0 on success, < 0 otherwise + * + * [0]: https://developer.android.com/reference/android/media/MediaCodec#releaseOutputBuffer(int,%20long) */ int av_mediacodec_render_buffer_at_time(AVMediaCodecBuffer *buffer, int64_t time); diff --git a/FFmpeg/include/libavcodec/packet.h b/FFmpeg/include/libavcodec/packet.h index 404d5200..f28e7e70 100644 --- a/FFmpeg/include/libavcodec/packet.h +++ b/FFmpeg/include/libavcodec/packet.h @@ -161,7 +161,7 @@ enum AVPacketSideDataType { * the packet may contain "dual mono" audio specific to Japanese DTV * and if it is true, recommends only the selected channel to be used. * @code - * u8 selected channels (0=mail/left, 1=sub/right, 2=both) + * u8 selected channels (0=main/left, 1=sub/right, 2=both) * @endcode */ AV_PKT_DATA_JP_DUALMONO, diff --git a/FFmpeg/include/libavcodec/qsv.h b/FFmpeg/include/libavcodec/qsv.h index b77158ec..c156b08d 100644 --- a/FFmpeg/include/libavcodec/qsv.h +++ b/FFmpeg/include/libavcodec/qsv.h @@ -21,7 +21,7 @@ #ifndef AVCODEC_QSV_H #define AVCODEC_QSV_H -#include +#include #include "libavutil/buffer.h" @@ -61,6 +61,8 @@ typedef struct AVQSVContext { * required by the encoder and the user-provided value nb_opaque_surfaces. * The array of the opaque surfaces will be exported to the caller through * the opaque_surfaces field. + * + * The caller must set this field to zero for oneVPL (MFX_VERSION >= 2.0) */ int opaque_alloc; diff --git a/FFmpeg/include/libavcodec/vdpau.h b/FFmpeg/include/libavcodec/vdpau.h index 3010094d..35c4b109 100644 --- a/FFmpeg/include/libavcodec/vdpau.h +++ b/FFmpeg/include/libavcodec/vdpau.h @@ -152,6 +152,6 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type, */ AVVDPAUContext *av_vdpau_alloc_context(void); -/* @}*/ +/** @} */ #endif /* AVCODEC_VDPAU_H */ diff --git a/FFmpeg/include/libavcodec/version.h b/FFmpeg/include/libavcodec/version.h index 376388c5..43794ea5 100644 --- a/FFmpeg/include/libavcodec/version.h +++ b/FFmpeg/include/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 37 +#define LIBAVCODEC_VERSION_MINOR 3 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libavcodec/version_major.h b/FFmpeg/include/libavcodec/version_major.h index 1e23ed5e..c2f118b2 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 59 +#define LIBAVCODEC_VERSION_MAJOR 60 /** * FF_API_* defines may be placed below to indicate public API that will be @@ -37,18 +37,16 @@ * at once through the bump. This improves the git bisect-ability of the change. */ -#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 60) -#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) +#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_AYUV_CODECID (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_VT_OUTPUT_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_AVCODEC_CHROMA_POS (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61) +#define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61) + +// reminder to remove CrystalHD decoders on next major bump +#define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61) #endif /* AVCODEC_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libavcodec/videotoolbox.h b/FFmpeg/include/libavcodec/videotoolbox.h index af2db0d5..ba5eddbf 100644 --- a/FFmpeg/include/libavcodec/videotoolbox.h +++ b/FFmpeg/include/libavcodec/videotoolbox.h @@ -29,6 +29,15 @@ * Public libavcodec Videotoolbox header. */ +/** + * @defgroup lavc_codec_hwaccel_videotoolbox VideoToolbox Decoder + * @ingroup lavc_codec_hwaccel + * + * Hardware accelerated decoding using VideoToolbox on Apple Platforms + * + * @{ + */ + #include #define Picture QuickdrawPicture @@ -37,6 +46,8 @@ #include "libavcodec/avcodec.h" +#include "libavutil/attributes.h" + /** * This struct holds all the information that needs to be passed * between the caller and libavcodec for initializing Videotoolbox decoding. @@ -46,15 +57,17 @@ typedef struct AVVideotoolboxContext { /** * Videotoolbox decompression session object. - * Created and freed the caller. */ VTDecompressionSessionRef session; +#if FF_API_VT_OUTPUT_CALLBACK /** * The output callback that must be passed to the session. * Set by av_videottoolbox_default_init() */ + attribute_deprecated VTDecompressionOutputCallback output_callback; +#endif /** * CVPixelBuffer Format Type that Videotoolbox will use for decoded frames. @@ -65,17 +78,17 @@ typedef struct AVVideotoolboxContext { /** * CoreMedia Format Description that Videotoolbox will use to create the decompression session. - * Set by the caller. */ CMVideoFormatDescriptionRef cm_fmt_desc; /** * CoreMedia codec type that Videotoolbox will use to create the decompression session. - * Set by the caller. */ int cm_codec_type; } AVVideotoolboxContext; +#if FF_API_VT_HWACCEL_CONTEXT + /** * Allocate and initialize a Videotoolbox context. * @@ -88,7 +101,9 @@ typedef struct AVVideotoolboxContext { * object and free the Videotoolbox context using av_free(). * * @return the newly allocated context or NULL on failure + * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. */ +attribute_deprecated AVVideotoolboxContext *av_videotoolbox_alloc_context(void); /** @@ -98,7 +113,9 @@ AVVideotoolboxContext *av_videotoolbox_alloc_context(void); * @param avctx the corresponding codec context * * @return >= 0 on success, a negative AVERROR code on failure + * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. */ +attribute_deprecated int av_videotoolbox_default_init(AVCodecContext *avctx); /** @@ -109,7 +126,9 @@ int av_videotoolbox_default_init(AVCodecContext *avctx); * @param vtctx the Videotoolbox context to use * * @return >= 0 on success, a negative AVERROR code on failure + * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. */ +attribute_deprecated int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx); /** @@ -117,9 +136,13 @@ int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext * * av_videotoolbox_default_init(). * * @param avctx the corresponding codec context + * @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead. */ +attribute_deprecated void av_videotoolbox_default_free(AVCodecContext *avctx); +#endif /* FF_API_VT_HWACCEL_CONTEXT */ + /** * @} */ diff --git a/FFmpeg/include/libavdevice/avdevice.h b/FFmpeg/include/libavdevice/avdevice.h index 0b32e59f..887fd5e3 100644 --- a/FFmpeg/include/libavdevice/avdevice.h +++ b/FFmpeg/include/libavdevice/avdevice.h @@ -327,136 +327,6 @@ int avdevice_dev_to_app_control_message(struct AVFormatContext *s, enum AVDevToAppMessageType type, void *data, size_t data_size); -#if FF_API_DEVICE_CAPABILITIES -/** - * Following API allows user to probe device capabilities (supported codecs, - * pixel formats, sample formats, resolutions, channel counts, etc). - * It is build on top op AVOption API. - * Queried capabilities make it possible to set up converters of video or audio - * parameters that fit to the device. - * - * List of capabilities that can be queried: - * - Capabilities valid for both audio and video devices: - * - codec: supported audio/video codecs. - * type: AV_OPT_TYPE_INT (AVCodecID value) - * - Capabilities valid for audio devices: - * - sample_format: supported sample formats. - * type: AV_OPT_TYPE_INT (AVSampleFormat value) - * - sample_rate: supported sample rates. - * type: AV_OPT_TYPE_INT - * - channels: supported number of channels. - * type: AV_OPT_TYPE_INT - * - channel_layout: supported channel layouts. - * type: AV_OPT_TYPE_INT64 - * - Capabilities valid for video devices: - * - pixel_format: supported pixel formats. - * type: AV_OPT_TYPE_INT (AVPixelFormat value) - * - window_size: supported window sizes (describes size of the window size presented to the user). - * type: AV_OPT_TYPE_IMAGE_SIZE - * - frame_size: supported frame sizes (describes size of provided video frames). - * type: AV_OPT_TYPE_IMAGE_SIZE - * - fps: supported fps values - * type: AV_OPT_TYPE_RATIONAL - * - * Value of the capability may be set by user using av_opt_set() function - * and AVDeviceCapabilitiesQuery object. Following queries will - * limit results to the values matching already set capabilities. - * For example, setting a codec may impact number of formats or fps values - * returned during next query. Setting invalid value may limit results to zero. - * - * Example of the usage basing on opengl output device: - * - * @code - * AVFormatContext *oc = NULL; - * AVDeviceCapabilitiesQuery *caps = NULL; - * AVOptionRanges *ranges; - * int ret; - * - * if ((ret = avformat_alloc_output_context2(&oc, NULL, "opengl", NULL)) < 0) - * goto fail; - * if (avdevice_capabilities_create(&caps, oc, NULL) < 0) - * goto fail; - * - * //query codecs - * if (av_opt_query_ranges(&ranges, caps, "codec", AV_OPT_MULTI_COMPONENT_RANGE)) < 0) - * goto fail; - * //pick codec here and set it - * av_opt_set(caps, "codec", AV_CODEC_ID_RAWVIDEO, 0); - * - * //query format - * if (av_opt_query_ranges(&ranges, caps, "pixel_format", AV_OPT_MULTI_COMPONENT_RANGE)) < 0) - * goto fail; - * //pick format here and set it - * av_opt_set(caps, "pixel_format", AV_PIX_FMT_YUV420P, 0); - * - * //query and set more capabilities - * - * fail: - * //clean up code - * avdevice_capabilities_free(&query, oc); - * avformat_free_context(oc); - * @endcode - */ - -/** - * Structure describes device capabilities. - * - * It is used by devices in conjunction with av_device_capabilities AVOption table - * to implement capabilities probing API based on AVOption API. Should not be used directly. - */ -typedef struct AVDeviceCapabilitiesQuery { - const AVClass *av_class; - AVFormatContext *device_context; - enum AVCodecID codec; - enum AVSampleFormat sample_format; - enum AVPixelFormat pixel_format; - int sample_rate; - int channels; - int64_t channel_layout; - int window_width; - int window_height; - int frame_width; - int frame_height; - AVRational fps; -} AVDeviceCapabilitiesQuery; - -/** - * AVOption table used by devices to implement device capabilities API. Should not be used by a user. - */ -attribute_deprecated -extern const AVOption av_device_capabilities[]; - -/** - * Initialize capabilities probing API based on AVOption API. - * - * avdevice_capabilities_free() must be called when query capabilities API is - * not used anymore. - * - * @param[out] caps Device capabilities data. Pointer to a NULL pointer must be passed. - * @param s Context of the device. - * @param device_options An AVDictionary filled with device-private options. - * On return this parameter will be destroyed and replaced with a dict - * containing options that were not found. 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. - * - * @return >= 0 on success, negative otherwise. - */ -attribute_deprecated -int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s, - AVDictionary **device_options); - -/** - * Free resources created by avdevice_capabilities_create() - * - * @param caps Device capabilities data to be freed. - * @param s Context of the device. - */ -attribute_deprecated -void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s); -#endif - /** * Structure describes basic parameters of the device. */ @@ -494,7 +364,7 @@ int avdevice_list_devices(struct AVFormatContext *s, AVDeviceInfoList **device_l /** * Convenient function to free result of avdevice_list_devices(). * - * @param devices device list to be freed. + * @param device_list device list to be freed. */ void avdevice_free_list_devices(AVDeviceInfoList **device_list); diff --git a/FFmpeg/include/libavdevice/version.h b/FFmpeg/include/libavdevice/version.h index a458e0f3..ec6c3378 100644 --- a/FFmpeg/include/libavdevice/version.h +++ b/FFmpeg/include/libavdevice/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVDEVICE_VERSION_MINOR 7 +#define LIBAVDEVICE_VERSION_MINOR 1 #define LIBAVDEVICE_VERSION_MICRO 100 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libavdevice/version_major.h b/FFmpeg/include/libavdevice/version_major.h index d255ff69..b884fd42 100644 --- a/FFmpeg/include/libavdevice/version_major.h +++ b/FFmpeg/include/libavdevice/version_major.h @@ -25,13 +25,12 @@ * Libavdevice version macros */ -#define LIBAVDEVICE_VERSION_MAJOR 59 +#define LIBAVDEVICE_VERSION_MAJOR 60 /** * FF_API_* defines may be placed below to indicate public API that will be * dropped at a future version bump. The defines themselves are not part of * the public API and may change, break or disappear at any time. */ -#define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60) #endif /* AVDEVICE_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libavfilter/avfilter.h b/FFmpeg/include/libavfilter/avfilter.h index 2e8197c9..d0d45844 100644 --- a/FFmpeg/include/libavfilter/avfilter.h +++ b/FFmpeg/include/libavfilter/avfilter.h @@ -76,16 +76,6 @@ typedef struct AVFilterPad AVFilterPad; typedef struct AVFilterFormats AVFilterFormats; typedef struct AVFilterChannelLayouts AVFilterChannelLayouts; -#if FF_API_PAD_COUNT -/** - * Get the number of elements in an AVFilter's inputs or outputs array. - * - * @deprecated Use avfilter_filter_pad_count() instead. - */ -attribute_deprecated -int avfilter_pad_count(const AVFilterPad *pads); -#endif - /** * Get the name of an AVFilterPad. * @@ -276,19 +266,6 @@ typedef struct AVFilter { */ int (*init)(AVFilterContext *ctx); - /** - * Should be set instead of @ref AVFilter.init "init" by the filters that - * want to pass a dictionary of AVOptions to nested contexts that are - * allocated during init. - * - * On return, the options dict should be freed and replaced with one that - * contains all the options which could not be processed by this filter (or - * with NULL if all the options were processed). - * - * Otherwise the semantics is the same as for @ref AVFilter.init "init". - */ - int (*init_dict)(AVFilterContext *ctx, AVDictionary **options); - /** * Filter uninitialization function. * @@ -313,13 +290,20 @@ typedef struct AVFilter { * and outputs are fixed), shortly before the format negotiation. This * callback may be called more than once. * - * This callback must set AVFilterLink.outcfg.formats on every input link - * and AVFilterLink.incfg.formats on every output link to a list of - * pixel/sample formats that the filter supports on that link. For audio - * links, this filter must also set @ref AVFilterLink.incfg.samplerates - * "in_samplerates" / @ref AVFilterLink.outcfg.samplerates "out_samplerates" - * and @ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" / - * @ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously. + * This callback must set ::AVFilterLink's + * @ref AVFilterFormatsConfig.formats "outcfg.formats" + * on every input link and + * @ref AVFilterFormatsConfig.formats "incfg.formats" + * on every output link to a list of pixel/sample formats that the filter + * supports on that link. + * For audio links, this filter must also set + * @ref AVFilterFormatsConfig.samplerates "incfg.samplerates" + * / + * @ref AVFilterFormatsConfig.samplerates "outcfg.samplerates" + * and @ref AVFilterFormatsConfig.channel_layouts "incfg.channel_layouts" + * / + * @ref AVFilterFormatsConfig.channel_layouts "outcfg.channel_layouts" + * analogously. * * This callback must never be NULL if the union is in this state. * @@ -1124,6 +1108,317 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs); +/** + * Parameters of a filter's input or output pad. + * + * Created as a child of AVFilterParams by avfilter_graph_segment_parse(). + * Freed in avfilter_graph_segment_free(). + */ +typedef struct AVFilterPadParams { + /** + * An av_malloc()'ed string containing the pad label. + * + * May be av_free()'d and set to NULL by the caller, in which case this pad + * will be treated as unlabeled for linking. + * May also be replaced by another av_malloc()'ed string. + */ + char *label; +} AVFilterPadParams; + +/** + * Parameters describing a filter to be created in a filtergraph. + * + * Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse(). + * Freed in avfilter_graph_segment_free(). + */ +typedef struct AVFilterParams { + /** + * The filter context. + * + * Created by avfilter_graph_segment_create_filters() based on + * AVFilterParams.filter_name and instance_name. + * + * Callers may also create the filter context manually, then they should + * av_free() filter_name and set it to NULL. Such AVFilterParams instances + * are then skipped by avfilter_graph_segment_create_filters(). + */ + AVFilterContext *filter; + + /** + * Name of the AVFilter to be used. + * + * An av_malloc()'ed string, set by avfilter_graph_segment_parse(). Will be + * passed to avfilter_get_by_name() by + * avfilter_graph_segment_create_filters(). + * + * Callers may av_free() this string and replace it with another one or + * NULL. If the caller creates the filter instance manually, this string + * MUST be set to NULL. + * + * When both AVFilterParams.filter an AVFilterParams.filter_name are NULL, + * this AVFilterParams instance is skipped by avfilter_graph_segment_*() + * functions. + */ + char *filter_name; + /** + * Name to be used for this filter instance. + * + * An av_malloc()'ed string, may be set by avfilter_graph_segment_parse() or + * left NULL. The caller may av_free() this string and replace with another + * one or NULL. + * + * Will be used by avfilter_graph_segment_create_filters() - passed as the + * third argument to avfilter_graph_alloc_filter(), then freed and set to + * NULL. + */ + char *instance_name; + + /** + * Options to be apllied to the filter. + * + * Filled by avfilter_graph_segment_parse(). Afterwards may be freely + * modified by the caller. + * + * Will be applied to the filter by avfilter_graph_segment_apply_opts() + * with an equivalent of av_opt_set_dict2(filter, &opts, AV_OPT_SEARCH_CHILDREN), + * i.e. any unapplied options will be left in this dictionary. + */ + AVDictionary *opts; + + AVFilterPadParams **inputs; + unsigned nb_inputs; + + AVFilterPadParams **outputs; + unsigned nb_outputs; +} AVFilterParams; + +/** + * A filterchain is a list of filter specifications. + * + * Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse(). + * Freed in avfilter_graph_segment_free(). + */ +typedef struct AVFilterChain { + AVFilterParams **filters; + size_t nb_filters; +} AVFilterChain; + +/** + * A parsed representation of a filtergraph segment. + * + * A filtergraph segment is conceptually a list of filterchains, with some + * supplementary information (e.g. format conversion flags). + * + * Created by avfilter_graph_segment_parse(). Must be freed with + * avfilter_graph_segment_free(). + */ +typedef struct AVFilterGraphSegment { + /** + * The filtergraph this segment is associated with. + * Set by avfilter_graph_segment_parse(). + */ + AVFilterGraph *graph; + + /** + * A list of filter chain contained in this segment. + * Set in avfilter_graph_segment_parse(). + */ + AVFilterChain **chains; + size_t nb_chains; + + /** + * A string containing a colon-separated list of key=value options applied + * to all scale filters in this segment. + * + * May be set by avfilter_graph_segment_parse(). + * The caller may free this string with av_free() and replace it with a + * different av_malloc()'ed string. + */ + char *scale_sws_opts; +} AVFilterGraphSegment; + +/** + * Parse a textual filtergraph description into an intermediate form. + * + * This intermediate representation is intended to be modified by the caller as + * described in the documentation of AVFilterGraphSegment and its children, and + * then applied to the graph either manually or with other + * avfilter_graph_segment_*() functions. See the documentation for + * avfilter_graph_segment_apply() for the canonical way to apply + * AVFilterGraphSegment. + * + * @param graph Filter graph the parsed segment is associated with. Will only be + * used for logging and similar auxiliary purposes. The graph will + * not be actually modified by this function - the parsing results + * are instead stored in seg for further processing. + * @param graph_str a string describing the filtergraph segment + * @param flags reserved for future use, caller must set to 0 for now + * @param seg 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. + * + * @retval "non-negative number" success + * @retval "negative error code" failure + */ +int avfilter_graph_segment_parse(AVFilterGraph *graph, const char *graph_str, + int flags, AVFilterGraphSegment **seg); + +/** + * Create filters specified in a graph segment. + * + * Walk through the creation-pending AVFilterParams in the segment and create + * new filter instances for them. + * Creation-pending params are those where AVFilterParams.filter_name is + * non-NULL (and hence AVFilterParams.filter is NULL). All other AVFilterParams + * instances are ignored. + * + * For any filter created by this function, the corresponding + * AVFilterParams.filter is set to the newly-created filter context, + * AVFilterParams.filter_name and AVFilterParams.instance_name are freed and set + * to NULL. + * + * @param seg the filtergraph segment to process + * @param flags reserved for future use, caller must set to 0 for now + * + * @retval "non-negative number" Success, all creation-pending filters were + * successfully created + * @retval AVERROR_FILTER_NOT_FOUND some filter's name did not correspond to a + * known filter + * @retval "another negative error code" other failures + * + * @note Calling this function multiple times is safe, as it is idempotent. + */ +int avfilter_graph_segment_create_filters(AVFilterGraphSegment *seg, int flags); + +/** + * Apply parsed options to filter instances in a graph segment. + * + * Walk through all filter instances in the graph segment that have option + * dictionaries associated with them and apply those options with + * av_opt_set_dict2(..., AV_OPT_SEARCH_CHILDREN). AVFilterParams.opts is + * replaced by the dictionary output by av_opt_set_dict2(), which should be + * empty (NULL) if all options were successfully applied. + * + * If any options could not be found, this function will continue processing all + * other filters and finally return AVERROR_OPTION_NOT_FOUND (unless another + * error happens). The calling program may then deal with unapplied options as + * it wishes. + * + * Any creation-pending filters (see avfilter_graph_segment_create_filters()) + * present in the segment will cause this function to fail. AVFilterParams with + * no associated filter context are simply skipped. + * + * @param seg the filtergraph segment to process + * @param flags reserved for future use, caller must set to 0 for now + * + * @retval "non-negative number" Success, all options were successfully applied. + * @retval AVERROR_OPTION_NOT_FOUND some options were not found in a filter + * @retval "another negative error code" other failures + * + * @note Calling this function multiple times is safe, as it is idempotent. + */ +int avfilter_graph_segment_apply_opts(AVFilterGraphSegment *seg, int flags); + +/** + * Initialize all filter instances in a graph segment. + * + * Walk through all filter instances in the graph segment and call + * avfilter_init_dict(..., NULL) on those that have not been initialized yet. + * + * Any creation-pending filters (see avfilter_graph_segment_create_filters()) + * present in the segment will cause this function to fail. AVFilterParams with + * no associated filter context or whose filter context is already initialized, + * are simply skipped. + * + * @param seg the filtergraph segment to process + * @param flags reserved for future use, caller must set to 0 for now + * + * @retval "non-negative number" Success, all filter instances were successfully + * initialized + * @retval "negative error code" failure + * + * @note Calling this function multiple times is safe, as it is idempotent. + */ +int avfilter_graph_segment_init(AVFilterGraphSegment *seg, int flags); + +/** + * Link filters in a graph segment. + * + * Walk through all filter instances in the graph segment and try to link all + * unlinked input and output pads. Any creation-pending filters (see + * avfilter_graph_segment_create_filters()) present in the segment will cause + * this function to fail. Disabled filters and already linked pads are skipped. + * + * Every filter output pad that has a corresponding AVFilterPadParams with a + * non-NULL label is + * - linked to the input with the matching label, if one exists; + * - exported in the outputs linked list otherwise, with the label preserved. + * Unlabeled outputs are + * - linked to the first unlinked unlabeled input in the next non-disabled + * filter in the chain, if one exists + * - exported in the ouputs linked list otherwise, with NULL label + * + * Similarly, unlinked input pads are exported in the inputs linked list. + * + * @param seg the filtergraph segment to process + * @param flags reserved for future use, caller must set to 0 for now + * @param[out] inputs 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(). + * @param[out] outputs 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(). + * + * @retval "non-negative number" success + * @retval "negative error code" failure + * + * @note Calling this function multiple times is safe, as it is idempotent. + */ +int avfilter_graph_segment_link(AVFilterGraphSegment *seg, int flags, + AVFilterInOut **inputs, + AVFilterInOut **outputs); + +/** + * Apply all filter/link descriptions from a graph segment to the associated filtergraph. + * + * This functions is currently equivalent to calling the following in sequence: + * - avfilter_graph_segment_create_filters(); + * - avfilter_graph_segment_apply_opts(); + * - avfilter_graph_segment_init(); + * - avfilter_graph_segment_link(); + * failing if any of them fails. This list may be extended in the future. + * + * Since the above functions are idempotent, the caller may call some of them + * manually, then do some custom processing on the filtergraph, then call this + * function to do the rest. + * + * @param seg the filtergraph segment to process + * @param flags reserved for future use, caller must set to 0 for now + * @param[out] inputs passed to avfilter_graph_segment_link() + * @param[out] outputs passed to avfilter_graph_segment_link() + * + * @retval "non-negative number" success + * @retval "negative error code" failure + * + * @note Calling this function multiple times is safe, as it is idempotent. + */ +int avfilter_graph_segment_apply(AVFilterGraphSegment *seg, int flags, + AVFilterInOut **inputs, + AVFilterInOut **outputs); + +/** + * Free the provided AVFilterGraphSegment and everything associated with it. + * + * @param seg double pointer to the AVFilterGraphSegment to be freed. NULL will + * be written to this pointer on exit from this function. + * + * @note + * The filter contexts (AVFilterParams.filter) are owned by AVFilterGraph rather + * than AVFilterGraphSegment, so they are not freed. + */ +void avfilter_graph_segment_free(AVFilterGraphSegment **seg); + /** * Send a command to one or more filter instances. * diff --git a/FFmpeg/include/libavfilter/buffersink.h b/FFmpeg/include/libavfilter/buffersink.h index 01e7c747..64e08de5 100644 --- a/FFmpeg/include/libavfilter/buffersink.h +++ b/FFmpeg/include/libavfilter/buffersink.h @@ -94,42 +94,6 @@ int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flag */ #define AV_BUFFERSINK_FLAG_NO_REQUEST 2 -#if FF_API_BUFFERSINK_ALLOC -/** - * Deprecated and unused struct to use for initializing a buffersink context. - */ -typedef struct AVBufferSinkParams { - const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE -} AVBufferSinkParams; - -/** - * Create an AVBufferSinkParams structure. - * - * Must be freed with av_free(). - */ -attribute_deprecated -AVBufferSinkParams *av_buffersink_params_alloc(void); - -/** - * Deprecated and unused struct to use for initializing an abuffersink context. - */ -typedef struct AVABufferSinkParams { - const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE - const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1 - const int *channel_counts; ///< list of allowed channel counts, terminated by -1 - int all_channel_counts; ///< if not 0, accept any channel count or layout - int *sample_rates; ///< list of allowed sample rates, terminated by -1 -} AVABufferSinkParams; - -/** - * Create an AVABufferSinkParams structure. - * - * Must be freed with av_free(). - */ -attribute_deprecated -AVABufferSinkParams *av_abuffersink_params_alloc(void); -#endif - /** * Set the frame size for an audio buffer sink. * diff --git a/FFmpeg/include/libavfilter/version.h b/FFmpeg/include/libavfilter/version.h index ceead918..7e0eb9af 100644 --- a/FFmpeg/include/libavfilter/version.h +++ b/FFmpeg/include/libavfilter/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFILTER_VERSION_MINOR 44 +#define LIBAVFILTER_VERSION_MINOR 3 #define LIBAVFILTER_VERSION_MICRO 100 diff --git a/FFmpeg/include/libavfilter/version_major.h b/FFmpeg/include/libavfilter/version_major.h index de0cf6e9..899dfdb2 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 8 +#define LIBAVFILTER_VERSION_MAJOR 9 /** * 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_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9) -#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) -#define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9) - #endif /* AVFILTER_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libavformat/avformat.h b/FFmpeg/include/libavformat/avformat.h index f12fa7d9..1916aa2d 100644 --- a/FFmpeg/include/libavformat/avformat.h +++ b/FFmpeg/include/libavformat/avformat.h @@ -328,10 +328,8 @@ #endif struct AVFormatContext; -struct AVStream; struct AVDeviceInfoList; -struct AVDeviceCapabilitiesQuery; /** * @defgroup metadata_api Public Metadata API @@ -536,114 +534,6 @@ typedef struct AVOutputFormat { const AVClass *priv_class; ///< AVClass for the private context - - /***************************************************************** - * No fields below this line are part of the public API. They - * may not be used outside of libavformat and can be changed and - * removed at will. - * New public fields should be added right above. - ***************************************************************** - */ - /** - * size of private data so that it can be allocated in the wrapper - */ - int priv_data_size; - - /** - * Internal flags. See FF_FMT_FLAG_* in internal.h. - */ - int flags_internal; - - int (*write_header)(struct AVFormatContext *); - /** - * Write a packet. If AVFMT_ALLOW_FLUSH is set in flags, - * pkt can be NULL in order to flush data buffered in the muxer. - * When flushing, return 0 if there still is more data to flush, - * or 1 if everything was flushed and there is no more buffered - * data. - */ - int (*write_packet)(struct AVFormatContext *, AVPacket *pkt); - int (*write_trailer)(struct AVFormatContext *); - /** - * A format-specific function for interleavement. - * If unset, packets will be interleaved by dts. - * - * @param s An AVFormatContext for output. pkt will be added to - * resp. taken from its packet buffer. - * @param[in,out] pkt A packet to be interleaved if has_packet is set; - * also used to return packets. If no packet is returned - * (e.g. on error), pkt is blank on return. - * @param flush 1 if no further packets are available as input and - * all remaining packets should be output. - * @param has_packet If set, pkt contains a packet to be interleaved - * on input; otherwise pkt is blank on input. - * @return 1 if a packet was output, 0 if no packet could be output, - * < 0 if an error occurred - */ - int (*interleave_packet)(struct AVFormatContext *s, AVPacket *pkt, - int flush, int has_packet); - /** - * Test if the given codec can be stored in this container. - * - * @return 1 if the codec is supported, 0 if it is not. - * A negative number if unknown. - * MKTAG('A', 'P', 'I', 'C') if the codec is only supported as AV_DISPOSITION_ATTACHED_PIC - */ - int (*query_codec)(enum AVCodecID id, int std_compliance); - - void (*get_output_timestamp)(struct AVFormatContext *s, int stream, - int64_t *dts, int64_t *wall); - /** - * Allows sending messages from application to device. - */ - int (*control_message)(struct AVFormatContext *s, int type, - void *data, size_t data_size); - - /** - * Write an uncoded AVFrame. - * - * See av_write_uncoded_frame() for details. - * - * The library will free *frame afterwards, but the muxer can prevent it - * by setting the pointer to NULL. - */ - int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index, - AVFrame **frame, unsigned flags); - /** - * Returns device list with it properties. - * @see avdevice_list_devices() for more details. - */ - int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list); - enum AVCodecID data_codec; /**< default data codec */ - /** - * Initialize format. May allocate data here, and set any AVFormatContext or - * AVStream parameters that need to be set before packets are sent. - * This method must not write output. - * - * Return 0 if streams were fully configured, 1 if not, negative AVERROR on failure - * - * Any allocations made here must be freed in deinit(). - */ - int (*init)(struct AVFormatContext *); - /** - * Deinitialize format. If present, this is called whenever the muxer is being - * destroyed, regardless of whether or not the header has been written. - * - * If a trailer is being written, this is called after write_trailer(). - * - * This is called if init() fails as well. - */ - void (*deinit)(struct AVFormatContext *); - /** - * Set up any necessary bitstream filtering and extract any extra data needed - * for the global header. - * - * @note pkt might have been directly forwarded by a meta-muxer; therefore - * pkt->stream_index as well as the pkt's timebase might be invalid. - * Return 0 if more packets from this stream must be checked; 1 if not. - */ - int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st, - const AVPacket *pkt); } AVOutputFormat; /** * @} @@ -948,12 +838,10 @@ const char *av_disposition_to_string(int disposition); * sizeof(AVStream) must not be used outside libav*. */ typedef struct AVStream { -#if FF_API_AVSTREAM_CLASS /** * A class for @ref avoptions. Set on stream creation. */ const AVClass *av_class; -#endif int index; /**< stream index in AVFormatContext */ /** @@ -963,6 +851,17 @@ typedef struct AVStream { */ int id; + /** + * Codec parameters associated with this stream. Allocated and freed by + * libavformat in avformat_new_stream() and avformat_free_context() + * respectively. + * + * - demuxing: filled by libavformat on stream creation or in + * avformat_find_stream_info() + * - muxing: filled by the caller before avformat_write_header() + */ + AVCodecParameters *codecpar; + void *priv_data; /** @@ -1098,17 +997,6 @@ typedef struct AVStream { */ AVRational r_frame_rate; - /** - * Codec parameters associated with this stream. Allocated and freed by - * libavformat in avformat_new_stream() and avformat_free_context() - * respectively. - * - * - demuxing: filled by libavformat on stream creation or in - * avformat_find_stream_info() - * - muxing: filled by the caller before avformat_write_header() - */ - AVCodecParameters *codecpar; - /** * Number of bits in timestamps. Used for wrapping control. * @@ -1121,12 +1009,15 @@ typedef struct AVStream { struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); +#if FF_API_GET_END_PTS /** * Returns the pts of the last muxed packet + its duration * * the retuned value is undefined when used with a demuxer. */ +attribute_deprecated int64_t av_stream_get_end_pts(const AVStream *st); +#endif #define AV_PROGRAM_RUNNING 1 @@ -1349,9 +1240,6 @@ typedef struct AVFormatContext { */ #define AVFMT_FLAG_BITEXACT 0x0400 #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) -#if FF_API_LAVF_PRIV_OPT -#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, does nothing) -#endif #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. #define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer @@ -1775,10 +1663,15 @@ typedef struct AVFormatContext { int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url, int flags, AVDictionary **options); +#if FF_API_AVFORMAT_IO_CLOSE /** * A callback for closing the streams opened with AVFormatContext.io_open(). + * + * @deprecated use io_close2 */ + attribute_deprecated void (*io_close)(struct AVFormatContext *s, AVIOContext *pb); +#endif /** * ',' separated list of disallowed protocols. @@ -1895,8 +1788,8 @@ const AVOutputFormat *av_muxer_iterate(void **opaque); /** * Iterate over all registered demuxers. * - * @param opaque a pointer where libavformat will store the iteration state. Must - * point to NULL to start the iteration. + * @param opaque a pointer where libavformat will store the iteration state. + * Must point to NULL to start the iteration. * * @return the next registered demuxer or NULL when the iteration is * finished @@ -1954,12 +1847,13 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); /** * Wrap an existing array as stream side data. * - * @param st stream + * @param st stream * @param type side information type * @param data the side data array. It must be allocated with the av_malloc() * family of functions. The ownership of the data is transferred to * st. * @param size side information size + * * @return zero on success, a negative AVERROR code on failure. On failure, * the stream is unchanged and the data remains owned by the caller. */ @@ -1970,8 +1864,9 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, * Allocate new information from stream. * * @param stream stream - * @param type desired side information type - * @param size side information size + * @param type desired side information type + * @param size side information size + * * @return pointer to fresh allocated data or NULL otherwise */ uint8_t *av_stream_new_side_data(AVStream *stream, @@ -1980,9 +1875,10 @@ uint8_t *av_stream_new_side_data(AVStream *stream, * Get side information from stream. * * @param stream stream - * @param type desired side information type - * @param size If supplied, *size will be set to the size of the side data - * or to zero if the desired side data is not present. + * @param type desired side information type + * @param size If supplied, *size will be set to the size of the side data + * or to zero if the desired side data is not present. + * * @return pointer to data if present or NULL otherwise */ uint8_t *av_stream_get_side_data(const AVStream *stream, @@ -2000,16 +1896,17 @@ AVProgram *av_new_program(AVFormatContext *s, int id); * avformat_free_context() can be used to free the context and * everything allocated by the framework within it. * - * @param *ctx is set to the created format context, or to NULL in - * case of failure - * @param oformat format to use for allocating the context, if NULL - * format_name and filename are used instead - * @param format_name the name of output format to use for allocating the - * context, if NULL filename is used instead - * @param filename the name of the filename to use for allocating the - * context, may be NULL - * @return >= 0 in case of success, a negative AVERROR code in case of - * failure + * @param ctx pointee is set to the created format context, + * or to NULL in case of failure + * @param oformat format to use for allocating the context, if NULL + * format_name and filename are used instead + * @param format_name the name of output format to use for allocating the + * context, if NULL filename is used instead + * @param filename the name of the filename to use for allocating the + * context, may be NULL + * + * @return >= 0 in case of success, a negative AVERROR code in case of + * failure */ int avformat_alloc_output_context2(AVFormatContext **ctx, const AVOutputFormat *oformat, const char *format_name, const char *filename); @@ -2064,15 +1961,16 @@ const AVInputFormat *av_probe_input_format3(const AVProbeData *pd, * attempt is made. When the maximum probe size is reached, the input format * with the highest score is returned. * - * @param pb the bytestream to probe - * @param fmt the input format is put here - * @param url the url of the stream - * @param logctx the log context - * @param offset the offset within the bytestream to probe from + * @param pb the bytestream to probe + * @param fmt the input format is put here + * @param url the url of the stream + * @param logctx the log context + * @param offset the offset within the bytestream to probe from * @param max_probe_size the maximum probe buffer size (zero for default) + * * @return the score in case of success, a negative value corresponding to an * the maximal score is AVPROBE_SCORE_MAX - * AVERROR code otherwise + * AVERROR code otherwise */ int av_probe_input_buffer2(AVIOContext *pb, const AVInputFormat **fmt, const char *url, void *logctx, @@ -2089,16 +1987,19 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt, * Open an input stream and read the header. The codecs are not opened. * The stream must be closed with avformat_close_input(). * - * @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context). - * May be a pointer to NULL, in which case an AVFormatContext is allocated by this - * function and written into ps. - * Note that a user-supplied AVFormatContext will be freed on failure. - * @param url URL of the stream to open. - * @param fmt If non-NULL, this parameter forces a specific input format. - * Otherwise the format is autodetected. - * @param options 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. + * @param ps Pointer to user-supplied AVFormatContext (allocated by + * avformat_alloc_context). May be a pointer to NULL, in + * which case an AVFormatContext is allocated by this + * function and written into ps. + * Note that a user-supplied AVFormatContext will be freed + * on failure. + * @param url URL of the stream to open. + * @param fmt If non-NULL, this parameter forces a specific input format. + * Otherwise the format is autodetected. + * @param options 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. * * @return 0 on success, a negative AVERROR on failure. * @@ -2137,6 +2038,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options); * @param last the last found program, the search will start after this * program, or from the beginning if it is NULL * @param s stream index + * * @return the next program which belongs to s, NULL if no program is found or * the last program is not among the programs of ic. */ @@ -2161,10 +2063,12 @@ void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i * @param decoder_ret if non-NULL, returns the decoder for the * selected stream * @param flags flags; none are currently defined + * * @return 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 + * * @note If av_find_best_stream returns successfully and decoder_ret is not * NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec. */ @@ -2208,13 +2112,14 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt); * Seek to the keyframe at timestamp. * 'timestamp' in 'stream_index'. * - * @param s media file handle - * @param stream_index If stream_index is (-1), a default - * stream is selected, and timestamp is automatically converted - * from AV_TIME_BASE units to the stream specific time_base. - * @param timestamp Timestamp in AVStream.time_base units - * or, if no stream is specified, in AV_TIME_BASE units. - * @param flags flags which select direction and seeking mode + * @param s media file handle + * @param stream_index If stream_index is (-1), a default stream is selected, + * and timestamp is automatically converted from + * AV_TIME_BASE units to the stream specific time_base. + * @param timestamp Timestamp in AVStream.time_base units or, if no stream + * is specified, in AV_TIME_BASE units. + * @param flags flags which select direction and seeking mode + * * @return >= 0 on success */ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, @@ -2236,12 +2141,12 @@ int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, * keyframes (this may not be supported by all demuxers). * If flags contain AVSEEK_FLAG_BACKWARD, it is ignored. * - * @param s media file handle + * @param s media file handle * @param stream_index index of the stream which is used as time base reference - * @param min_ts smallest acceptable timestamp - * @param ts target timestamp - * @param max_ts largest acceptable timestamp - * @param flags flags + * @param min_ts smallest acceptable timestamp + * @param ts target timestamp + * @param max_ts largest acceptable timestamp + * @param flags flags * @return >=0 on success, error code otherwise * * @note This is part of the new seek API which is still under construction. @@ -2305,16 +2210,22 @@ void avformat_close_input(AVFormatContext **s); * Allocate the stream private data and write the stream header to * an output media file. * - * @param s 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. - * @param options 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. - * - * @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init, - * AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init, - * negative AVERROR on failure. + * @param s Media file handle, must be allocated with + * avformat_alloc_context(). + * Its \ref AVFormatContext.oformat "oformat" field must be set + * to the desired output format; + * Its \ref AVFormatContext.pb "pb" field must be set to an + * already opened ::AVIOContext. + * @param options 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. + * + * @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec had not already been + * fully initialized in avformat_init_output(). + * @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec had already been fully + * initialized in avformat_init_output(). + * @retval AVERROR A negative AVERROR on failure. * * @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_init_output. */ @@ -2323,20 +2234,26 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options); /** * 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 + * 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. - * - * @param s 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. - * @param options 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. - * - * @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize, - * AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized, - * negative AVERROR on failure. + * If using this function, do not pass the same options to avformat_write_header(). + * + * @param s Media file handle, must be allocated with + * avformat_alloc_context(). + * Its \ref AVFormatContext.oformat "oformat" field must be set + * to the desired output format; + * Its \ref AVFormatContext.pb "pb" field must be set to an + * already opened ::AVIOContext. + * @param options 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. + * + * @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec requires + * avformat_write_header to fully initialize. + * @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec has been fully + * initialized. + * @retval AVERROR Anegative AVERROR on failure. * * @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_write_header. */ @@ -2481,11 +2398,11 @@ int av_write_trailer(AVFormatContext *s); * there is no match. * * @param short_name if non-NULL checks if short_name matches with the - * names of the registered formats - * @param filename if non-NULL checks if filename terminates with the - * extensions of the registered formats - * @param mime_type if non-NULL checks if mime_type matches with the - * MIME type of the registered formats + * names of the registered formats + * @param filename if non-NULL checks if filename terminates with the + * extensions of the registered formats + * @param mime_type if non-NULL checks if mime_type matches with the + * MIME type of the registered formats */ const AVOutputFormat *av_guess_format(const char *short_name, const char *filename, @@ -2509,9 +2426,11 @@ enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name, * time_base units * @param[out] wall absolute time when that packet whas output, * in microsecond - * @return 0 if OK, AVERROR(ENOSYS) if the format does not support it - * Note: some formats or devices may not allow to measure dts and wall - * atomically. + * @retval 0 Success + * @retval AVERROR(ENOSYS) The format does not support it + * + * @note Some formats or devices may not allow to measure dts and wall + * atomically. */ int av_get_output_timestamp(struct AVFormatContext *s, int stream, int64_t *dts, int64_t *wall); @@ -2653,7 +2572,7 @@ const AVIndexEntry *avformat_index_get_entry(AVStream *st, int idx); * Get the AVIndexEntry corresponding to the given timestamp. * * @param st Stream containing the requested AVIndexEntry. - * @param timestamp Timestamp to retrieve the index entry for. + * @param wanted_timestamp Timestamp to retrieve the index entry for. * @param flags If AVSEEK_FLAG_BACKWARD then the returned entry will correspond * to the timestamp which is <= the requested one, if backward * is 0, then it will be >= diff --git a/FFmpeg/include/libavformat/avio.h b/FFmpeg/include/libavformat/avio.h index 36c3d7b4..5f13e062 100644 --- a/FFmpeg/include/libavformat/avio.h +++ b/FFmpeg/include/libavformat/avio.h @@ -101,9 +101,13 @@ typedef struct AVIODirEntry { int64_t filemode; /**< Unix file mode, -1 if unknown. */ } AVIODirEntry; +#if FF_API_AVIODIRCONTEXT typedef struct AVIODirContext { struct URLContext *url_context; } AVIODirContext; +#else +typedef struct AVIODirContext AVIODirContext; +#endif /** * Different data types that can be returned via the AVIO @@ -291,16 +295,6 @@ typedef struct AVIOContext { */ int ignore_boundary_point; -#if FF_API_AVIOCONTEXT_WRITTEN - /** - * @deprecated field utilized privately by libavformat. For a public - * statistic of how many bytes were written out, see - * AVIOContext::bytes_written. - */ - attribute_deprecated - int64_t written; -#endif - /** * Maximum reached position before a backward seek in the write buffer, * used keeping track of already written data for a later flush. @@ -464,6 +458,7 @@ int avio_put_str16be(AVIOContext *s, const char *str); * * Zero-length ranges are omitted from the output. * + * @param s the AVIOContext * @param time the stream time the current bytestream pos corresponds to * (in AV_TIME_BASE units), or AV_NOPTS_VALUE if unknown or not * applicable diff --git a/FFmpeg/include/libavformat/version.h b/FFmpeg/include/libavformat/version.h index b234218b..7ff14839 100644 --- a/FFmpeg/include/libavformat/version.h +++ b/FFmpeg/include/libavformat/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFORMAT_VERSION_MINOR 27 +#define LIBAVFORMAT_VERSION_MINOR 3 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libavformat/version_major.h b/FFmpeg/include/libavformat/version_major.h index 5f71298b..293fbd33 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 59 +#define LIBAVFORMAT_VERSION_MAJOR 60 /** * FF_API_* defines may be placed below to indicate public API that will be @@ -41,11 +41,10 @@ * at once through the bump. This improves the git bisect-ability of the change. * */ -#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) +#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 61) +#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 61) +#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 61) +#define FF_API_AVFORMAT_IO_CLOSE (LIBAVFORMAT_VERSION_MAJOR < 61) #define FF_API_R_FRAME_RATE 1 diff --git a/FFmpeg/include/libavutil/aes.h b/FFmpeg/include/libavutil/aes.h index d243286c..4e734736 100644 --- a/FFmpeg/include/libavutil/aes.h +++ b/FFmpeg/include/libavutil/aes.h @@ -42,6 +42,9 @@ struct AVAES *av_aes_alloc(void); /** * Initialize an AVAES context. + * + * @param a The AVAES context + * @param key Pointer to the key * @param key_bits 128, 192 or 256 * @param decrypt 0 for encryption, 1 for decryption */ @@ -49,9 +52,11 @@ int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); /** * Encrypt or decrypt a buffer using a previously initialized context. - * @param count number of 16 byte blocks + * + * @param a The AVAES context * @param dst destination array, can be equal to src * @param src source array, can be equal to dst + * @param count number of 16 byte blocks * @param iv initialization vector for CBC mode, if NULL then ECB will be used * @param decrypt 0 for encryption, 1 for decryption */ diff --git a/FFmpeg/include/libavutil/aes_ctr.h b/FFmpeg/include/libavutil/aes_ctr.h index 4e9fda7a..d98c0712 100644 --- a/FFmpeg/include/libavutil/aes_ctr.h +++ b/FFmpeg/include/libavutil/aes_ctr.h @@ -22,6 +22,12 @@ #ifndef AVUTIL_AES_CTR_H #define AVUTIL_AES_CTR_H +/** + * @defgroup lavu_aes_ctr AES-CTR + * @ingroup lavu_crypto + * @{ + */ + #include #include "attributes.h" @@ -38,17 +44,23 @@ struct AVAESCTR *av_aes_ctr_alloc(void); /** * Initialize an AVAESCTR context. + * + * @param a The AVAESCTR context to initialize * @param key encryption key, must have a length of AES_CTR_KEY_SIZE */ int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key); /** * Release an AVAESCTR context. + * + * @param a The AVAESCTR context */ void av_aes_ctr_free(struct AVAESCTR *a); /** * Process a buffer using a previously initialized context. + * + * @param a The AVAESCTR context * @param dst destination array, can be equal to src * @param src source array, can be equal to dst * @param size the size of src and dst diff --git a/FFmpeg/include/libavutil/ambient_viewing_environment.h b/FFmpeg/include/libavutil/ambient_viewing_environment.h new file mode 100644 index 00000000..e5e4ac21 --- /dev/null +++ b/FFmpeg/include/libavutil/ambient_viewing_environment.h @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2023 Jan Ekström + * + * 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_AMBIENT_VIEWING_ENVIRONMENT_H +#define AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H + +#include +#include "frame.h" +#include "rational.h" + +/** + * Ambient viewing environment metadata as defined by H.274. The values are + * saved in AVRationals so that they keep their exactness, while allowing for + * easy access to a double value with f.ex. av_q2d. + * + * @note sizeof(AVAmbientViewingEnvironment) is not part of the public ABI, and + * it must be allocated using av_ambient_viewing_environment_alloc. + */ +typedef struct AVAmbientViewingEnvironment { + /** + * Environmental illuminance of the ambient viewing environment in lux. + */ + AVRational ambient_illuminance; + + /** + * Normalized x chromaticity coordinate of the environmental ambient light + * in the nominal viewing environment according to the CIE 1931 definition + * of x and y as specified in ISO/CIE 11664-1. + */ + AVRational ambient_light_x; + + /** + * Normalized y chromaticity coordinate of the environmental ambient light + * in the nominal viewing environment according to the CIE 1931 definition + * of x and y as specified in ISO/CIE 11664-1. + */ + AVRational ambient_light_y; +} AVAmbientViewingEnvironment; + +/** + * Allocate an AVAmbientViewingEnvironment structure. + * + * @return the newly allocated struct or NULL on failure + */ +AVAmbientViewingEnvironment *av_ambient_viewing_environment_alloc(size_t *size); + +/** + * Allocate and add an AVAmbientViewingEnvironment structure to an existing + * AVFrame as side data. + * + * @return the newly allocated struct, or NULL on failure + */ +AVAmbientViewingEnvironment *av_ambient_viewing_environment_create_side_data(AVFrame *frame); + +#endif /* AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H */ diff --git a/FFmpeg/include/libavutil/avstring.h b/FFmpeg/include/libavutil/avstring.h index fae446c3..e2602637 100644 --- a/FFmpeg/include/libavutil/avstring.h +++ b/FFmpeg/include/libavutil/avstring.h @@ -135,6 +135,7 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_forma /** * Get the count of continuous non zero chars starting from the beginning. * + * @param s the string whose length to count * @param len maximum number of characters to check in the string, that * is the maximum value which is returned by the function */ @@ -156,15 +157,6 @@ static inline size_t av_strnlen(const char *s, size_t len) */ char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2); -#if FF_API_D2STR -/** - * Convert a number to an av_malloced string. - * @deprecated use av_asprintf() with "%f" or a more specific format - */ -attribute_deprecated -char *av_d2str(double d); -#endif - /** * Unescape the given string until a non escaped terminating char, * and return the token corresponding to the unescaped string. diff --git a/FFmpeg/include/libavutil/bprint.h b/FFmpeg/include/libavutil/bprint.h index c09b1ac1..f27d30f7 100644 --- a/FFmpeg/include/libavutil/bprint.h +++ b/FFmpeg/include/libavutil/bprint.h @@ -18,6 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/** + * @file + * @ingroup lavu_avbprint + * AVBPrint public header + */ + #ifndef AVUTIL_BPRINT_H #define AVUTIL_BPRINT_H @@ -26,6 +32,14 @@ #include "attributes.h" #include "avstring.h" +/** + * @defgroup lavu_avbprint AVBPrint + * @ingroup lavu_data + * + * A buffer to print data progressively + * @{ + */ + /** * Define a structure with extra padding to a fixed size * This helps ensuring binary compatibility with future versions. @@ -48,14 +62,14 @@ typedef struct name { \ * Small buffers are kept in the structure itself, and thus require no * memory allocation at all (unless the contents of the buffer is needed * after the structure goes out of scope). This is almost as lightweight as - * declaring a local "char buf[512]". + * declaring a local `char buf[512]`. * * The length of the string can go beyond the allocated size: the buffer is * then truncated, but the functions still keep account of the actual total * length. * - * In other words, buf->len can be greater than buf->size and records the - * total length of what would have been to the buffer if there had been + * In other words, AVBPrint.len can be greater than AVBPrint.size and records + * the total length of what would have been to the buffer if there had been * enough memory. * * Append operations do not need to be tested for failure: if a memory @@ -63,20 +77,17 @@ typedef struct name { \ * is still updated. This situation can be tested with * av_bprint_is_complete(). * - * The size_max field determines several possible behaviours: - * - * size_max = -1 (= UINT_MAX) or any large value will let the buffer be - * reallocated as necessary, with an amortized linear cost. - * - * size_max = 0 prevents writing anything to the buffer: only the total - * length is computed. The write operations can then possibly be repeated in - * a buffer with exactly the necessary size - * (using size_init = size_max = len + 1). - * - * size_max = 1 is automatically replaced by the exact size available in the - * structure itself, thus ensuring no dynamic memory allocation. The - * internal buffer is large enough to hold a reasonable paragraph of text, - * such as the current paragraph. + * The AVBPrint.size_max field determines several possible behaviours: + * - `size_max = -1` (= `UINT_MAX`) or any large value will let the buffer be + * reallocated as necessary, with an amortized linear cost. + * - `size_max = 0` prevents writing anything to the buffer: only the total + * length is computed. The write operations can then possibly be repeated in + * a buffer with exactly the necessary size + * (using `size_init = size_max = len + 1`). + * - `size_max = 1` is automatically replaced by the exact size available in the + * structure itself, thus ensuring no dynamic memory allocation. The + * internal buffer is large enough to hold a reasonable paragraph of text, + * such as the current paragraph. */ FF_PAD_STRUCTURE(AVBPrint, 1024, @@ -88,12 +99,31 @@ FF_PAD_STRUCTURE(AVBPrint, 1024, ) /** + * @name Max size special values * Convenience macros for special values for av_bprint_init() size_max * parameter. + * @{ + */ + +/** + * Buffer will be reallocated as necessary, with an amortized linear cost. */ #define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1) +/** + * Use the exact size available in the AVBPrint structure itself. + * + * Thus ensuring no dynamic memory allocation. The internal buffer is large + * enough to hold a reasonable paragraph of text, such as the current paragraph. + */ #define AV_BPRINT_SIZE_AUTOMATIC 1 +/** + * Do not write anything to the buffer, only calculate the total length. + * + * The write operations can then possibly be repeated in a buffer with + * exactly the necessary size (using `size_init = size_max = AVBPrint.len + 1`). + */ #define AV_BPRINT_SIZE_COUNT_ONLY 0 +/** @} */ /** * Init a print buffer. @@ -101,12 +131,12 @@ FF_PAD_STRUCTURE(AVBPrint, 1024, * @param buf buffer to init * @param size_init initial size (including the final 0) * @param size_max maximum size; - * 0 means do not write anything, just count the length; - * 1 is replaced by the maximum value for automatic storage; - * any large value means that the internal buffer will be - * reallocated as needed up to that limit; -1 is converted to - * UINT_MAX, the largest limit possible. - * Check also AV_BPRINT_SIZE_* macros. + * - `0` means do not write anything, just count the length + * - `1` is replaced by the maximum value for automatic storage + * any large value means that the internal buffer will be + * reallocated as needed up to that limit + * - `-1` is converted to `UINT_MAX`, the largest limit possible. + * Check also `AV_BPRINT_SIZE_*` macros. */ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max); @@ -216,4 +246,6 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str); void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, enum AVEscapeMode mode, int flags); +/** @} */ + #endif /* AVUTIL_BPRINT_H */ diff --git a/FFmpeg/include/libavutil/bswap.h b/FFmpeg/include/libavutil/bswap.h index 91cb7953..4840ab43 100644 --- a/FFmpeg/include/libavutil/bswap.h +++ b/FFmpeg/include/libavutil/bswap.h @@ -40,6 +40,8 @@ # include "arm/bswap.h" #elif ARCH_AVR32 # include "avr32/bswap.h" +#elif ARCH_RISCV +# include "riscv/bswap.h" #elif ARCH_SH4 # include "sh4/bswap.h" #elif ARCH_X86 diff --git a/FFmpeg/include/libavutil/camellia.h b/FFmpeg/include/libavutil/camellia.h index e674c9b9..96787102 100644 --- a/FFmpeg/include/libavutil/camellia.h +++ b/FFmpeg/include/libavutil/camellia.h @@ -59,7 +59,7 @@ int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits); * @param dst destination array, can be equal to src * @param src source array, can be equal to dst * @param count number of 16 byte blocks - * @paran iv initialization vector for CBC mode, NULL for ECB mode + * @param iv initialization vector for CBC mode, NULL for ECB mode * @param decrypt 0 for encryption, 1 for decryption */ void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt); diff --git a/FFmpeg/include/libavutil/channel_layout.h b/FFmpeg/include/libavutil/channel_layout.h index 4dd6614d..f345415c 100644 --- a/FFmpeg/include/libavutil/channel_layout.h +++ b/FFmpeg/include/libavutil/channel_layout.h @@ -30,11 +30,17 @@ /** * @file - * audio channel layout utility functions + * @ingroup lavu_audio_channels + * Public libavutil channel layout APIs header. */ + /** - * @addtogroup lavu_audio + * @defgroup lavu_audio_channels Audio channels + * @ingroup lavu_audio + * + * Audio channel layout utility functions + * * @{ */ @@ -84,9 +90,9 @@ enum AVChannel { * Range of channels between AV_CHAN_AMBISONIC_BASE and * AV_CHAN_AMBISONIC_END represent Ambisonic components using the ACN system. * - * Given a channel id between AV_CHAN_AMBISONIC_BASE and - * AV_CHAN_AMBISONIC_END (inclusive), the ACN index of the channel is - * = - AV_CHAN_AMBISONIC_BASE. + * Given a channel id `` between AV_CHAN_AMBISONIC_BASE and + * AV_CHAN_AMBISONIC_END (inclusive), the ACN index of the channel `` is + * ` = - AV_CHAN_AMBISONIC_BASE`. * * @note these values are only used for AV_CHANNEL_ORDER_CUSTOM channel * orderings, the AV_CHANNEL_ORDER_AMBISONIC ordering orders the channels @@ -226,7 +232,9 @@ enum AVChannelOrder { #define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT) #define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) #define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER) +#define AV_CH_LAYOUT_7POINT1_TOP_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) #define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT) +#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT) #define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT) #define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT) #define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT) @@ -266,8 +274,11 @@ typedef struct AVChannelCustom { * A channel layout here is defined as a set of channels ordered in a specific * way (unless the channel order is AV_CHANNEL_ORDER_UNSPEC, in which case an * AVChannelLayout carries only the channel count). + * All orders may be treated as if they were AV_CHANNEL_ORDER_UNSPEC by + * ignoring everything but the channel count, as long as av_channel_layout_check() + * considers they are valid. * - * Unlike most structures in Libav, sizeof(AVChannelLayout) is a part of the + * Unlike most structures in FFmpeg, sizeof(AVChannelLayout) is a part of the * public ABI and may be used by the caller. E.g. it may be allocated on stack * or embedded in caller-defined structs. * @@ -350,6 +361,10 @@ typedef struct AVChannelLayout { #define AV_CHANNEL_LAYOUT_MASK(nb, m) \ { .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = (nb), .u = { .mask = (m) }} +/** + * @name Common pre-defined channel layouts + * @{ + */ #define AV_CHANNEL_LAYOUT_MONO AV_CHANNEL_LAYOUT_MASK(1, AV_CH_LAYOUT_MONO) #define AV_CHANNEL_LAYOUT_STEREO AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO) #define AV_CHANNEL_LAYOUT_2POINT1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2POINT1) @@ -375,16 +390,24 @@ typedef struct AVChannelLayout { #define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1) #define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE) #define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK) +#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_TOP_BACK) #define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL) +#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE) #define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL) #define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX) #define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2) #define AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER \ { .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }} +/** @} */ struct AVBPrint; #if FF_API_OLD_CHANNEL_LAYOUT +/** + * @name Deprecated Functions + * @{ + */ + /** * Return a channel layout id that matches name, or 0 if no match is found. * @@ -429,6 +452,8 @@ int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, i * * @param buf put here the string containing the channel layout * @param buf_size size in bytes of the buffer + * @param nb_channels number of channels + * @param channel_layout channel layout bitset * @deprecated use av_channel_layout_describe() */ attribute_deprecated @@ -459,6 +484,7 @@ int64_t av_get_default_channel_layout(int nb_channels); /** * Get the index of a channel in channel_layout. * + * @param channel_layout channel layout bitset * @param channel a channel layout describing exactly one channel which must be * present in channel_layout. * @@ -511,6 +537,9 @@ const char *av_get_channel_description(uint64_t channel); attribute_deprecated int av_get_standard_channel_layout(unsigned index, uint64_t *layout, const char **name); +/** + * @} + */ #endif /** @@ -519,6 +548,7 @@ int av_get_standard_channel_layout(unsigned index, uint64_t *layout, * * @param buf pre-allocated buffer where to put the generated string * @param buf_size size in bytes of the buffer. + * @param channel the AVChannel whose name to get * @return 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. @@ -537,6 +567,7 @@ void av_channel_name_bprint(struct AVBPrint *bp, enum AVChannel channel_id); * * @param buf pre-allocated buffer where to put the generated string * @param buf_size size in bytes of the buffer. + * @param channel the AVChannel whose description to get * @return 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. @@ -593,7 +624,7 @@ int av_channel_layout_from_string(AVChannelLayout *channel_layout, /** * Get the default channel layout for a given number of channels. * - * @param channel_layout the layout structure to be initialized + * @param ch_layout the layout structure to be initialized * @param nb_channels number of channels */ void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels); @@ -658,6 +689,7 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout, * Get the channel with the given index in a channel layout. * * @param channel_layout input channel layout + * @param idx index of the channel * @return 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) @@ -670,6 +702,7 @@ av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsi * channels are found, only the first match will be returned. * * @param channel_layout input channel layout + * @param channel the channel whose index to obtain * @return index of channel in channel_layout on success or a negative number if * channel is not present in channel_layout. */ @@ -684,6 +717,7 @@ int av_channel_layout_index_from_channel(const AVChannelLayout *channel_layout, * @ref av_channel_from_string(). * * @param channel_layout input channel layout + * @param name string describing the channel whose index to obtain * @return a channel index described by the given string, or a negative AVERROR * value. */ @@ -697,6 +731,7 @@ int av_channel_layout_index_from_string(const AVChannelLayout *channel_layout, * @ref av_channel_from_string(). * * @param channel_layout input channel layout + * @param name string describing the channel to obtain * @return 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) @@ -742,7 +777,6 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout); int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1); /** - * @} * @} */ diff --git a/FFmpeg/include/libavutil/cpu.h b/FFmpeg/include/libavutil/cpu.h index 9711e574..8fa5ea91 100644 --- a/FFmpeg/include/libavutil/cpu.h +++ b/FFmpeg/include/libavutil/cpu.h @@ -78,6 +78,16 @@ #define AV_CPU_FLAG_LSX (1 << 0) #define AV_CPU_FLAG_LASX (1 << 1) +// RISC-V extensions +#define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank) +#define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP) +#define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP) +#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 + /** * Return the flags which specify extensions supported by the CPU. * The returned value is affected by av_force_cpu_flags() if that was used diff --git a/FFmpeg/include/libavutil/crc.h b/FFmpeg/include/libavutil/crc.h index 24a2e3ca..7f59812a 100644 --- a/FFmpeg/include/libavutil/crc.h +++ b/FFmpeg/include/libavutil/crc.h @@ -84,7 +84,10 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id); /** * Calculate the CRC of a block. + * @param ctx initialized AVCRC array (see av_crc_init()) * @param crc CRC of previous blocks if any or initial value for CRC + * @param buffer buffer whose CRC to calculate + * @param length length of the buffer * @return CRC updated with the data from the given block * * @see av_crc_init() "le" parameter diff --git a/FFmpeg/include/libavutil/csp.h b/FFmpeg/include/libavutil/csp.h index 37544449..73bce52b 100644 --- a/FFmpeg/include/libavutil/csp.h +++ b/FFmpeg/include/libavutil/csp.h @@ -1,5 +1,8 @@ /* + * Copyright (c) 2015 Kevin Wheatley * Copyright (c) 2016 Ronald S. Bultje + * Copyright (c) 2023 Leo Izen + * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or @@ -24,9 +27,15 @@ #include "rational.h" /** - * @file Colorspace value utility functions for libavutil. + * @file + * Colorspace value utility functions for libavutil. + * @ingroup lavu_math_csp * @author Ronald S. Bultje * @author Leo Izen + * @author Kevin Wheatley + */ + +/** * @defgroup lavu_math_csp Colorspace Utility * @ingroup lavu_math * @{ @@ -71,6 +80,12 @@ typedef struct AVColorPrimariesDesc { AVPrimaryCoefficients prim; } AVColorPrimariesDesc; +/** + * Function pointer representing a double -> double transfer function that performs + * an EOTF transfer inversion. This function outputs linear light. + */ +typedef double (*av_csp_trc_function)(double); + /** * Retrieves the Luma coefficients necessary to construct a conversion matrix * from an enum constant describing the colorspace. @@ -99,6 +114,35 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries */ enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm); +/** + * Determine a suitable 'gamma' value to match the supplied + * AVColorTransferCharacteristic. + * + * See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html) + * + * This function returns the gamma exponent for the OETF. For example, sRGB is approximated + * by gamma 2.2, not by gamma 0.45455. + * + * @return Will return an approximation to the simple gamma function matching + * the supplied Transfer Characteristic, Will return 0.0 for any + * we cannot reasonably match against. + */ +double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc); + +/** + * Determine the function needed to apply the given + * AVColorTransferCharacteristic to linear input. + * + * The function returned should expect a nominal domain and range of [0.0-1.0] + * values outside of this range maybe valid depending on the chosen + * characteristic function. + * + * @return Will return pointer to the function matching the + * supplied Transfer Characteristic. If unspecified will + * return NULL: + */ +av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc); + /** * @} */ diff --git a/FFmpeg/include/libavutil/des.h b/FFmpeg/include/libavutil/des.h index 4cf11f5b..3a3e6fa4 100644 --- a/FFmpeg/include/libavutil/des.h +++ b/FFmpeg/include/libavutil/des.h @@ -43,6 +43,8 @@ AVDES *av_des_alloc(void); /** * @brief Initializes an AVDES context. * + * @param d pointer to a AVDES structure to initialize + * @param key pointer to the key to use * @param key_bits must be 64 or 192 * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption * @return zero on success, negative value otherwise @@ -52,9 +54,10 @@ int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt); /** * @brief Encrypts / decrypts using the DES algorithm. * - * @param count number of 8 byte blocks + * @param d pointer to the AVDES structure * @param dst destination array, can be equal to src, must be 8-byte aligned * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL + * @param count number of 8 byte blocks * @param iv initialization vector for CBC mode, if NULL then ECB will be used, * must be 8-byte aligned * @param decrypt 0 for encryption, 1 for decryption @@ -64,9 +67,10 @@ void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, /** * @brief Calculates CBC-MAC using the DES algorithm. * - * @param count number of 8 byte blocks + * @param d pointer to the AVDES structure * @param dst destination array, can be equal to src, must be 8-byte aligned * @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL + * @param count number of 8 byte blocks */ void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count); diff --git a/FFmpeg/include/libavutil/detection_bbox.h b/FFmpeg/include/libavutil/detection_bbox.h index c20c204a..01198805 100644 --- a/FFmpeg/include/libavutil/detection_bbox.h +++ b/FFmpeg/include/libavutil/detection_bbox.h @@ -93,6 +93,7 @@ av_get_detection_bbox(const AVDetectionBBoxHeader *header, unsigned int idx) * AVDetectionBBox, and initializes the variables. * Can be freed with a normal av_free() call. * + * @param nb_bboxes number of AVDetectionBBox structures to allocate * @param out_size if non-NULL, the size in bytes of the resulting data array is * written here. */ diff --git a/FFmpeg/include/libavutil/dict.h b/FFmpeg/include/libavutil/dict.h index 0d1afc6c..713c9e36 100644 --- a/FFmpeg/include/libavutil/dict.h +++ b/FFmpeg/include/libavutil/dict.h @@ -39,13 +39,15 @@ * @brief Simple key:value store * * @{ - * Dictionaries are used for storing key:value pairs. To create - * an AVDictionary, simply pass an address of a NULL pointer to - * av_dict_set(). NULL can be used as an empty dictionary wherever - * a pointer to an AVDictionary is required. - * Use av_dict_get() to retrieve an entry or iterate over all - * entries and finally av_dict_free() to free the dictionary - * and all its contents. + * Dictionaries are used for storing key-value pairs. + * + * - To **create an AVDictionary**, simply pass an address of a NULL + * pointer to av_dict_set(). NULL can be used as an empty dictionary + * wherever a pointer to an AVDictionary is required. + * - To **insert an entry**, use av_dict_set(). + * - Use av_dict_get() to **retrieve an entry**. + * - To **iterate over all entries**, use av_dict_iterate(). + * - In order to **free the dictionary and all its contents**, use av_dict_free(). * @code AVDictionary *d = NULL; // "create" an empty dictionary @@ -57,13 +59,18 @@ char *v = av_strdup("value"); // you can avoid copying them like this av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL); - while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) { - <....> // iterate over all entries in d + while ((t = av_dict_iterate(d, t))) { + <....> // iterate over all entries in d } av_dict_free(&d); @endcode */ +/** + * @name AVDictionary Flags + * Flags that influence behavior of the matching of keys or insertion to the dictionary. + * @{ + */ #define AV_DICT_MATCH_CASE 1 /**< Only get an entry with exact-case key match. Only relevant in av_dict_get(). */ #define AV_DICT_IGNORE_SUFFIX 2 /**< Return first entry in a dictionary whose first part corresponds to the search key, ignoring the suffix of the found key string. Only relevant in av_dict_get(). */ @@ -71,10 +78,13 @@ allocated with av_malloc() or another memory allocation function. */ #define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been allocated with av_malloc() or another memory allocation function. */ -#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries. +#define AV_DICT_DONT_OVERWRITE 16 /**< Don't overwrite existing entries. */ #define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no - delimiter is added, the strings are simply concatenated. */ + delimiter is added, the strings are simply concatenated. */ #define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */ +/** + * @} + */ typedef struct AVDictionaryEntry { char *key; @@ -89,18 +99,44 @@ typedef struct AVDictionary AVDictionary; * The returned entry key or value must not be changed, or it will * cause undefined behavior. * - * To iterate through all the dictionary entries, you can set the matching key - * to the null string "" and set the AV_DICT_IGNORE_SUFFIX flag. + * @param prev Set to the previous matching element to find the next. + * If set to NULL the first matching element is returned. + * @param key Matching key + * @param flags A collection of AV_DICT_* flags controlling how the + * entry is retrieved * - * @param prev Set to the previous matching element to find the next. - * If set to NULL the first matching element is returned. - * @param key matching key - * @param flags a collection of AV_DICT_* flags controlling how the entry is retrieved - * @return found entry or NULL in case no matching entry was found in the dictionary + * @return Found entry or NULL in case no matching entry was found in the dictionary */ AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags); +/** + * Iterate over a dictionary + * + * Iterates through all entries in the dictionary. + * + * @warning The returned AVDictionaryEntry key/value must not be changed. + * + * @warning As av_dict_set() invalidates all previous entries returned + * by this function, it must not be called while iterating over the dict. + * + * Typical usage: + * @code + * const AVDictionaryEntry *e = NULL; + * while ((e = av_dict_iterate(m, e))) { + * // ... + * } + * @endcode + * + * @param m The dictionary to iterate over + * @param prev Pointer to the previous AVDictionaryEntry, NULL initially + * + * @retval AVDictionaryEntry* The next element in the dictionary + * @retval NULL No more elements in the dictionary + */ +const AVDictionaryEntry *av_dict_iterate(const AVDictionary *m, + const AVDictionaryEntry *prev); + /** * Get number of entries in dictionary. * @@ -115,23 +151,24 @@ int av_dict_count(const AVDictionary *m); * Note: If AV_DICT_DONT_STRDUP_KEY or AV_DICT_DONT_STRDUP_VAL is set, * these arguments will be freed on error. * - * Warning: Adding a new entry to a dictionary invalidates all existing entries - * previously returned with av_dict_get. + * @warning Adding a new entry to a dictionary invalidates all existing entries + * previously returned with av_dict_get() or av_dict_iterate(). * - * @param pm pointer to a pointer to a dictionary struct. If *pm is NULL - * a dictionary struct is allocated and put in *pm. - * @param key entry key to add to *pm (will either be av_strduped or added as a new key depending on flags) - * @param value 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. - * @return >= 0 on success otherwise an error code <0 + * @param pm Pointer to a pointer to a dictionary struct. If *pm is NULL + * a dictionary struct is allocated and put in *pm. + * @param key Entry key to add to *pm (will either be av_strduped or added as a new key depending on flags) + * @param value 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. + * + * @return >= 0 on success otherwise an error code <0 */ int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags); /** - * Convenience wrapper for av_dict_set that converts the value to a string + * Convenience wrapper for av_dict_set() that converts the value to a string * and stores it. * - * Note: If AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error. + * Note: If ::AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error. */ int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags); @@ -141,14 +178,15 @@ int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags * In case of failure, all the successfully set entries are stored in * *pm. You may need to manually free the created dictionary. * - * @param key_val_sep a 0-terminated list of characters used to separate + * @param key_val_sep A 0-terminated list of characters used to separate * key from value - * @param pairs_sep a 0-terminated list of characters used to separate + * @param pairs_sep A 0-terminated list of characters used to separate * two pairs from each other - * @param flags flags to use when adding to dictionary. - * AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL + * @param flags 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. + * * @return 0 on success, negative AVERROR code on failure */ int av_dict_parse_string(AVDictionary **pm, const char *str, @@ -157,11 +195,14 @@ int av_dict_parse_string(AVDictionary **pm, const char *str, /** * Copy entries from one AVDictionary struct into another. - * @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL, - * this function will allocate a struct for you and put it in *dst - * @param src pointer to source AVDictionary struct - * @param flags flags to use when setting entries in *dst - * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag + * + * @note Metadata is read using the ::AV_DICT_IGNORE_SUFFIX flag + * + * @param dst Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL, + * this function will allocate a struct for you and put it in *dst + * @param src Pointer to the source AVDictionary struct to copy items from. + * @param flags Flags to use when setting entries in *dst + * * @return 0 on success, negative AVERROR code on failure. If dst was allocated * by this function, callers should free the associated memory. */ @@ -180,13 +221,15 @@ void av_dict_free(AVDictionary **m); * Such string may be passed back to av_dict_parse_string(). * @note String is escaped with backslashes ('\'). * - * @param[in] m dictionary + * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. + * + * @param[in] m The dictionary * @param[out] buffer Pointer to buffer that will be allocated with string containg entries. * Buffer must be freed by the caller when is no longer needed. - * @param[in] key_val_sep character used to separate key from value - * @param[in] pairs_sep character used to separate two pairs from each other + * @param[in] key_val_sep Character used to separate key from value + * @param[in] pairs_sep Character used to separate two pairs from each other + * * @return >= 0 on success, negative on error - * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. */ int av_dict_get_string(const AVDictionary *m, char **buffer, const char key_val_sep, const char pairs_sep); diff --git a/FFmpeg/include/libavutil/display.h b/FFmpeg/include/libavutil/display.h index 31d8bef3..50f2b44c 100644 --- a/FFmpeg/include/libavutil/display.h +++ b/FFmpeg/include/libavutil/display.h @@ -20,6 +20,7 @@ /** * @file + * @ingroup lavu_video_display * Display matrix */ @@ -29,15 +30,9 @@ #include /** - * @addtogroup lavu_video - * @{ - * * @defgroup lavu_video_display Display transformation matrix functions - * @{ - */ - -/** - * @addtogroup lavu_video_display + * @ingroup lavu_video + * * The display transformation matrix specifies an affine transformation that * should be applied to video frames for correct presentation. It is compatible * with the matrices stored in the ISO/IEC 14496-12 container format. @@ -71,6 +66,8 @@ * q' = (b * p + d * q + y) / z; * z = u * p + v * q + w * @endcode + * + * @{ */ /** @@ -90,8 +87,8 @@ double av_display_rotation_get(const int32_t matrix[9]); * Initialize a transformation matrix describing a pure clockwise * rotation by the specified angle (in degrees). * - * @param matrix an allocated transformation matrix (will be fully overwritten - * by this function) + * @param[out] matrix a transformation matrix (will be fully overwritten + * by this function) * @param angle rotation angle in degrees. */ void av_display_rotation_set(int32_t matrix[9], double angle); @@ -99,14 +96,13 @@ void av_display_rotation_set(int32_t matrix[9], double angle); /** * Flip the input matrix horizontally and/or vertically. * - * @param matrix an allocated transformation matrix + * @param[in,out] matrix a transformation matrix * @param hflip whether the matrix should be flipped horizontally * @param vflip whether the matrix should be flipped vertically */ void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip); /** - * @} * @} */ diff --git a/FFmpeg/include/libavutil/eval.h b/FFmpeg/include/libavutil/eval.h index 57afc2d5..ee8cffb0 100644 --- a/FFmpeg/include/libavutil/eval.h +++ b/FFmpeg/include/libavutil/eval.h @@ -42,6 +42,7 @@ typedef struct AVExpr AVExpr; * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2 + * @param log_offset log level offset, can be used to silence error messages * @param log_ctx parent logging context * @return >= 0 in case of success, a negative value corresponding to an * AVERROR code otherwise @@ -65,6 +66,7 @@ int av_expr_parse_and_eval(double *res, const char *s, * @param funcs1 NULL terminated array of function pointers for functions which take 1 argument * @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers * @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments + * @param log_offset log level offset, can be used to silence error messages * @param log_ctx parent logging context * @return >= 0 in case of success, a negative value corresponding to an * AVERROR code otherwise @@ -78,6 +80,7 @@ int av_expr_parse(AVExpr **expr, const char *s, /** * Evaluate a previously parsed expression. * + * @param e the AVExpr to evaluate * @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names * @param opaque a pointer which will be passed to all functions from funcs1 and funcs2 * @return the value of the expression @@ -87,6 +90,7 @@ double av_expr_eval(AVExpr *e, const double *const_values, void *opaque); /** * Track the presence of variables and their number of occurrences in a parsed expression * + * @param e the AVExpr to track variables in * @param counter a zero-initialized array where the count of each variable will be stored * @param size size of array * @return 0 on success, a negative value indicates that no expression or array was passed @@ -98,6 +102,7 @@ int av_expr_count_vars(AVExpr *e, unsigned *counter, int size); * Track the presence of user provided functions and their number of occurrences * in a parsed expression. * + * @param e the AVExpr to track user provided functions in * @param counter a zero-initialized array where the count of each function will be stored * if you passed 5 functions with 2 arguments to av_expr_parse() * then for arg=2 this will use upto 5 entries. diff --git a/FFmpeg/include/libavutil/ffversion.h b/FFmpeg/include/libavutil/ffversion.h index d2519619..170a5595 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 "5.1.2-full_build-www.gyan.dev" +#define FFMPEG_VERSION "6.0-full_build-www.gyan.dev" #endif /* AVUTIL_FFVERSION_H */ diff --git a/FFmpeg/include/libavutil/fifo.h b/FFmpeg/include/libavutil/fifo.h index 4eed364a..70f9376d 100644 --- a/FFmpeg/include/libavutil/fifo.h +++ b/FFmpeg/include/libavutil/fifo.h @@ -18,7 +18,8 @@ /** * @file - * a very simple circular buffer FIFO implementation + * @ingroup lavu_fifo + * A generic FIFO API */ #ifndef AVUTIL_FIFO_H @@ -30,6 +31,14 @@ #include "attributes.h" #include "version.h" +/** + * @defgroup lavu_fifo AVFifo + * @ingroup lavu_data + * + * @{ + * A generic FIFO API + */ + typedef struct AVFifo AVFifo; /** @@ -88,7 +97,13 @@ void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems); size_t av_fifo_can_read(const AVFifo *f); /** - * @return number of elements that can be written into the given FIFO. + * @return Number of elements that can be written into the given FIFO without + * growing it. + * + * In other words, this number of elements or less is guaranteed to fit + * into the FIFO. More data may be written when the + * AV_FIFO_FLAG_AUTO_GROW flag was specified at FIFO creation, but this + * may involve memory allocation, which can fail. */ size_t av_fifo_can_write(const AVFifo *f); @@ -109,9 +124,12 @@ int av_fifo_grow2(AVFifo *f, size_t inc); /** * Write data into a FIFO. * - * In case nb_elems > av_fifo_can_write(f), nothing is written and an error + * In case nb_elems > av_fifo_can_write(f) and the AV_FIFO_FLAG_AUTO_GROW flag + * was not specified at FIFO creation, nothing is written and an error * is returned. * + * Calling function is guaranteed to succeed if nb_elems <= av_fifo_can_write(f). + * * @param f the FIFO buffer * @param buf Data to be written. nb_elems * av_fifo_elem_size(f) bytes will be * read from buf on success. @@ -423,4 +441,8 @@ static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) #endif #endif +/** + * @} + */ + #endif /* AVUTIL_FIFO_H */ diff --git a/FFmpeg/include/libavutil/file.h b/FFmpeg/include/libavutil/file.h index 8ec210e7..fc87a9cd 100644 --- a/FFmpeg/include/libavutil/file.h +++ b/FFmpeg/include/libavutil/file.h @@ -22,6 +22,7 @@ #include #include +#include "version.h" #include "attributes.h" /** @@ -38,6 +39,9 @@ * case *bufptr will be set to NULL and *size will be set to 0. * The returned buffer must be released with av_file_unmap(). * + * @param filename path to the file + * @param[out] bufptr pointee is set to the mapped or allocated buffer + * @param[out] size pointee is set to the size in bytes of the buffer * @param log_offset loglevel offset used for logging * @param log_ctx context used for logging * @return a non negative number in case of success, a negative value @@ -50,11 +54,13 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, /** * Unmap or free the buffer bufptr created by av_file_map(). * + * @param bufptr the buffer previously created with av_file_map() * @param size size in bytes of bufptr, must be the same as returned * by av_file_map() */ void av_file_unmap(uint8_t *bufptr, size_t size); +#if FF_API_AV_FOPEN_UTF8 /** * Wrapper to work around the lack of mkstemp() on mingw. * Also, tries to create file in /tmp first, if possible. @@ -67,6 +73,8 @@ void av_file_unmap(uint8_t *bufptr, size_t size); * libraries and could interfere with the calling application. * @deprecated as fd numbers cannot be passed saftely between libs on some platforms */ +attribute_deprecated int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx); +#endif #endif /* AVUTIL_FILE_H */ diff --git a/FFmpeg/include/libavutil/frame.h b/FFmpeg/include/libavutil/frame.h index 33fac205..25802695 100644 --- a/FFmpeg/include/libavutil/frame.h +++ b/FFmpeg/include/libavutil/frame.h @@ -209,6 +209,11 @@ enum AVFrameSideDataType { * volume transform - CUVA 005.1-2021. */ AV_FRAME_DATA_DYNAMIC_HDR_VIVID, + + /** + * Ambient viewing environment metadata, as defined by H.274. + */ + AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT, }; enum AVActiveFormatDescription { @@ -446,14 +451,18 @@ typedef struct AVFrame { */ AVRational time_base; +#if FF_API_FRAME_PICTURE_NUMBER /** * picture number in bitstream order */ + attribute_deprecated int coded_picture_number; /** * picture number in display order */ + attribute_deprecated int display_picture_number; +#endif /** * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) @@ -486,6 +495,7 @@ typedef struct AVFrame { */ int palette_has_changed; +#if FF_API_REORDERED_OPAQUE /** * reordered opaque 64 bits (generally an integer or a double precision float * PTS but can be anything). @@ -493,8 +503,12 @@ typedef struct AVFrame { * that time, * the decoder reorders values as needed and sets AVFrame.reordered_opaque * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque + * + * @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead */ + attribute_deprecated int64_t reordered_opaque; +#endif /** * Sample rate of the audio data. @@ -604,13 +618,18 @@ typedef struct AVFrame { */ int64_t pkt_pos; +#if FF_API_PKT_DURATION /** * duration of the corresponding packet, expressed in * AVStream->time_base units, 0 if unknown. * - encoding: unused * - decoding: Read by user. + * + * @deprecated use duration instead */ + attribute_deprecated int64_t pkt_duration; +#endif /** * metadata. @@ -702,18 +721,14 @@ typedef struct AVFrame { * Channel layout of the audio data. */ AVChannelLayout ch_layout; + + /** + * Duration of the frame, in the same units as pts. 0 if unknown. + */ + int64_t duration; } AVFrame; -#if FF_API_COLORSPACE_NAME -/** - * Get the name of a colorspace. - * @return a static string identifying the colorspace; can be NULL. - * @deprecated use av_color_space_name() - */ -attribute_deprecated -const char *av_get_colorspace_name(enum AVColorSpace val); -#endif /** * Allocate an AVFrame and set its fields to default values. The resulting * struct must be freed using av_frame_free(). @@ -818,7 +833,8 @@ int av_frame_is_writable(AVFrame *frame); * Ensure that the frame data is writable, avoiding data copy if possible. * * Do nothing if the frame is writable, allocate new buffers and copy the data - * if it is not. + * if it is not. Non-refcounted frames behave as non-writable, i.e. a copy + * is always made. * * @return 0 on success, a negative AVERROR on error. * @@ -853,6 +869,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src); /** * Get the buffer reference a given data plane is stored in. * + * @param frame the frame to get the plane's buffer from * @param plane index of the data plane of interest in frame->extended_data. * * @return the buffer reference that contains the plane or NULL if the input diff --git a/FFmpeg/include/libavutil/hwcontext.h b/FFmpeg/include/libavutil/hwcontext.h index c18b7e1e..7ff08c86 100644 --- a/FFmpeg/include/libavutil/hwcontext.h +++ b/FFmpeg/include/libavutil/hwcontext.h @@ -249,7 +249,7 @@ const char *av_hwdevice_get_type_name(enum AVHWDeviceType type); /** * Iterate over supported device types. * - * @param type AV_HWDEVICE_TYPE_NONE initially, then the previous type + * @param prev AV_HWDEVICE_TYPE_NONE initially, then the previous type * returned by this function in subsequent iterations. * @return The next usable device type from enum AVHWDeviceType, or * AV_HWDEVICE_TYPE_NONE if there are no more. @@ -591,6 +591,7 @@ int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags); * * @param derived_frame_ctx On success, a reference to the newly created * AVHWFramesContext. + * @param format The AVPixelFormat for the derived context. * @param derived_device_ctx A reference to the device to create the new * AVHWFramesContext on. * @param source_frame_ctx A reference to an existing AVHWFramesContext diff --git a/FFmpeg/include/libavutil/hwcontext_mediacodec.h b/FFmpeg/include/libavutil/hwcontext_mediacodec.h index 101a9806..fc0263ca 100644 --- a/FFmpeg/include/libavutil/hwcontext_mediacodec.h +++ b/FFmpeg/include/libavutil/hwcontext_mediacodec.h @@ -31,6 +31,31 @@ typedef struct AVMediaCodecDeviceContext { * This is the default surface used by decoders on this device. */ void *surface; + + /** + * Pointer to ANativeWindow. + * + * It both surface and native_window is NULL, try to create it + * automatically if create_window is true and OS support + * createPersistentInputSurface. + * + * It can be used as output surface for decoder and input surface for + * encoder. + */ + void *native_window; + + /** + * Enable createPersistentInputSurface automatically. + * + * Disabled by default. + * + * It can be enabled by setting this flag directly, or by setting + * AVDictionary of av_hwdevice_ctx_create(), with "create_window" as key. + * The second method is useful for ffmpeg cmdline, e.g., we can enable it + * via: + * -init_hw_device mediacodec=mediacodec,create_window=1 + */ + int create_window; } AVMediaCodecDeviceContext; #endif /* AVUTIL_HWCONTEXT_MEDIACODEC_H */ diff --git a/FFmpeg/include/libavutil/hwcontext_qsv.h b/FFmpeg/include/libavutil/hwcontext_qsv.h index b98d611c..e2dba8ad 100644 --- a/FFmpeg/include/libavutil/hwcontext_qsv.h +++ b/FFmpeg/include/libavutil/hwcontext_qsv.h @@ -19,7 +19,7 @@ #ifndef AVUTIL_HWCONTEXT_QSV_H #define AVUTIL_HWCONTEXT_QSV_H -#include +#include /** * @file @@ -34,6 +34,17 @@ */ typedef struct AVQSVDeviceContext { mfxSession session; + /** + * The mfxLoader handle used for mfxSession creation + * + * This field is only available for oneVPL user. For non-oneVPL user, this + * field must be set to NULL. + * + * Filled by the user before calling av_hwdevice_ctx_init() and should be + * cast to mfxLoader handle. Deallocating the AVHWDeviceContext will always + * release this interface. + */ + void *loader; } AVQSVDeviceContext; /** diff --git a/FFmpeg/include/libavutil/hwcontext_videotoolbox.h b/FFmpeg/include/libavutil/hwcontext_videotoolbox.h index b6bdcf24..25dde85d 100644 --- a/FFmpeg/include/libavutil/hwcontext_videotoolbox.h +++ b/FFmpeg/include/libavutil/hwcontext_videotoolbox.h @@ -23,6 +23,7 @@ #include +#include "frame.h" #include "pixfmt.h" /** diff --git a/FFmpeg/include/libavutil/imgutils.h b/FFmpeg/include/libavutil/imgutils.h index be533355..e10ac149 100644 --- a/FFmpeg/include/libavutil/imgutils.h +++ b/FFmpeg/include/libavutil/imgutils.h @@ -48,6 +48,7 @@ * component in the plane with the max pixel step. * @param max_pixstep_comps an array which is filled with the component * for each plane which has the max pixel step. May be NULL. + * @param pixdesc the AVPixFmtDescriptor for the image, describing its format */ void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], const AVPixFmtDescriptor *pixdesc); @@ -65,6 +66,8 @@ int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane); * width width. * * @param linesizes array to be filled with the linesize for each plane + * @param pix_fmt the AVPixelFormat of the image + * @param width width of the image in pixels * @return >= 0 in case of success, a negative error code otherwise */ int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width); @@ -73,6 +76,8 @@ int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int wi * Fill plane sizes for an image with pixel format pix_fmt and height height. * * @param size the array to be filled with the size of each image plane + * @param pix_fmt the AVPixelFormat of the image + * @param height height of the image in pixels * @param linesizes the array containing the linesize for each * plane, should be filled by av_image_fill_linesizes() * @return >= 0 in case of success, a negative error code otherwise @@ -88,6 +93,8 @@ int av_image_fill_plane_sizes(size_t size[4], enum AVPixelFormat pix_fmt, * height height. * * @param data pointers array to be filled with the pointer for each image plane + * @param pix_fmt the AVPixelFormat of the image + * @param height height of the image in pixels * @param ptr the pointer to a buffer which will contain the image * @param linesizes the array containing the linesize for each * plane, should be filled by av_image_fill_linesizes() @@ -103,6 +110,11 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei * The allocated image buffer has to be freed by using * av_freep(&pointers[0]). * + * @param pointers array to be filled with the pointer for each image plane + * @param linesizes the array filled with the linesize for each plane + * @param w width of the image in pixels + * @param h height of the image in pixels + * @param pix_fmt the AVPixelFormat of the image * @param align the value to use for buffer size alignment * @return the size in bytes required for the image buffer, a negative * error code in case of failure @@ -119,8 +131,11 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4], * bytewidth must be contained by both absolute values of dst_linesize * and src_linesize, otherwise the function behavior is undefined. * + * @param dst destination plane to copy to * @param dst_linesize linesize for the image plane in dst + * @param src source plane to copy from * @param src_linesize linesize for the image plane in src + * @param height height (number of lines) of the plane */ void av_image_copy_plane(uint8_t *dst, int dst_linesize, const uint8_t *src, int src_linesize, @@ -147,8 +162,13 @@ void av_image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize, /** * Copy image in src_data to dst_data. * + * @param dst_data destination image data buffer to copy to * @param dst_linesizes linesizes for the image in dst_data + * @param src_data source image data buffer to copy from * @param src_linesizes linesizes for the image in src_data + * @param pix_fmt the AVPixelFormat of the image + * @param width width of the image in pixels + * @param height height of the image in pixels */ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], const uint8_t *src_data[4], const int src_linesizes[4], diff --git a/FFmpeg/include/libavutil/lfg.h b/FFmpeg/include/libavutil/lfg.h index 2b669205..e75a986f 100644 --- a/FFmpeg/include/libavutil/lfg.h +++ b/FFmpeg/include/libavutil/lfg.h @@ -27,7 +27,7 @@ /** * Context structure for the Lagged Fibonacci PRNG. * The exact layout, types and content of this struct may change and should - * not be accessed directly. Only its sizeof() is guranteed to stay the same + * not be accessed directly. Only its `sizeof()` is guaranteed to stay the same * to allow easy instanciation. */ typedef struct AVLFG { @@ -40,7 +40,7 @@ void av_lfg_init(AVLFG *c, unsigned int seed); /** * Seed the state of the ALFG using binary data. * - * Return value: 0 on success, negative value (AVERROR) on failure. + * @return 0 on success, negative value (AVERROR) on failure. */ int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int length); @@ -73,6 +73,7 @@ static inline unsigned int av_mlfg_get(AVLFG *c){ * Get the next two numbers generated by a Box-Muller Gaussian * generator using the random numbers issued by lfg. * + * @param lfg pointer to the contex structure * @param out array where the two generated numbers are placed */ void av_bmg_get(AVLFG *lfg, double out[2]); diff --git a/FFmpeg/include/libavutil/mathematics.h b/FFmpeg/include/libavutil/mathematics.h index 64d4137a..e4aff1e9 100644 --- a/FFmpeg/include/libavutil/mathematics.h +++ b/FFmpeg/include/libavutil/mathematics.h @@ -111,7 +111,8 @@ enum AVRounding { /** * Compute the greatest common divisor of two integer operands. * - * @param a,b Operands + * @param a Operand + * @param b Operand * @return 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. */ @@ -186,7 +187,8 @@ int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); * av_compare_mod(0x11, 0x02, 0x20) > 0 // since 0x11 % 0x20 (0x11) > 0x02 % 0x20 (0x02) * @endcode * - * @param a,b Operands + * @param a Operand + * @param b Operand * @param mod Divisor; must be a power of 2 * @return * - a negative value if `a % mod < b % mod` diff --git a/FFmpeg/include/libavutil/mem.h b/FFmpeg/include/libavutil/mem.h index d9117419..62b4ca6e 100644 --- a/FFmpeg/include/libavutil/mem.h +++ b/FFmpeg/include/libavutil/mem.h @@ -51,86 +51,6 @@ * @{ */ -#if FF_API_DECLARE_ALIGNED -/** - * - * @defgroup lavu_mem_macros Alignment Macros - * Helper macros for declaring aligned variables. - * @{ - */ - -/** - * @def DECLARE_ALIGNED(n,t,v) - * Declare a variable that is aligned in memory. - * - * @code{.c} - * DECLARE_ALIGNED(16, uint16_t, aligned_int) = 42; - * DECLARE_ALIGNED(32, uint8_t, aligned_array)[128]; - * - * // The default-alignment equivalent would be - * uint16_t aligned_int = 42; - * uint8_t aligned_array[128]; - * @endcode - * - * @param n Minimum alignment in bytes - * @param t Type of the variable (or array element) - * @param v Name of the variable - */ - -/** - * @def DECLARE_ASM_ALIGNED(n,t,v) - * Declare an aligned variable appropriate for use in inline assembly code. - * - * @code{.c} - * DECLARE_ASM_ALIGNED(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008); - * @endcode - * - * @param n Minimum alignment in bytes - * @param t Type of the variable (or array element) - * @param v Name of the variable - */ - -/** - * @def DECLARE_ASM_CONST(n,t,v) - * Declare a static constant aligned variable appropriate for use in inline - * assembly code. - * - * @code{.c} - * DECLARE_ASM_CONST(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008); - * @endcode - * - * @param n Minimum alignment in bytes - * @param t Type of the variable (or array element) - * @param v Name of the variable - */ - -#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C) - #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v - #define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v - #define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v -#elif defined(__DJGPP__) - #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v - #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v - #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v -#elif defined(__GNUC__) || defined(__clang__) - #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v - #define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v - #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v -#elif defined(_MSC_VER) - #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v - #define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v - #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v -#else - #define DECLARE_ALIGNED(n,t,v) t v - #define DECLARE_ASM_ALIGNED(n,t,v) t v - #define DECLARE_ASM_CONST(n,t,v) static const t v -#endif - -/** - * @} - */ -#endif - /** * @defgroup lavu_mem_attrs Function Attributes * Function attributes applicable to memory handling functions. @@ -239,14 +159,6 @@ av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size); */ void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2); -#if FF_API_AV_MALLOCZ_ARRAY -/** - * @deprecated use av_calloc() - */ -attribute_deprecated -void *av_mallocz_array(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2); -#endif - /** * Allocate, reallocate, or free a block of memory. * @@ -667,7 +579,8 @@ void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size, /** * Multiply two `size_t` values checking for overflow. * - * @param[in] a,b Operands of multiplication + * @param[in] a Operand of multiplication + * @param[in] b Operand of multiplication * @param[out] r Pointer to the result of the operation * @return 0 on success, AVERROR(EINVAL) on overflow */ diff --git a/FFmpeg/include/libavutil/parseutils.h b/FFmpeg/include/libavutil/parseutils.h index e66d24b7..dad5c277 100644 --- a/FFmpeg/include/libavutil/parseutils.h +++ b/FFmpeg/include/libavutil/parseutils.h @@ -79,6 +79,8 @@ int av_parse_video_rate(AVRational *rate, const char *str); /** * Put the RGBA values that correspond to color_string in rgba_color. * + * @param rgba_color 4-elements array of uint8_t values, where the respective + * red, green, blue and alpha component values are written. * @param color_string a string specifying a color. It can be the name of * a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence, * possibly followed by "@" and a string representing the alpha @@ -92,6 +94,8 @@ int av_parse_video_rate(AVRational *rate, const char *str); * @param slen length of the initial part of color_string containing the * color. It can be set to -1 if color_string is a null terminated string * containing nothing else than the color. + * @param log_ctx a pointer to an arbitrary struct of which the first field + * is a pointer to an AVClass struct (used for av_log()). Can be NULL. * @return >= 0 in case of success, a negative value in case of * failure (for example if color_string cannot be parsed). */ @@ -106,7 +110,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, * av_parse_color(). * * @param color_idx index of the requested color, starting from 0 - * @param rgbp if not NULL, will point to a 3-elements array with the color value in RGB + * @param rgb if not NULL, will point to a 3-elements array with the color value in RGB * @return the color name string or NULL if color_idx is not in the array */ const char *av_get_known_color_name(int color_idx, const uint8_t **rgb); @@ -162,19 +166,19 @@ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info * by the standard strptime(). * * The supported input field descriptors are listed below. - * - %H: the hour as a decimal number, using a 24-hour clock, in the + * - `%%H`: the hour as a decimal number, using a 24-hour clock, in the * range '00' through '23' - * - %J: hours as a decimal number, in the range '0' through INT_MAX - * - %M: the minute as a decimal number, using a 24-hour clock, in the + * - `%%J`: hours as a decimal number, in the range '0' through INT_MAX + * - `%%M`: the minute as a decimal number, using a 24-hour clock, in the * range '00' through '59' - * - %S: the second as a decimal number, using a 24-hour clock, in the + * - `%%S`: the second as a decimal number, using a 24-hour clock, in the * range '00' through '59' - * - %Y: the year as a decimal number, using the Gregorian calendar - * - %m: the month as a decimal number, in the range '1' through '12' - * - %d: the day of the month as a decimal number, in the range '1' + * - `%%Y`: the year as a decimal number, using the Gregorian calendar + * - `%%m`: the month as a decimal number, in the range '1' through '12' + * - `%%d`: the day of the month as a decimal number, in the range '1' * through '31' - * - %T: alias for '%H:%M:%S' - * - %%: a literal '%' + * - `%%T`: alias for `%%H:%%M:%%S` + * - `%%`: a literal `%` * * @return a pointer to the first character not processed in this function * call. In case the input string contains more characters than diff --git a/FFmpeg/include/libavutil/pixdesc.h b/FFmpeg/include/libavutil/pixdesc.h index f8a195ff..0df73e6e 100644 --- a/FFmpeg/include/libavutil/pixdesc.h +++ b/FFmpeg/include/libavutil/pixdesc.h @@ -264,6 +264,28 @@ const char *av_chroma_location_name(enum AVChromaLocation location); */ int av_chroma_location_from_name(const char *name); +/** + * Converts AVChromaLocation to swscale x/y chroma position. + * + * The positions represent the chroma (0,0) position in a coordinates system + * with luma (0,0) representing the origin and luma(1,1) representing 256,256 + * + * @param xpos horizontal chroma sample position + * @param ypos vertical chroma sample position + */ +int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos); + +/** + * Converts swscale x/y chroma position to AVChromaLocation. + * + * The positions represent the chroma (0,0) position in a coordinates system + * with luma (0,0) representing the origin and luma(1,1) representing 256,256 + * + * @param xpos horizontal chroma sample position + * @param ypos vertical chroma sample position + */ +enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos); + /** * Return the pixel format corresponding to name. * @@ -357,12 +379,15 @@ void av_write_image_line(const uint16_t *src, uint8_t *data[4], */ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt); -#define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ -#define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ -#define FF_LOSS_COLORSPACE 0x0004 /**< loss due to color space conversion */ -#define FF_LOSS_ALPHA 0x0008 /**< loss of alpha bits */ -#define FF_LOSS_COLORQUANT 0x0010 /**< loss due to color quantization */ -#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */ +#define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ +#define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ +#define FF_LOSS_COLORSPACE 0x0004 /**< loss due to color space conversion */ +#define FF_LOSS_ALPHA 0x0008 /**< loss of alpha bits */ +#define FF_LOSS_COLORQUANT 0x0010 /**< loss due to color quantization */ +#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */ +#define FF_LOSS_EXCESS_RESOLUTION 0x0040 /**< loss due to unneeded extra resolution */ +#define FF_LOSS_EXCESS_DEPTH 0x0080 /**< loss due to unneeded extra color depth */ + /** * Compute what kind of losses will occur when converting from one specific diff --git a/FFmpeg/include/libavutil/pixfmt.h b/FFmpeg/include/libavutil/pixfmt.h index 2d3927cc..37c2c79e 100644 --- a/FFmpeg/include/libavutil/pixfmt.h +++ b/FFmpeg/include/libavutil/pixfmt.h @@ -206,8 +206,36 @@ enum AVPixelFormat { AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, little-endian /** - * HW acceleration through QSV, data[3] contains a pointer to the - * mfxFrameSurface1 structure. + * HW acceleration through QSV, data[3] contains a pointer to the + * mfxFrameSurface1 structure. + * + * Before FFmpeg 5.0: + * mfxFrameSurface1.Data.MemId contains a pointer when importing + * the following frames as QSV frames: + * + * VAAPI: + * mfxFrameSurface1.Data.MemId contains a pointer to VASurfaceID + * + * DXVA2: + * mfxFrameSurface1.Data.MemId contains a pointer to IDirect3DSurface9 + * + * FFmpeg 5.0 and above: + * mfxFrameSurface1.Data.MemId contains a pointer to the mfxHDLPair + * structure when importing the following frames as QSV frames: + * + * VAAPI: + * mfxHDLPair.first contains a VASurfaceID pointer. + * mfxHDLPair.second is always MFX_INFINITE. + * + * DXVA2: + * mfxHDLPair.first contains IDirect3DSurface9 pointer. + * mfxHDLPair.second is always MFX_INFINITE. + * + * D3D11: + * mfxHDLPair.first contains a ID3D11Texture2D pointer. + * mfxHDLPair.second contains the texture array index of the frame if the + * ID3D11Texture2D is an array texture, or always MFX_INFINITE if it is a + * normal texture. */ AV_PIX_FMT_QSV, /** @@ -367,6 +395,31 @@ enum AVPixelFormat { AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian + AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA... + + AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian + AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian + + AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined + + AV_PIX_FMT_P012LE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian + AV_PIX_FMT_P012BE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian + + AV_PIX_FMT_Y212BE, ///< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, big-endian + AV_PIX_FMT_Y212LE, ///< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, little-endian + + AV_PIX_FMT_XV30BE, ///< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel is left undefined + AV_PIX_FMT_XV30LE, ///< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channel is left undefined + + AV_PIX_FMT_XV36BE, ///< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian, variant of Y412 where alpha channel is left undefined + AV_PIX_FMT_XV36LE, ///< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian, variant of Y412 where alpha channel is left undefined + + AV_PIX_FMT_RGBF32BE, ///< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian + AV_PIX_FMT_RGBF32LE, ///< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian + + AV_PIX_FMT_RGBAF32BE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian + AV_PIX_FMT_RGBAF32LE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian + AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions }; @@ -453,9 +506,13 @@ enum AVPixelFormat { #define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE) #define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE) #define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE) +#define AV_PIX_FMT_P012 AV_PIX_FMT_NE(P012BE, P012LE) #define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE) #define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE) +#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE) +#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE) +#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE) #define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE) #define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE) @@ -464,6 +521,11 @@ enum AVPixelFormat { #define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE) #define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE) +#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE) + +#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE) +#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE) + /** * Chromaticity coordinates of the source primaries. * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273. diff --git a/FFmpeg/include/libavutil/rational.h b/FFmpeg/include/libavutil/rational.h index cbb08a0b..8cbfc8e0 100644 --- a/FFmpeg/include/libavutil/rational.h +++ b/FFmpeg/include/libavutil/rational.h @@ -179,7 +179,8 @@ AVRational av_d2q(double d, int max) av_const; * Find which of the two rationals is closer to another rational. * * @param q Rational to be compared against - * @param q1,q2 Rationals to be tested + * @param q1 Rational to be tested + * @param q2 Rational to be tested * @return One of the following values: * - 1 if `q1` is nearer to `q` than `q2` * - -1 if `q2` is nearer to `q` than `q1` diff --git a/FFmpeg/include/libavutil/rc4.h b/FFmpeg/include/libavutil/rc4.h index 029cd2ad..bf0ca6e9 100644 --- a/FFmpeg/include/libavutil/rc4.h +++ b/FFmpeg/include/libavutil/rc4.h @@ -42,6 +42,8 @@ AVRC4 *av_rc4_alloc(void); /** * @brief Initializes an AVRC4 context. * + * @param d pointer to the AVRC4 context + * @param key buffer containig the key * @param key_bits must be a multiple of 8 * @param decrypt 0 for encryption, 1 for decryption, currently has no effect * @return zero on success, negative value otherwise @@ -51,6 +53,7 @@ int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt); /** * @brief Encrypts / decrypts using the RC4 algorithm. * + * @param d pointer to the AVRC4 context * @param count number of bytes * @param dst destination array, can be equal to src * @param src source array, can be equal to dst, may be NULL diff --git a/FFmpeg/include/libavutil/samplefmt.h b/FFmpeg/include/libavutil/samplefmt.h index 1999c9bc..6bad0e25 100644 --- a/FFmpeg/include/libavutil/samplefmt.h +++ b/FFmpeg/include/libavutil/samplefmt.h @@ -213,6 +213,7 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, * @param[out] linesize aligned size for audio buffer(s), may be NULL * @param nb_channels number of audio channels * @param nb_samples number of samples per channel + * @param sample_fmt the sample format * @param align buffer size alignment (0 = default, 1 = no alignment) * @return >=0 on success or a negative error code on failure * @todo return the size of the allocated buffer in case of success at the next bump diff --git a/FFmpeg/include/libavutil/spherical.h b/FFmpeg/include/libavutil/spherical.h index cef759cf..828ac836 100644 --- a/FFmpeg/include/libavutil/spherical.h +++ b/FFmpeg/include/libavutil/spherical.h @@ -20,6 +20,7 @@ /** * @file + * @ingroup lavu_video_spherical * Spherical video */ @@ -30,19 +31,14 @@ #include /** - * @addtogroup lavu_video - * @{ - * * @defgroup lavu_video_spherical Spherical video mapping - * @{ - */ - -/** - * @addtogroup lavu_video_spherical + * @ingroup lavu_video + * * A spherical video file contains surfaces that need to be mapped onto a * sphere. Depending on how the frame was converted, a different distortion * transformation or surface recomposition function needs to be applied before * the video should be mapped and displayed. + * @{ */ /** @@ -225,7 +221,6 @@ const char *av_spherical_projection_name(enum AVSphericalProjection projection); */ int av_spherical_from_name(const char *name); /** - * @} * @} */ diff --git a/FFmpeg/include/libavutil/stereo3d.h b/FFmpeg/include/libavutil/stereo3d.h index d421aac2..3aab959b 100644 --- a/FFmpeg/include/libavutil/stereo3d.h +++ b/FFmpeg/include/libavutil/stereo3d.h @@ -20,6 +20,7 @@ /** * @file + * @ingroup lavu_video_stereo3d * Stereoscopic video */ @@ -31,19 +32,15 @@ #include "frame.h" /** - * @addtogroup lavu_video - * @{ - * * @defgroup lavu_video_stereo3d Stereo3D types and functions - * @{ - */ - -/** - * @addtogroup lavu_video_stereo3d + * @ingroup lavu_video + * * A stereoscopic video file consists in multiple views embedded in a single * frame, usually describing two views of a scene. This file describes all * possible codec-independent view arrangements. - * */ + * + * @{ + */ /** * List of possible 3D Types @@ -226,7 +223,6 @@ const char *av_stereo3d_type_name(unsigned int type); int av_stereo3d_from_name(const char *name); /** - * @} * @} */ diff --git a/FFmpeg/include/libavutil/twofish.h b/FFmpeg/include/libavutil/twofish.h index 813cfecd..67f359e8 100644 --- a/FFmpeg/include/libavutil/twofish.h +++ b/FFmpeg/include/libavutil/twofish.h @@ -59,7 +59,7 @@ int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits); * @param dst destination array, can be equal to src * @param src source array, can be equal to dst * @param count number of 16 byte blocks - * @paran iv initialization vector for CBC mode, NULL for ECB mode + * @param iv initialization vector for CBC mode, NULL for ECB mode * @param decrypt 0 for encryption, 1 for decryption */ void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt); diff --git a/FFmpeg/include/libavutil/tx.h b/FFmpeg/include/libavutil/tx.h index 3de2f723..064edbc0 100644 --- a/FFmpeg/include/libavutil/tx.h +++ b/FFmpeg/include/libavutil/tx.h @@ -75,7 +75,9 @@ enum AVTXType { * the double variant, it's a 'double'. If scale is NULL, 1.0 will be used * as a default. * - * The stride parameter must be set to the size of a single sample in bytes. + * For forward transforms (R2C), stride must be the spacing between two + * samples in bytes. For inverse transforms, the stride must be set + * to the spacing between two complex values in bytes. * * The forward transform performs a real-to-complex DFT of N samples to * N/2+1 complex values. @@ -89,6 +91,20 @@ enum AVTXType { AV_TX_DOUBLE_RDFT = 7, AV_TX_INT32_RDFT = 8, + /** + * Real to real (DCT) transforms. + * + * The forward transform is a DCT-II. + * The inverse transform is a DCT-III. + * + * The input array is always overwritten. DCT-III requires that the + * input be padded with 2 extra samples. Stride must be set to the + * spacing between two samples in bytes. + */ + AV_TX_FLOAT_DCT = 9, + AV_TX_DOUBLE_DCT = 10, + AV_TX_INT32_DCT = 11, + /* Not part of the API, do not use */ AV_TX_NB, }; @@ -115,9 +131,8 @@ typedef void (*av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride); */ enum AVTXFlags { /** - * Performs an in-place transformation on the input. The output argument - * of av_tn_fn() MUST match the input. May be unsupported or slower for some - * transform types. + * Allows for in-place transformations, where input == output. + * May be unsupported or slower for some transform types. */ AV_TX_INPLACE = 1ULL << 0, diff --git a/FFmpeg/include/libavutil/uuid.h b/FFmpeg/include/libavutil/uuid.h index 4b508891..748b7ed3 100644 --- a/FFmpeg/include/libavutil/uuid.h +++ b/FFmpeg/include/libavutil/uuid.h @@ -106,7 +106,6 @@ int av_uuid_parse_range(const char *in_start, const char *in_end, AVUUID uu); * * @param[in] uu AVUUID * @param[out] out Pointer to an array of no less than 37 characters. - * @return A non-zero value in case of an error. */ void av_uuid_unparse(const AVUUID uu, char *out); diff --git a/FFmpeg/include/libavutil/version.h b/FFmpeg/include/libavutil/version.h index 87178e9e..e8ec6043 100644 --- a/FFmpeg/include/libavutil/version.h +++ b/FFmpeg/include/libavutil/version.h @@ -78,8 +78,8 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 28 +#define LIBAVUTIL_VERSION_MAJOR 58 +#define LIBAVUTIL_VERSION_MINOR 2 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -105,15 +105,14 @@ * @{ */ -#define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 58) -#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 58) +#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_REORDERED_OPAQUE (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59) /** * @} diff --git a/FFmpeg/include/libpostproc/version.h b/FFmpeg/include/libpostproc/version.h index 397f3f74..8294f007 100644 --- a/FFmpeg/include/libpostproc/version.h +++ b/FFmpeg/include/libpostproc/version.h @@ -30,7 +30,7 @@ #include "version_major.h" -#define LIBPOSTPROC_VERSION_MINOR 6 +#define LIBPOSTPROC_VERSION_MINOR 1 #define LIBPOSTPROC_VERSION_MICRO 100 #define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libpostproc/version_major.h b/FFmpeg/include/libpostproc/version_major.h index 7afc4dbb..771e17a9 100644 --- a/FFmpeg/include/libpostproc/version_major.h +++ b/FFmpeg/include/libpostproc/version_major.h @@ -26,6 +26,6 @@ * Libpostproc version macros */ -#define LIBPOSTPROC_VERSION_MAJOR 56 +#define LIBPOSTPROC_VERSION_MAJOR 57 #endif /* POSTPROC_VERSION_MAJOR_H */ diff --git a/FFmpeg/include/libswresample/swresample.h b/FFmpeg/include/libswresample/swresample.h index 26d42fab..d4dcaebd 100644 --- a/FFmpeg/include/libswresample/swresample.h +++ b/FFmpeg/include/libswresample/swresample.h @@ -73,7 +73,7 @@ * * Once all values have been set, it must be initialized with swr_init(). If * you need to change the conversion parameters, you can change the parameters - * using @ref AVOptions, as described above in the first example; or by using + * using @ref avoptions, as described above in the first example; or by using * swr_alloc_set_opts2(), but with the first argument the allocated context. * You must then call swr_init() again. * @@ -286,8 +286,8 @@ struct SwrContext *swr_alloc_set_opts(struct SwrContext *s, * On error, the Swr context is freed and *ps set to NULL. */ int swr_alloc_set_opts2(struct SwrContext **ps, - AVChannelLayout *out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, - AVChannelLayout *in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, + const AVChannelLayout *out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate, + const AVChannelLayout *in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx); /** * @} @@ -354,8 +354,8 @@ int swr_convert(struct SwrContext *s, uint8_t **out, int out_count, * in this case the output timestamps will match output sample numbers. * See ffmpeg-resampler(1) for the two modes of compensation. * - * @param s[in] initialized Swr context - * @param pts[in] timestamp for the next input sample, INT64_MIN if unknown + * @param[in] s initialized Swr context + * @param[in] pts timestamp for the next input sample, INT64_MIN if unknown * @see swr_set_compensation(), swr_drop_output(), and swr_inject_silence() are * function used internally for timestamp compensation. * @return the output timestamp for the next output sample @@ -636,8 +636,8 @@ int swr_convert_frame(SwrContext *swr, * @see swr_close(); * * @param swr audio resample context - * @param output output AVFrame - * @param input input AVFrame + * @param out output AVFrame + * @param in input AVFrame * @return 0 on success, AVERROR on failure. */ int swr_config_frame(SwrContext *swr, const AVFrame *out, const AVFrame *in); diff --git a/FFmpeg/include/libswresample/version.h b/FFmpeg/include/libswresample/version.h index 7e5c58ec..31ecf6ff 100644 --- a/FFmpeg/include/libswresample/version.h +++ b/FFmpeg/include/libswresample/version.h @@ -30,7 +30,7 @@ #include "version_major.h" -#define LIBSWRESAMPLE_VERSION_MINOR 7 +#define LIBSWRESAMPLE_VERSION_MINOR 10 #define LIBSWRESAMPLE_VERSION_MICRO 100 #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libswscale/swscale.h b/FFmpeg/include/libswscale/swscale.h index 3ebf7c69..9d4612aa 100644 --- a/FFmpeg/include/libswscale/swscale.h +++ b/FFmpeg/include/libswscale/swscale.h @@ -234,6 +234,7 @@ int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[], * - sws_receive_slice(0, dst->height) * - sws_frame_end() * + * @param c The scaling context * @param dst The destination frame. See documentation for sws_frame_start() for * more details. * @param src The source frame. @@ -249,6 +250,7 @@ int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src); * This function will retain references to src and dst, so they must both use * refcounted buffers (if allocated by the caller, in case of dst). * + * @param c The scaling context * @param dst The destination frame. * * The data buffers may either be already allocated by the caller or @@ -273,6 +275,8 @@ int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src); * 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. + * + * @param c The scaling context */ void sws_frame_end(struct SwsContext *c); @@ -282,6 +286,7 @@ void sws_frame_end(struct SwsContext *c); * any order, but may not overlap. For vertically subsampled pixel formats, the * slices must be aligned according to subsampling. * + * @param c The scaling context * @param slice_start first row of the slice * @param slice_height number of rows in the slice * @@ -294,6 +299,7 @@ int sws_send_slice(struct SwsContext *c, unsigned int slice_start, * Request a horizontal slice of the output data to be written into the frame * previously provided to sws_frame_start(). * + * @param c The scaling context * @param slice_start first row of the slice; must be a multiple of * sws_receive_slice_alignment() * @param slice_height number of rows in the slice; must be a multiple of @@ -310,6 +316,9 @@ int sws_receive_slice(struct SwsContext *c, unsigned int slice_start, unsigned int slice_height); /** + * Get the alignment required for slices + * + * @param c The scaling context * @return alignment required for output slices requested with sws_receive_slice(). * Slice offsets and sizes passed to sws_receive_slice() must be * multiples of the value returned from this function. @@ -317,6 +326,7 @@ int sws_receive_slice(struct SwsContext *c, unsigned int slice_start, unsigned int sws_receive_slice_alignment(const struct SwsContext *c); /** + * @param c the scaling context * @param dstRange flag indicating the while-black range of the output (1=jpeg / 0=mpeg) * @param srcRange flag indicating the while-black range of the input (1=jpeg / 0=mpeg) * @param table the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x] @@ -324,22 +334,17 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c); * @param brightness 16.16 fixed point brightness correction * @param contrast 16.16 fixed point contrast correction * @param saturation 16.16 fixed point saturation correction -#if LIBSWSCALE_VERSION_MAJOR > 6 - * @return negative error code on error, non negative otherwise -#else - * @return -1 if not supported -#endif + * + * @return A negative error code on error, non negative otherwise. + * If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. */ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation); /** -#if LIBSWSCALE_VERSION_MAJOR > 6 - * @return negative error code on error, non negative otherwise -#else - * @return -1 if not supported -#endif + * @return A negative error code on error, non negative otherwise. + * If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported. */ int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, diff --git a/FFmpeg/include/libswscale/version.h b/FFmpeg/include/libswscale/version.h index 4c6af261..4e54701a 100644 --- a/FFmpeg/include/libswscale/version.h +++ b/FFmpeg/include/libswscale/version.h @@ -28,7 +28,7 @@ #include "version_major.h" -#define LIBSWSCALE_VERSION_MINOR 7 +#define LIBSWSCALE_VERSION_MINOR 1 #define LIBSWSCALE_VERSION_MICRO 100 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ diff --git a/FFmpeg/include/libswscale/version_major.h b/FFmpeg/include/libswscale/version_major.h index 2f841878..88577a2b 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 6 +#define LIBSWSCALE_VERSION_MAJOR 7 /** * FF_API_* defines may be placed below to indicate public API that will be diff --git a/README.md b/README.md index 75555e9a..4c107456 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ -# Important Please do support Ukraine! - -[GitHub response to the war in Ukraine](https://github.blog/2022-03-02-our-response-to-the-war-in-ukraine/)
-GitHub as a company is also donating $100,000 to [Razom](https://razomforukraine.org/) and matching an additional $200,000 of donations from employees to help support relief efforts in the region. - +# Important **The FFmpeg API is vast and complex and this project exposes it with minimum modifications - support is very limited. Please consider to ask *how to* questions on [stackoverflow.com](https://stackoverflow.com/search?tab=newest&q=ffmpeg%20autogen) or in special repository on [github.com](https://github.com/Ruslan-B/FFmpeg.AutoGen.Questions/issues). The community may be able to offer some assistance but you will largely be on your own. As another option you can search for a solution in C(lang) as with some effort you can convert it to C#.** +Here repository with C# converted examples: https://github.com/stjeong/ffmpeg_autogen_cs ## FFmpeg.AutoGen [![main](https://github.com/Ruslan-B/FFmpeg.AutoGen/actions/workflows/main.yml/badge.svg)](https://github.com/Ruslan-B/FFmpeg.AutoGen/actions/workflows/main.yml)