]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_colorlevels: add support for commands
authorPaul B Mahol <onemda@gmail.com>
Tue, 11 Feb 2020 13:19:56 +0000 (14:19 +0100)
committerPaul B Mahol <onemda@gmail.com>
Tue, 11 Feb 2020 13:19:56 +0000 (14:19 +0100)
doc/filters.texi
libavfilter/vf_colorlevels.c

index f396819a79fb1fc50881f337f27a4c1147d3ce7a..7c25bbaf975ecf221861a42d6848eb59d04356ec 100644 (file)
@@ -7479,6 +7479,10 @@ colorlevels=romin=0.5:gomin=0.5:bomin=0.5
 @end example
 @end itemize
 
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section colormatrix
 
 Convert color matrix.
index fadb39e0049be097b9b52e2b58aef0a40aa24047..c03e288e4ac58ba1d3a91fde74d90a471bbf4139 100644 (file)
@@ -48,7 +48,7 @@ typedef struct ColorLevelsContext {
 } ColorLevelsContext;
 
 #define OFFSET(x) offsetof(ColorLevelsContext, x)
-#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
+#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 static const AVOption colorlevels_options[] = {
     { "rimin", "set input red black point",    OFFSET(range[R].in_min),  AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1, 1, FLAGS },
     { "gimin", "set input green black point",  OFFSET(range[G].in_min),  AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1, 1, FLAGS },
@@ -325,4 +325,5 @@ AVFilter ff_vf_colorlevels = {
     .inputs        = colorlevels_inputs,
     .outputs       = colorlevels_outputs,
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
+    .process_command = ff_filter_process_command,
 };