diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-06 15:44:20 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-06 15:46:06 +0200 |
commit | 66d45af13c043d2bb555cef462d73906761ea1ba (patch) | |
tree | aef641d8fde2ea96e253dc22bd1aec1b0dbbb0d7 /libavfilter/vf_avgblur.c | |
parent | da9337c911c9cd68b1580e569138b9c79472db1f (diff) |
avfilter/vf_avgblur: add support for commands
Diffstat (limited to 'libavfilter/vf_avgblur.c')
-rw-r--r-- | libavfilter/vf_avgblur.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c index fdc9d39ce1..a1f6c9b80e 100644 --- a/libavfilter/vf_avgblur.c +++ b/libavfilter/vf_avgblur.c @@ -287,6 +287,22 @@ 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) +{ + AverageBlurContext *s = ctx->priv; + int ret = 0; + + if ( !strcmp(cmd, "sizeX") || !strcmp(cmd, "sizeY") + || !strcmp(cmd, "planes")) { + av_opt_set(s, cmd, args, 0); + } else { + ret = AVERROR(ENOSYS); + } + + return ret; +} + static av_cold void uninit(AVFilterContext *ctx) { AverageBlurContext *s = ctx->priv; @@ -322,4 +338,5 @@ AVFilter ff_vf_avgblur = { .inputs = avgblur_inputs, .outputs = avgblur_outputs, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, + .process_command = process_command, }; |