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

Paul B Mahol git at videolan.org
Sun Jul 25 12:36:14 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jul 25 11:24:18 2021 +0200| [207e9b17606d2a7f81f2a11ffb8d82df8b689797] | committer: Paul B Mahol

avfilter/vf_threshold: add support for commands

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

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

diff --git a/doc/filters.texi b/doc/filters.texi
index 07590aeaf9..b0d73abe5c 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -19863,6 +19863,10 @@ otherwise fourth stream pixel component value will be picked.
 
 Using color source filter one can perform various types of thresholding:
 
+ at subsection Commands
+
+This filter supports the all options as @ref{commands}.
+
 @subsection Examples
 
 @itemize
diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c
index decfbf8564..0c8787e331 100644
--- a/libavfilter/vf_threshold.c
+++ b/libavfilter/vf_threshold.c
@@ -34,7 +34,7 @@
 #include "threshold.h"
 
 #define OFFSET(x) offsetof(ThresholdContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
 static const AVOption threshold_options[] = {
     { "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT,  {.i64=15}, 0, 15, FLAGS},
@@ -365,4 +365,5 @@ const AVFilter ff_vf_threshold = {
     .inputs        = inputs,
     .outputs       = outputs,
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,
+    .process_command = ff_filter_process_command,
 };



More information about the ffmpeg-cvslog mailing list