|
|
|
@ -188,24 +188,6 @@ static void gate(AudioGateContext *s, |
|
|
|
|
|
|
|
|
|
#if CONFIG_AGATE_FILTER |
|
|
|
|
|
|
|
|
|
static int query_formats(AVFilterContext *ctx) |
|
|
|
|
{ |
|
|
|
|
AVFilterFormats *formats = NULL; |
|
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
if ((ret = ff_add_format(&formats, AV_SAMPLE_FMT_DBL)) < 0) |
|
|
|
|
return ret; |
|
|
|
|
ret = ff_set_common_formats(ctx, formats); |
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
ret = ff_set_common_all_channel_counts(ctx); |
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
return ff_set_common_all_samplerates(ctx); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int filter_frame(AVFilterLink *inlink, AVFrame *in) |
|
|
|
|
{ |
|
|
|
|
const double *src = (const double *)in->data[0]; |
|
|
|
@ -258,7 +240,7 @@ const AVFilter ff_af_agate = { |
|
|
|
|
.priv_size = sizeof(AudioGateContext), |
|
|
|
|
FILTER_INPUTS(inputs), |
|
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
|
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), |
|
|
|
|
.process_command = ff_filter_process_command, |
|
|
|
|
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, |
|
|
|
|
}; |
|
|
|
|