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

Paul B Mahol git at videolan.org
Tue Mar 29 21:35:38 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Mar 25 12:12:37 2022 +0100| [96ebf7dceba882134911df6651cee49c70511c37] | committer: Paul B Mahol

avfilter/f_realtime: add support for commands

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

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

diff --git a/doc/filters.texi b/doc/filters.texi
index d70ac3e237..1d56d24819 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -26757,6 +26757,10 @@ A processing speed faster than what is possible without these filters cannot
 be achieved.
 @end table
 
+ at subsection Commands
+
+Both filters supports the all above options as @ref{commands}.
+
 @section segment, asegment
 
 Split single input stream into multiple streams.
diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c
index 78da5dc3a7..ef713474ea 100644
--- a/libavfilter/f_realtime.c
+++ b/libavfilter/f_realtime.c
@@ -66,7 +66,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
 }
 
 #define OFFSET(x) offsetof(RealtimeContext, x)
-#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 static const AVOption options[] = {
     { "limit", "sleep time limit", OFFSET(limit), AV_OPT_TYPE_DURATION, { .i64 = 2000000 }, 0, INT64_MAX, FLAGS },
     { "speed", "speed factor", OFFSET(speed), AV_OPT_TYPE_DOUBLE, { .dbl = 1.0 }, DBL_MIN, DBL_MAX, FLAGS },
@@ -100,6 +100,7 @@ const AVFilter ff_vf_realtime = {
     .flags       = AVFILTER_FLAG_METADATA_ONLY,
     FILTER_INPUTS(avfilter_vf_realtime_inputs),
     FILTER_OUTPUTS(avfilter_vf_realtime_outputs),
+    .process_command = ff_filter_process_command,
 };
 #endif /* CONFIG_REALTIME_FILTER */
 
@@ -128,5 +129,6 @@ const AVFilter ff_af_arealtime = {
     .flags       = AVFILTER_FLAG_METADATA_ONLY,
     FILTER_INPUTS(arealtime_inputs),
     FILTER_OUTPUTS(arealtime_outputs),
+    .process_command = ff_filter_process_command,
 };
 #endif /* CONFIG_AREALTIME_FILTER */



More information about the ffmpeg-cvslog mailing list