Go to the documentation of this file.
48 #define OFFSET(x) offsetof(AFormatContext, x)
49 #define A AV_OPT_FLAG_AUDIO_PARAM
50 #define F AV_OPT_FLAG_FILTERING_PARAM
56 {
"channel_layouts",
"A '|'-separated list of channel layouts.",
OFFSET(channel_layouts_str),
AV_OPT_TYPE_STRING, .flags =
A|
F },
63 #define PARSE_FORMATS(str, type, list, add_to_list, get_fmt, none, desc) \
65 char *next, *cur = str; \
70 next = strchr(cur, '|'); \
74 if ((fmt = get_fmt(cur)) == none) { \
75 av_log(ctx, AV_LOG_ERROR, "Error parsing " desc ": %s.\n", cur);\
76 return AVERROR(EINVAL); \
78 if ((ret = add_to_list(&list, fmt)) < 0) { \
88 int ret = strtol(samplerate,
NULL, 0);
95 char *next, *cur =
s->channel_layouts_str;
100 next = strchr(cur,
'|');
106 #if FF_API_OLD_CHANNEL_LAYOUT
114 #if FF_API_OLD_CHANNEL_LAYOUT
170 s->sample_rates =
NULL;
175 s->channel_layouts =
NULL;
181 .description =
NULL_IF_CONFIG_SMALL(
"Convert the input audio to one of the specified formats."),
185 .priv_class = &aformat_class,
#define FF_ENABLE_DEPRECATION_WARNINGS
A list of supported channel layouts.
#define AV_LOG_WARNING
Something somehow does not look correct.
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
#define FILTER_QUERY_FUNC(func)
AVFilterChannelLayouts * channel_layouts
const char * name
Filter name.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
FF_ENABLE_DEPRECATION_WARNINGS int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
Initialize a native channel layout from a bitmask indicating which channels are present.
#define FILTER_INPUTS(array)
char * channel_layouts_str
Describe the class of an AVClass context structure.
AVFilterFormats * sample_rates
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
uint64_t av_get_channel_layout(const char *name)
Return a channel layout id that matches name, or 0 if no match is found.
#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.
int av_channel_layout_from_string(AVChannelLayout *channel_layout, const char *str)
Initialize a channel layout from a given string description.
enum AVSampleFormat av_get_sample_fmt(const char *name)
Return a sample format corresponding to name, or AV_SAMPLE_FMT_NONE on error.
AVSampleFormat
Audio sample formats.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
#define FF_DISABLE_DEPRECATION_WARNINGS
#define FILTER_OUTPUTS(array)
#define flags(name, subs,...)
AVFilterFormats * formats