|
|
@ -95,9 +95,11 @@ static const AVOption aap_options[] = { |
|
|
|
|
|
|
|
|
|
|
|
AVFILTER_DEFINE_CLASS(aap); |
|
|
|
AVFILTER_DEFINE_CLASS(aap); |
|
|
|
|
|
|
|
|
|
|
|
static int query_formats(AVFilterContext *ctx) |
|
|
|
static int query_formats(const AVFilterContext *ctx, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_in, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_out) |
|
|
|
{ |
|
|
|
{ |
|
|
|
AudioAPContext *s = ctx->priv; |
|
|
|
const AudioAPContext *s = ctx->priv; |
|
|
|
static const enum AVSampleFormat sample_fmts[3][3] = { |
|
|
|
static const enum AVSampleFormat sample_fmts[3][3] = { |
|
|
|
{ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_NONE }, |
|
|
|
{ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_NONE }, |
|
|
|
{ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, |
|
|
|
{ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, |
|
|
@ -105,13 +107,11 @@ static int query_formats(AVFilterContext *ctx) |
|
|
|
}; |
|
|
|
}; |
|
|
|
int ret; |
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
|
|
if ((ret = ff_set_common_all_channel_counts(ctx)) < 0) |
|
|
|
if ((ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, |
|
|
|
return ret; |
|
|
|
sample_fmts[s->precision])) < 0) |
|
|
|
|
|
|
|
|
|
|
|
if ((ret = ff_set_common_formats_from_list(ctx, sample_fmts[s->precision])) < 0) |
|
|
|
|
|
|
|
return ret; |
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
|
|
return ff_set_common_all_samplerates(ctx); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static int activate(AVFilterContext *ctx) |
|
|
|
static int activate(AVFilterContext *ctx) |
|
|
@ -325,7 +325,7 @@ const AVFilter ff_af_aap = { |
|
|
|
.activate = activate, |
|
|
|
.activate = activate, |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | |
|
|
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | |
|
|
|
AVFILTER_FLAG_SLICE_THREADS, |
|
|
|
AVFILTER_FLAG_SLICE_THREADS, |
|
|
|
.process_command = ff_filter_process_command, |
|
|
|
.process_command = ff_filter_process_command, |
|
|
|