1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/f_realtime: add support for commands

This commit is contained in:
Paul B Mahol 2022-03-25 12:12:37 +01:00
parent 3a22bc03e6
commit 96ebf7dceb
2 changed files with 7 additions and 1 deletions

View File

@ -26757,6 +26757,10 @@ A processing speed faster than what is possible without these filters cannot
be achieved. be achieved.
@end table @end table
@subsection Commands
Both filters supports the all above options as @ref{commands}.
@section segment, asegment @section segment, asegment
Split single input stream into multiple streams. Split single input stream into multiple streams.

View File

@ -66,7 +66,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
} }
#define OFFSET(x) offsetof(RealtimeContext, x) #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[] = { static const AVOption options[] = {
{ "limit", "sleep time limit", OFFSET(limit), AV_OPT_TYPE_DURATION, { .i64 = 2000000 }, 0, INT64_MAX, FLAGS }, { "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 }, { "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, .flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(avfilter_vf_realtime_inputs), FILTER_INPUTS(avfilter_vf_realtime_inputs),
FILTER_OUTPUTS(avfilter_vf_realtime_outputs), FILTER_OUTPUTS(avfilter_vf_realtime_outputs),
.process_command = ff_filter_process_command,
}; };
#endif /* CONFIG_REALTIME_FILTER */ #endif /* CONFIG_REALTIME_FILTER */
@ -128,5 +129,6 @@ const AVFilter ff_af_arealtime = {
.flags = AVFILTER_FLAG_METADATA_ONLY, .flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(arealtime_inputs), FILTER_INPUTS(arealtime_inputs),
FILTER_OUTPUTS(arealtime_outputs), FILTER_OUTPUTS(arealtime_outputs),
.process_command = ff_filter_process_command,
}; };
#endif /* CONFIG_AREALTIME_FILTER */ #endif /* CONFIG_AREALTIME_FILTER */