Go to the documentation of this file.
52 #define OFFSET(x) offsetof(AFormatContext, x)
53 #define A AV_OPT_FLAG_AUDIO_PARAM
54 #define F AV_OPT_FLAG_FILTERING_PARAM
56 {
"sample_fmts",
"A '|'-separated list of sample formats.",
OFFSET(
formats),
58 {
"f",
"A '|'-separated list of sample formats.",
OFFSET(
formats),
87 if (
s->nb_sample_rates) {
89 sizeof(*
s->sample_rates));
92 s->sample_rates =
tmp;
93 s->sample_rates[
s->nb_sample_rates] = -1;
95 if (
s->nb_channel_layouts) {
97 sizeof(*
s->channel_layouts));
100 s->channel_layouts =
tmp;
101 s->channel_layouts[
s->nb_channel_layouts] = (
AVChannelLayout){ .nb_channels = 0 };
120 if (
s->nb_sample_rates) {
126 if (
s->nb_channel_layouts) {
137 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input audio to one of the specified formats."),
140 .priv_class = &aformat_class,
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
@ AV_OPT_TYPE_SAMPLE_FMT
Underlying C type is enum AVSampleFormat.
char sep
Separator between array elements in string representations of this option, used by av_opt_set() and a...
May be set as default_val for AV_OPT_TYPE_FLAG_ARRAY options.
#define FILTER_INPUTS(array)
static const int sample_rates[]
const char * name
Filter name.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
#define FILTER_OUTPUTS(array)
Describe the class of an AVClass context structure.
enum AVSampleFormat * formats
AVChannelLayout * channel_layouts
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
An AVChannelLayout holds information about the channel layout of audio data.
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
AVSampleFormat
Audio sample formats.
#define FILTER_QUERY_FUNC2(func)
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
unsigned nb_channel_layouts
static const uint16_t channel_layouts[7]
#define flags(name, subs,...)