Convert input audio to a video output, representing the audio frequency
spectrum.
-The filter accepts the following named parameters:
+The filter accepts the following options:
+
@table @option
@item size, s
Specify the video size for the output. Default value is @code{640x512}.
{ 1, 1, 0, 0 }
};
-static av_cold int init(AVFilterContext *ctx, const char *args)
-{
- ShowSpectrumContext *showspectrum = ctx->priv;
- int err;
-
- showspectrum->class = &showspectrum_class;
- av_opt_set_defaults(showspectrum);
-
- if ((err = av_set_options_string(showspectrum, args, "=", ":")) < 0)
- return err;
-
- return 0;
-}
-
static av_cold void uninit(AVFilterContext *ctx)
{
ShowSpectrumContext *showspectrum = ctx->priv;
AVFilter avfilter_avf_showspectrum = {
.name = "showspectrum",
.description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output."),
- .init = init,
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(ShowSpectrumContext),
!strcmp(filter->filter->name, "format") ||
!strcmp(filter->filter->name, "noformat") ||
!strcmp(filter->filter->name, "resample") ||
+ !strcmp(filter->filter->name, "showspectrum") ||
!strcmp(filter->filter->name, "silencedetect") ||
!strcmp(filter->filter->name, "thumbnail") ||
// !strcmp(filter->filter->name, "scale" ) ||