[FFmpeg-cvslog] avfilter/vf_colorbalance: add support for commands

Paul B Mahol git at videolan.org
Wed Nov 13 14:09:43 EET 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Nov 13 12:59:17 2019 +0100| [45f03cdd20c3f9a83d4955fa32ffdc287229ccfd] | committer: Paul B Mahol

avfilter/vf_colorbalance: add support for commands

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=45f03cdd20c3f9a83d4955fa32ffdc287229ccfd
---

 doc/filters.texi              | 4 ++++
 libavfilter/vf_colorbalance.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 9268c33e30..e48f9c99e5 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -7095,6 +7095,10 @@ colorbalance=rs=.3
 @end example
 @end itemize
 
+ at subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section colorchannelmixer
 
 Adjust video input frames by re-mixing color channels.
diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c
index 097a3d778f..cc90dc08c7 100644
--- a/libavfilter/vf_colorbalance.c
+++ b/libavfilter/vf_colorbalance.c
@@ -57,7 +57,7 @@ typedef struct ColorBalanceContext {
 } ColorBalanceContext;
 
 #define OFFSET(x) offsetof(ColorBalanceContext, 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 colorbalance_options[] = {
     { "rs", "set red shadows",      OFFSET(cyan_red.shadows),         AV_OPT_TYPE_FLOAT, {.dbl=0}, -1, 1, FLAGS },
     { "gs", "set green shadows",    OFFSET(magenta_green.shadows),    AV_OPT_TYPE_FLOAT, {.dbl=0}, -1, 1, FLAGS },
@@ -448,4 +448,5 @@ AVFilter ff_vf_colorbalance = {
     .inputs        = colorbalance_inputs,
     .outputs       = colorbalance_outputs,
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
+    .process_command = ff_filter_process_command,
 };



More information about the ffmpeg-cvslog mailing list