[FFmpeg-devel] [PATCH] avfilter/avf_showcqt: draw text optionally

Ronald S. Bultje rsbultje at gmail.com
Mon Sep 14 13:58:00 CEST 2015


Hi,

On Tue, Sep 1, 2015 at 8:33 AM, Paul B Mahol <onemda at gmail.com> wrote:

> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavfilter/avf_showcqt.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
> index 85f9ea9..a70c4b0 100644
> --- a/libavfilter/avf_showcqt.c
> +++ b/libavfilter/avf_showcqt.c
> @@ -93,6 +93,7 @@ typedef struct {
>      float gamma2;       /* gamma of bargraph */
>      int fps;            /* the required fps is so strict, so it's enough
> to be int, but 24000/1001 etc cannot be encoded */
>      int count;          /* fps * count = transform rate */
> +    int draw_text;
>  } ShowCQTContext;
>
>  #define OFFSET(x) offsetof(ShowCQTContext, x)
> @@ -110,6 +111,7 @@ static const AVOption showcqt_options[] = {
>      { "count", "set number of transform per frame", OFFSET(count),
> AV_OPT_TYPE_INT, { .i64 = 6 }, 1, 30, FLAGS },
>      { "fontfile", "set font file", OFFSET(fontfile), AV_OPT_TYPE_STRING,
> { .str = NULL }, CHAR_MIN, CHAR_MAX, FLAGS },
>      { "fontcolor", "set font color", OFFSET(fontcolor),
> AV_OPT_TYPE_STRING, { .str = FONTCOLOR_DEFAULT }, CHAR_MIN, CHAR_MAX, FLAGS
> },
> +    { "text", "draw text", OFFSET(draw_text), AV_OPT_TYPE_INT, { .i64 = 1
> }, 0, 1, FLAGS },


AV_OPT_TYPE_BOOL?

Ronald


More information about the ffmpeg-devel mailing list