diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-02-06 15:21:56 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-02-06 15:26:39 +0100 |
commit | 4b2968d3055de3d7f1622e93b9aed867b14cdc54 (patch) | |
tree | b885771bb433a84092ba29f0c00c178ee81258b5 | |
parent | d8181cbbc48d262ed820ff2c4265f846be7fe6d1 (diff) | |
download | ffmpeg-4b2968d3055de3d7f1622e93b9aed867b14cdc54.tar.gz |
avfilter/vf_deblock: add support for commands
-rw-r--r-- | doc/filters.texi | 4 | ||||
-rw-r--r-- | libavfilter/vf_deblock.c | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index c150c29114..9c73f35fdb 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -9518,6 +9518,10 @@ deblock=filter=strong:block=4:alpha=0.12:beta=0.07:gamma=0.06:delta=0.05:planes= @end example @end itemize +@subsection Commands + +This filter supports the all above options as @ref{commands}. + @anchor{decimate} @section decimate diff --git a/libavfilter/vf_deblock.c b/libavfilter/vf_deblock.c index b2be1d6f07..0671a64548 100644 --- a/libavfilter/vf_deblock.c +++ b/libavfilter/vf_deblock.c @@ -367,8 +367,20 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return ff_filter_frame(outlink, out); } +static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, + char *res, int res_len, int flags) +{ + int ret; + + ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags); + if (ret < 0) + return ret; + + return config_output(ctx->outputs[0]); +} + #define OFFSET(x) offsetof(DeblockContext, x) -#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM static const AVOption deblock_options[] = { { "filter", "set type of filter", OFFSET(filter), AV_OPT_TYPE_INT, {.i64=STRONG},0, 1, FLAGS, "filter" }, @@ -412,4 +424,5 @@ AVFilter ff_vf_deblock = { .inputs = inputs, .outputs = outputs, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .process_command = process_command, }; |