diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-06 16:23:55 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-06 16:34:28 +0300 |
commit | da9337c911c9cd68b1580e569138b9c79472db1f (patch) | |
tree | 0c1d3b1a494532a04cf6e90843d768d2dc06281b /libavfilter/vf_gblur.c | |
parent | e37edc70bd884182021035f6754464b904cfbf9b (diff) |
avfilter/vf_gblur: add support for commands
Diffstat (limited to 'libavfilter/vf_gblur.c')
-rw-r--r-- | libavfilter/vf_gblur.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c index e71b33da80..6ef261478f 100644 --- a/libavfilter/vf_gblur.c +++ b/libavfilter/vf_gblur.c @@ -344,6 +344,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) +{ + GBlurContext *s = ctx->priv; + int ret = 0; + + if ( !strcmp(cmd, "sigma") || !strcmp(cmd, "sigmaV") + || !strcmp(cmd, "steps") || !strcmp(cmd, "planes")) { + av_opt_set(s, cmd, args, 0); + } else { + ret = AVERROR(ENOSYS); + } + + return ret; +} + static av_cold void uninit(AVFilterContext *ctx) { GBlurContext *s = ctx->priv; @@ -379,4 +395,5 @@ AVFilter ff_vf_gblur = { .inputs = gblur_inputs, .outputs = gblur_outputs, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, + .process_command = process_command, }; |