[FFmpeg-devel] [PATCH] avfilter/af_silenceremove: add optional tone when silence is removed

Moritz Barsnick barsnick at gmx.net
Fri Oct 14 16:16:06 EEST 2016


>  enum SilenceMode {
> -    SILENCE_TRIM,
> +    SILENCE_TRIM = 0,
>      SILENCE_TRIM_FLUSH,
>      SILENCE_COPY,
>      SILENCE_COPY_FLUSH,
> -    SILENCE_STOP
> +    SILENCE_STOP,
> +    SILENCE_END_MARKER
> +};
> +
> +static const char* SILENCE_MODE_NAMES[] = {
> +    NULL_IF_CONFIG_SMALL("TRIM"),
> +    NULL_IF_CONFIG_SMALL("TRIM_FLUSH"),
> +    NULL_IF_CONFIG_SMALL("COPY"),
> +    NULL_IF_CONFIG_SMALL("COPY_FLUSH"),
> +    NULL_IF_CONFIG_SMALL("STOP")
>  };

This (and related functions) is probably unrelated to the feature
you're adding, and rather a commodity, so I guess it should be in a
separate patch.

And I personally would probably name the frequency option
"tone_frequency" as just that, and not with its unit Hz as "tone_hz",
but that's cosmetic.

Moritz

P.S.: Nice feature for debug.


More information about the ffmpeg-devel mailing list