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 .p.description =
NULL_IF_CONFIG_SMALL(
"Convert the input audio to one of the specified formats."),
138 .p.priv_class = &aformat_class,
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static AVFormatContext * ctx
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Main libavfilter public API header.
Public libavutil channel layout APIs header.
common internal and external API header
static const uint16_t channel_layouts[7]
static const int sample_rates[]
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
@ AV_OPT_TYPE_SAMPLE_FMT
Underlying C type is enum AVSampleFormat.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
AVSampleFormat
Audio sample formats.
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define AVFILTER_DEFINE_CLASS(fname)
#define FILTER_QUERY_FUNC2(func)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Memory handling functions.
AVChannelLayout * channel_layouts
enum AVSampleFormat * formats
unsigned nb_channel_layouts
An AVChannelLayout holds information about the channel layout of audio data.
Describe the class of an AVClass context structure.
May be set as default_val for AV_OPT_TYPE_FLAG_ARRAY options.