Update FFmpeg to version 4.4.

This commit is contained in:
Damiano Galassi committed 2021-05-22 10:40:18 +02:00
1 parent 89bc8be435
commit 69363df76e
44 files changed
+959 -528

No files matched your search

+44 -34
View File
@@ -68,6 +68,7 @@ typedef struct AVFilterContext AVFilterContext;
typedef struct AVFilterLink AVFilterLink;
typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
typedef struct AVFilterChannelLayouts AVFilterChannelLayouts;
/**
* Get the number of elements in a NULL-terminated array of AVFilterPads (e.g.
@@ -264,13 +265,13 @@ 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.out_formats on every input link and
* AVFilterLink.in_formats on every output link to a list of pixel/sample
* 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.in_samplerates "in_samplerates" /
* @ref AVFilterLink.out_samplerates "out_samplerates" and
* @ref AVFilterLink.in_channel_layouts "in_channel_layouts" /
* @ref AVFilterLink.out_channel_layouts "out_channel_layouts" analogously.
* filter must also set @ref AVFilterLink.incfg.samplerates "in_samplerates" /
* @ref AVFilterLink.outcfg.samplerates "out_samplerates" and
* @ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" /
* @ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously.
*
* This callback may be NULL for filters with one input, in which case
* libavfilter assumes that it supports all input formats and preserves
@@ -285,11 +286,13 @@ typedef struct AVFilter {
int flags_internal; ///< Additional flags for avfilter internal use only.
#if FF_API_NEXT
/**
* Used by the filter registration system. Must not be touched by any other
* code.
*/
struct AVFilter *next;
#endif
/**
* Make the filter instance process a command.
@@ -424,6 +427,35 @@ struct AVFilterContext {
int extra_hw_frames;
};
/**
* Lists of formats / etc. supported by an end of a link.
*
* This structure is directly part of AVFilterLink, in two copies:
* one for the source filter, one for the destination filter.
* These lists are used for negotiating the format to actually be used,
* which will be loaded into the format and channel_layout members of
* AVFilterLink, when chosen.
*/
typedef struct AVFilterFormatsConfig {
/**
* List of supported formats (pixel or sample).
*/
AVFilterFormats *formats;
/**
* Lists of supported sample rates, only for audio.
*/
AVFilterFormats *samplerates;
/**
* Lists of supported channel layouts, only for audio.
*/
AVFilterChannelLayouts *channel_layouts;
} AVFilterFormatsConfig;
/**
* A link between two filters. This contains pointers to the source and
* destination filters between which this link exists, and the indexes of
@@ -471,33 +503,16 @@ struct AVFilterLink {
* New public fields should be added right above.
*****************************************************************
*/
/**
* Lists of formats and channel layouts supported by the input and output
* filters respectively. These lists are used for negotiating the format
* to actually be used, which will be loaded into the format and
* channel_layout members, above, when chosen.
*
*/
AVFilterFormats *in_formats;
AVFilterFormats *out_formats;
/**
* Lists of channel layouts and sample rates used for automatic
* negotiation.
* Lists of supported formats / etc. supported by the input filter.
*/
AVFilterFormats *in_samplerates;
AVFilterFormats *out_samplerates;
struct AVFilterChannelLayouts *in_channel_layouts;
struct AVFilterChannelLayouts *out_channel_layouts;
AVFilterFormatsConfig incfg;
/**
* Audio only, the destination filter sets this to a non-zero value to
* request that buffers with the given number of samples should be sent to
* it. AVFilterPad.needs_fifo must also be set on the corresponding input
* pad.
* Last buffer before EOF will be padded with silence.
* Lists of supported formats / etc. supported by the output filter.
*/
int request_samples;
AVFilterFormatsConfig outcfg;
/** stage of the initialization of the link properties (dimensions, etc) */
enum {
@@ -572,11 +587,6 @@ struct AVFilterLink {
*/
int channels;
/**
* Link processing flags.
*/
unsigned flags;
/**
* Number of past frames sent through the link.
*/
@@ -671,7 +681,7 @@ void avfilter_link_free(AVFilterLink **link);
attribute_deprecated
int avfilter_link_get_channels(AVFilterLink *link);
#endif
#if FF_API_FILTER_LINK_SET_CLOSED
/**
* Set the closed field of a link.
* @deprecated applications are not supposed to mess with links, they should
@@ -679,7 +689,7 @@ int avfilter_link_get_channels(AVFilterLink *link);
*/
attribute_deprecated
void avfilter_link_set_closed(AVFilterLink *link, int closed);
#endif
/**
* Negotiate the media format, dimensions, etc of all inputs to a filter.
*
+39 -3
View File
@@ -31,6 +31,42 @@
* @defgroup lavfi_buffersink Buffer sink API
* @ingroup lavfi
* @{
*
* The buffersink and abuffersink filters are there to connect filter graphs
* to applications. They have a single input, connected to the graph, and no
* output. Frames must be extracted using av_buffersink_get_frame() or
* av_buffersink_get_samples().
*
* The format negotiated by the graph during configuration can be obtained
* using the accessor functions:
* - av_buffersink_get_time_base(),
* - av_buffersink_get_format(),
* - av_buffersink_get_frame_rate(),
* - av_buffersink_get_w(),
* - av_buffersink_get_h(),
* - av_buffersink_get_sample_aspect_ratio(),
* - av_buffersink_get_channels(),
* - av_buffersink_get_channel_layout(),
* - av_buffersink_get_sample_rate().
*
* The format can be constrained by setting options, using av_opt_set() and
* related functions with the AV_OPT_SEARCH_CHILDREN flag.
* - pix_fmts (int list),
* - sample_fmts (int list),
* - sample_rates (int list),
* - channel_layouts (int64_t),
* - channel_counts (int list),
* - all_channel_counts (bool).
* Most of these options are of type binary, and should be set using
* av_opt_set_int_list() or av_opt_set_bin(). If they are not set, all
* corresponding formats are accepted.
*
* As a special case, if neither channel_layouts nor channel_counts is set,
* all valid channel layouts are accepted, but channel counts without a
* layout are not, unless all_channel_counts is set.
* Also, channel_layouts must not contain a channel layout already accepted
* by a value in channel_counts; for example, if channel_counts contains 2,
* then channel_layouts must not contain stereo.
*/
/**
@@ -59,9 +95,9 @@ int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flag
*/
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
#if FF_API_NEXT
#if FF_API_BUFFERSINK_ALLOC
/**
* Struct to use for initializing a buffersink context.
* 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
@@ -76,7 +112,7 @@ attribute_deprecated
AVBufferSinkParams *av_buffersink_params_alloc(void);
/**
* Struct to use for initializing an abuffersink context.
* 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
+7 -1
View File
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 7
#define LIBAVFILTER_VERSION_MINOR 86
#define LIBAVFILTER_VERSION_MINOR 110
#define LIBAVFILTER_VERSION_MICRO 100
@@ -65,5 +65,11 @@
#ifndef FF_API_NEXT
#define FF_API_NEXT (LIBAVFILTER_VERSION_MAJOR < 8)
#endif
#ifndef FF_API_FILTER_LINK_SET_CLOSED
#define FF_API_FILTER_LINK_SET_CLOSED (LIBAVFILTER_VERSION_MAJOR < 8)
#endif
#ifndef FF_API_BUFFERSINK_ALLOC
#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9)
#endif
#endif /* AVFILTER_VERSION_H */