]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_agate: add support for commands and timeline
authorPaul B Mahol <onemda@gmail.com>
Mon, 30 Nov 2020 20:40:52 +0000 (21:40 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 30 Nov 2020 20:42:09 +0000 (21:42 +0100)
doc/filters.texi
libavfilter/af_agate.c

index 06ed28f3f95e30585003cb7fc2e13d8ec0ee8842..d2afc7115de7b928511b83be2ce5e29d6b02f2c9 100644 (file)
@@ -1478,6 +1478,10 @@ the reduction.
 Default is @code{average}. Can be @code{average} or @code{maximum}.
 @end table
 
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section aiir
 
 Apply an arbitrary Infinite Impulse Response filter.
@@ -5081,6 +5085,10 @@ Default is average. Can be average or maximum.
 Set sidechain gain. Default is 1. Range is from 0.015625 to 64.
 @end table
 
+@subsection Commands
+
+This filter supports the all above options as @ref{commands}.
+
 @section silencedetect
 
 Detect silence in an audio stream.
index 9efc6f9c4068d779aa280314eadde9a0fedda1c9..5fcf6eceb110e2f2836fd67d4ec043869a321f47 100644 (file)
@@ -63,7 +63,7 @@ typedef struct AudioGateContext {
 } AudioGateContext;
 
 #define OFFSET(x) offsetof(AudioGateContext, x)
-#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
 static const AVOption options[] = {
     { "level_in",  "set input level",        OFFSET(level_in),  AV_OPT_TYPE_DOUBLE, {.dbl=1},           0.015625,   64, A },
@@ -268,6 +268,8 @@ AVFilter ff_af_agate = {
     .priv_class     = &agate_class,
     .inputs         = inputs,
     .outputs        = outputs,
+    .process_command = ff_filter_process_command,
+    .flags          = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };
 
 #endif /* CONFIG_AGATE_FILTER */
@@ -445,5 +447,7 @@ AVFilter ff_af_sidechaingate = {
     .uninit         = uninit,
     .inputs         = sidechaingate_inputs,
     .outputs        = sidechaingate_outputs,
+    .process_command = ff_filter_process_command,
+    .flags          = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };
 #endif  /* CONFIG_SIDECHAINGATE_FILTER */