diff options
author | Paul B Mahol <onemda@gmail.com> | 2019-10-08 13:18:12 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2019-10-14 11:40:17 +0200 |
commit | 7fcb84165e2229733cafa85ee2b82ce3fc2cbdb8 (patch) | |
tree | 2db6eb3c6641724c6a63cf357940204dbe5700c3 /libavfilter/vf_scroll.c | |
parent | 877e2e92a377249625f5a2fcba53f64525705560 (diff) | |
download | ffmpeg-7fcb84165e2229733cafa85ee2b82ce3fc2cbdb8.tar.gz |
avfilter/vf_scroll: add support for commands
Diffstat (limited to 'libavfilter/vf_scroll.c')
-rw-r--r-- | libavfilter/vf_scroll.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/vf_scroll.c b/libavfilter/vf_scroll.c index 32b36d5631..8d4da2b950 100644 --- a/libavfilter/vf_scroll.c +++ b/libavfilter/vf_scroll.c @@ -155,12 +155,13 @@ static int config_input(AVFilterLink *inlink) #define OFFSET(x) offsetof(ScrollContext, x) #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM +#define VFT AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM static const AVOption scroll_options[] = { - { "horizontal", "set the horizontal scrolling speed", OFFSET(h_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., FLAGS }, - { "h", "set the horizontal scrolling speed", OFFSET(h_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., FLAGS }, - { "vertical", "set the vertical scrolling speed", OFFSET(v_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., FLAGS }, - { "v", "set the vertical scrolling speed", OFFSET(v_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., FLAGS }, + { "horizontal", "set the horizontal scrolling speed", OFFSET(h_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT }, + { "h", "set the horizontal scrolling speed", OFFSET(h_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT }, + { "vertical", "set the vertical scrolling speed", OFFSET(v_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT }, + { "v", "set the vertical scrolling speed", OFFSET(v_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT }, { "hpos", "set initial horizontal position", OFFSET(h_ipos), AV_OPT_TYPE_FLOAT, {.dbl=0.}, 0, 1., FLAGS }, { "vpos", "set initial vertical position", OFFSET(v_ipos), AV_OPT_TYPE_FLOAT, {.dbl=0.}, 0, 1., FLAGS }, { NULL } @@ -195,4 +196,5 @@ AVFilter ff_vf_scroll = { .inputs = scroll_inputs, .outputs = scroll_outputs, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .process_command = ff_filter_process_command, }; |