diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-11-22 14:39:11 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-12-04 14:07:19 +0100 |
commit | b9c928a486fda3c0d79b153591ac86beb1c53708 (patch) | |
tree | 4cbc1fe372de041aa3a147c60a31bf5fba532356 | |
parent | 944c34a94c3150fc84816c3288cc6f2143f1581b (diff) | |
download | ffmpeg-b9c928a486fda3c0d79b153591ac86beb1c53708.tar.gz |
avfilter: add AVFILTER_FLAG_METADATA_ONLY
This flag allows distinguishing between filters that actually modify the
data and those that only modify metadata or gather some stream
information.
60 files changed, 116 insertions, 26 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 4788dd576d..66fac6c762 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2021-11-xx - xxxxxxxxxx - lavfi 8.19.100 - avfilter.h + Add AVFILTER_FLAG_METADATA_ONLY. + 2021-12-03 - xxxxxxxxxx - lavu 57.10.100 - frame.h Add AVFrame.time_base diff --git a/libavfilter/af_acopy.c b/libavfilter/af_acopy.c index 32455d9186..1591ec9639 100644 --- a/libavfilter/af_acopy.c +++ b/libavfilter/af_acopy.c @@ -63,6 +63,7 @@ static const AVFilterPad acopy_outputs[] = { const AVFilter ff_af_acopy = { .name = "acopy", .description = NULL_IF_CONFIG_SMALL("Copy the input audio unchanged to the output."), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(acopy_inputs), FILTER_OUTPUTS(acopy_outputs), }; diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index 7e25c0c6a4..ed3c75311a 100644 --- a/libavfilter/af_aformat.c +++ b/libavfilter/af_aformat.c @@ -162,6 +162,7 @@ const AVFilter ff_af_aformat = { .uninit = uninit, .priv_size = sizeof(AFormatContext), .priv_class = &aformat_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_af_aformat_inputs), FILTER_OUTPUTS(avfilter_af_aformat_outputs), FILTER_QUERY_FUNC(query_formats), diff --git a/libavfilter/af_anull.c b/libavfilter/af_anull.c index 065d37e17e..78c5faeb23 100644 --- a/libavfilter/af_anull.c +++ b/libavfilter/af_anull.c @@ -44,6 +44,7 @@ static const AVFilterPad avfilter_af_anull_outputs[] = { const AVFilter ff_af_anull = { .name = "anull", .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_af_anull_inputs), FILTER_OUTPUTS(avfilter_af_anull_outputs), }; diff --git a/libavfilter/af_asdr.c b/libavfilter/af_asdr.c index 72b6dfa78b..addfe5f158 100644 --- a/libavfilter/af_asdr.c +++ b/libavfilter/af_asdr.c @@ -166,6 +166,7 @@ const AVFilter ff_af_asdr = { .priv_size = sizeof(AudioSDRContext), .activate = activate, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), diff --git a/libavfilter/af_asetrate.c b/libavfilter/af_asetrate.c index 637fa4fbb8..76f29144e5 100644 --- a/libavfilter/af_asetrate.c +++ b/libavfilter/af_asetrate.c @@ -113,4 +113,5 @@ const AVFilter ff_af_asetrate = { FILTER_OUTPUTS(asetrate_outputs), FILTER_QUERY_FUNC(query_formats), .priv_class = &asetrate_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c index b6623fa69d..c76756db63 100644 --- a/libavfilter/af_ashowinfo.c +++ b/libavfilter/af_ashowinfo.c @@ -257,6 +257,7 @@ const AVFilter ff_af_ashowinfo = { .description = NULL_IF_CONFIG_SMALL("Show textual information for each audio frame."), .priv_size = sizeof(AShowInfoContext), .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/af_asr.c b/libavfilter/af_asr.c index b9c7068526..42250e79e2 100644 --- a/libavfilter/af_asr.c +++ b/libavfilter/af_asr.c @@ -172,6 +172,7 @@ const AVFilter ff_af_asr = { .priv_class = &asr_class, .init = asr_init, .uninit = asr_uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(asr_inputs), FILTER_OUTPUTS(asr_outputs), FILTER_QUERY_FUNC(query_formats), diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index 3955a4e8e9..d0810b5dd4 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -848,5 +848,5 @@ const AVFilter ff_af_astats = { AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64P, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c index 6e0d80a3f1..2021cab143 100644 --- a/libavfilter/af_drmeter.c +++ b/libavfilter/af_drmeter.c @@ -202,6 +202,7 @@ const AVFilter ff_af_drmeter = { .priv_size = sizeof(DRMeterContext), .priv_class = &drmeter_class, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(drmeter_inputs), FILTER_OUTPUTS(drmeter_outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT), diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c index ee0312da82..e9bfc5676c 100644 --- a/libavfilter/af_replaygain.c +++ b/libavfilter/af_replaygain.c @@ -606,6 +606,7 @@ const AVFilter ff_af_replaygain = { .description = NULL_IF_CONFIG_SMALL("ReplayGain scanner."), .uninit = uninit, .priv_size = sizeof(ReplayGainContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(replaygain_inputs), FILTER_OUTPUTS(replaygain_outputs), FILTER_QUERY_FUNC(query_formats), diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c index fa0884bee8..0ba76469de 100644 --- a/libavfilter/af_silencedetect.c +++ b/libavfilter/af_silencedetect.c @@ -272,4 +272,5 @@ const AVFilter ff_af_silencedetect = { AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P), .priv_class = &silencedetect_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index c137cc7e50..486fccc4e9 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -134,6 +134,7 @@ const AVFilter ff_af_volumedetect = { .description = NULL_IF_CONFIG_SMALL("Detect audio volume."), .priv_size = sizeof(VolDetectContext), .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(volumedetect_inputs), FILTER_OUTPUTS(volumedetect_outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P), diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index f7208754a7..b105dc3159 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -120,6 +120,22 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx); */ #define AVFILTER_FLAG_SLICE_THREADS (1 << 2) /** + * The filter is a "metadata" filter - it does not modify the frame data in any + * way. It may only affect the metadata (i.e. those fields copied by + * av_frame_copy_props()). + * + * More precisely, this means: + * - video: the data of any frame output by the filter must be exactly equal to + * some frame that is received on one of its inputs. Furthermore, all frames + * produced on a given output must correspond to frames received on the same + * input and their order must be unchanged. Note that the filter may still + * drop or duplicate the frames. + * - audio: the data produced by the filter on any of its outputs (viewed e.g. + * as an array of interleaved samples) must be exactly equal to the data + * received by the filter on one of its inputs. + */ +#define AVFILTER_FLAG_METADATA_ONLY (1 << 3) +/** * Some filters support a generic "enable" expression option that can be used * to enable or disable a filter in the timeline. Filters supporting this * option have this flag set. When the enable expression is false, the default diff --git a/libavfilter/f_bench.c b/libavfilter/f_bench.c index f7098adaf4..109a530d7c 100644 --- a/libavfilter/f_bench.c +++ b/libavfilter/f_bench.c @@ -113,6 +113,7 @@ const AVFilter ff_vf_bench = { FILTER_INPUTS(bench_inputs), FILTER_OUTPUTS(bench_outputs), .priv_class = &bench_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_BENCH_FILTER */ @@ -143,5 +144,6 @@ const AVFilter ff_af_abench = { FILTER_INPUTS(abench_inputs), FILTER_OUTPUTS(abench_outputs), .priv_class = &abench_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_ABENCH_FILTER */ diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c index fd55e4bf5f..d90fe54b9a 100644 --- a/libavfilter/f_cue.c +++ b/libavfilter/f_cue.c @@ -142,6 +142,7 @@ const AVFilter ff_af_acue = { .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), .priv_class = &cue_acue_class, .priv_size = sizeof(CueContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(acue_inputs), FILTER_OUTPUTS(acue_outputs), .activate = activate, diff --git a/libavfilter/f_latency.c b/libavfilter/f_latency.c index de885ca026..6f16d6677e 100644 --- a/libavfilter/f_latency.c +++ b/libavfilter/f_latency.c @@ -118,7 +118,8 @@ const AVFilter ff_vf_latency = { .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(latency_inputs), FILTER_OUTPUTS(latency_outputs), }; diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index cecfe62a9c..5f5091e9b7 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -391,7 +391,8 @@ const AVFilter ff_af_ametadata = { .uninit = uninit, FILTER_INPUTS(ainputs), FILTER_OUTPUTS(aoutputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_AMETADATA_FILTER */ @@ -424,6 +425,7 @@ const AVFilter ff_vf_metadata = { .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_METADATA_FILTER */ diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c index 470db45bee..6e75b2517b 100644 --- a/libavfilter/f_perms.c +++ b/libavfilter/f_perms.c @@ -138,7 +138,8 @@ const AVFilter ff_af_aperms = { .priv_size = sizeof(PermsContext), FILTER_INPUTS(aperms_inputs), FILTER_OUTPUTS(aperms_outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_APERMS_FILTER */ @@ -167,6 +168,7 @@ const AVFilter ff_vf_perms = { FILTER_INPUTS(perms_inputs), FILTER_OUTPUTS(perms_outputs), .priv_class = &perms_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_PERMS_FILTER */ diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c index 11bdb058ed..9a60ded0ca 100644 --- a/libavfilter/f_realtime.c +++ b/libavfilter/f_realtime.c @@ -95,6 +95,7 @@ const AVFilter ff_vf_realtime = { .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), .priv_size = sizeof(RealtimeContext), .priv_class = &realtime_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_realtime_inputs), FILTER_OUTPUTS(avfilter_vf_realtime_outputs), }; @@ -122,6 +123,7 @@ const AVFilter ff_af_arealtime = { .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), .priv_class = &realtime_class, .priv_size = sizeof(RealtimeContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(arealtime_inputs), FILTER_OUTPUTS(arealtime_outputs), }; diff --git a/libavfilter/f_segment.c b/libavfilter/f_segment.c index 70c8393972..5f44634803 100644 --- a/libavfilter/f_segment.c +++ b/libavfilter/f_segment.c @@ -286,7 +286,7 @@ const AVFilter ff_vf_segment = { .activate = activate, FILTER_INPUTS(segment_inputs), .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, + .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; #endif // CONFIG_SEGMENT_FILTER @@ -325,6 +325,6 @@ const AVFilter ff_af_asegment = { .activate = activate, FILTER_INPUTS(asegment_inputs), .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, + .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; #endif // CONFIG_ASEGMENT_FILTER diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 47e7d1fef8..b61d88f4fe 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -533,6 +533,6 @@ const AVFilter ff_vf_select = { .priv_class = &select_class, FILTER_INPUTS(avfilter_vf_select_inputs), FILTER_QUERY_FUNC(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, + .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_SELECT_FILTER */ diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index f71d211eb4..7261a05aae 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -597,6 +597,7 @@ const AVFilter ff_vf_sendcmd = { .init = init, .uninit = uninit, .priv_size = sizeof(SendCmdContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(sendcmd_inputs), FILTER_OUTPUTS(sendcmd_outputs), .priv_class = &sendcmd_class, @@ -628,6 +629,7 @@ const AVFilter ff_af_asendcmd = { .init = init, .uninit = uninit, .priv_size = sizeof(SendCmdContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(asendcmd_inputs), FILTER_OUTPUTS(asendcmd_outputs), }; diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 5c9f905cc2..8eccd4a06e 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_sidedata.c @@ -147,7 +147,8 @@ const AVFilter ff_af_asidedata = { .init = init, FILTER_INPUTS(ainputs), FILTER_OUTPUTS(aoutputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_ASIDEDATA_FILTER */ @@ -179,6 +180,7 @@ const AVFilter ff_vf_sidedata = { .init = init, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_SIDEDATA_FILTER */ diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index bb7d78f09c..1c7be88ae1 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -132,6 +132,7 @@ const AVFilter ff_vf_fifo = { .init = init, .uninit = uninit, .priv_size = sizeof(FifoContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_fifo_inputs), FILTER_OUTPUTS(avfilter_vf_fifo_outputs), }; @@ -158,6 +159,7 @@ const AVFilter ff_af_afifo = { .init = init, .uninit = uninit, .priv_size = sizeof(FifoContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_af_afifo_inputs), FILTER_OUTPUTS(avfilter_af_afifo_outputs), }; diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index fad92033e4..054feb05f1 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -294,6 +294,7 @@ const AVFilter ff_vf_setpts = { .init = init, .activate = activate, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetPTSContext), .priv_class = &setpts_class, @@ -334,6 +335,7 @@ const AVFilter ff_af_asetpts = { .uninit = uninit, .priv_size = sizeof(SetPTSContext), .priv_class = &asetpts_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(asetpts_inputs), FILTER_OUTPUTS(asetpts_outputs), }; diff --git a/libavfilter/settb.c b/libavfilter/settb.c index ae2cf9b888..67d310afbd 100644 --- a/libavfilter/settb.c +++ b/libavfilter/settb.c @@ -185,6 +185,7 @@ const AVFilter ff_vf_settb = { FILTER_INPUTS(avfilter_vf_settb_inputs), FILTER_OUTPUTS(avfilter_vf_settb_outputs), .activate = activate, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_SETTB_FILTER */ @@ -216,5 +217,6 @@ const AVFilter ff_af_asettb = { FILTER_OUTPUTS(avfilter_af_asettb_outputs), .priv_class = &asettb_class, .activate = activate, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_ASETTB_FILTER */ diff --git a/libavfilter/split.c b/libavfilter/split.c index a08ddf72b1..6b9b656708 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -112,7 +112,7 @@ const AVFilter ff_vf_split = { .init = split_init, FILTER_INPUTS(avfilter_vf_split_inputs), .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, + .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; static const AVFilterPad avfilter_af_asplit_inputs[] = { @@ -131,5 +131,5 @@ const AVFilter ff_af_asplit = { .init = split_init, FILTER_INPUTS(avfilter_af_asplit_inputs), .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, + .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/trim.c b/libavfilter/trim.c index c260da3a0b..e627903c64 100644 --- a/libavfilter/trim.c +++ b/libavfilter/trim.c @@ -363,6 +363,7 @@ const AVFilter ff_af_atrim = { .init = init, .priv_size = sizeof(TrimContext), .priv_class = &atrim_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(atrim_inputs), FILTER_OUTPUTS(atrim_outputs), }; diff --git a/libavfilter/version.h b/libavfilter/version.h index e0bdcb836d..0247fb4f9a 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 8 -#define LIBAVFILTER_VERSION_MINOR 18 +#define LIBAVFILTER_VERSION_MINOR 19 #define LIBAVFILTER_VERSION_MICRO 100 diff --git a/libavfilter/vf_addroi.c b/libavfilter/vf_addroi.c index 5f9ec21754..dd3daeda81 100644 --- a/libavfilter/vf_addroi.c +++ b/libavfilter/vf_addroi.c @@ -262,6 +262,8 @@ const AVFilter ff_vf_addroi = { .priv_size = sizeof(AddROIContext), .priv_class = &addroi_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, + FILTER_INPUTS(addroi_inputs), FILTER_OUTPUTS(addroi_outputs), }; diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index 995c7f4f14..2d1eaa954b 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -188,6 +188,7 @@ const AVFilter ff_vf_setdar = { .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), .priv_size = sizeof(AspectContext), .priv_class = &setdar_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_setdar_inputs), FILTER_OUTPUTS(avfilter_vf_setdar_outputs), }; @@ -250,6 +251,7 @@ const AVFilter ff_vf_setsar = { .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), .priv_size = sizeof(AspectContext), .priv_class = &setsar_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_setsar_inputs), FILTER_OUTPUTS(avfilter_vf_setsar_outputs), }; diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index 559ca505bf..02893d500d 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -151,6 +151,6 @@ const AVFilter ff_vf_bbox = { FILTER_INPUTS(bbox_inputs), FILTER_OUTPUTS(bbox_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index 93d5b077f1..99ff1ac606 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -257,5 +257,5 @@ const AVFilter ff_vf_blackdetect = { FILTER_PIXFMTS_ARRAY(pix_fmts), .uninit = uninit, .priv_class = &blackdetect_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index d37b3f3c13..e5e185dbea 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -127,6 +127,7 @@ const AVFilter ff_vf_blackframe = { .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), .priv_size = sizeof(BlackFrameContext), .priv_class = &blackframe_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_blackframe_inputs), FILTER_OUTPUTS(avfilter_vf_blackframe_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c index 5554565bae..2fbced354f 100644 --- a/libavfilter/vf_copy.c +++ b/libavfilter/vf_copy.c @@ -75,6 +75,7 @@ static const AVFilterPad avfilter_vf_copy_outputs[] = { const AVFilter ff_vf_copy = { .name = "copy", .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_copy_inputs), FILTER_OUTPUTS(avfilter_vf_copy_outputs), FILTER_QUERY_FUNC(query_formats), diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index af3a8f333f..b887b9ecb1 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -273,5 +273,5 @@ const AVFilter ff_vf_cropdetect = { FILTER_INPUTS(avfilter_vf_cropdetect_inputs), FILTER_OUTPUTS(avfilter_vf_cropdetect_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_entropy.c b/libavfilter/vf_entropy.c index 16569682a9..893d07d8e6 100644 --- a/libavfilter/vf_entropy.c +++ b/libavfilter/vf_entropy.c @@ -192,5 +192,5 @@ const AVFilter ff_vf_entropy = { FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixfmts), .priv_class = &entropy_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index 6ac714ce45..a536d669d1 100644 --- a/libavfilter/vf_find_rect.c +++ b/libavfilter/vf_find_rect.c @@ -294,6 +294,7 @@ const AVFilter ff_vf_find_rect = { .priv_size = sizeof(FOCContext), .init = init, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(foc_inputs), FILTER_OUTPUTS(foc_outputs), FILTER_PIXFMTS(AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P), diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index 7e15c43086..c78acbf87b 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -169,6 +169,8 @@ const AVFilter ff_vf_format = { .priv_size = sizeof(FormatContext), .priv_class = &format_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, + FILTER_INPUTS(avfilter_vf_format_inputs), FILTER_OUTPUTS(avfilter_vf_format_outputs), @@ -203,6 +205,8 @@ const AVFilter ff_vf_noformat = { .priv_size = sizeof(FormatContext), + .flags = AVFILTER_FLAG_METADATA_ONLY, + FILTER_INPUTS(avfilter_vf_noformat_inputs), FILTER_OUTPUTS(avfilter_vf_noformat_outputs), diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index b8714727fa..99e679441e 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -388,6 +388,7 @@ const AVFilter ff_vf_fps = { .priv_size = sizeof(FPSContext), .priv_class = &fps_class, .activate = activate, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_fps_inputs), FILTER_OUTPUTS(avfilter_vf_fps_outputs), }; diff --git a/libavfilter/vf_framestep.c b/libavfilter/vf_framestep.c index 5509df53e9..b8eee53b59 100644 --- a/libavfilter/vf_framestep.c +++ b/libavfilter/vf_framestep.c @@ -94,5 +94,5 @@ const AVFilter ff_vf_framestep = { .priv_class = &framestep_class, FILTER_INPUTS(framestep_inputs), FILTER_OUTPUTS(framestep_outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_freezedetect.c b/libavfilter/vf_freezedetect.c index 99f0aae5a2..31a80a6dc0 100644 --- a/libavfilter/vf_freezedetect.c +++ b/libavfilter/vf_freezedetect.c @@ -217,6 +217,7 @@ const AVFilter ff_vf_freezedetect = { .priv_size = sizeof(FreezeDetectContext), .priv_class = &freezedetect_class, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(freezedetect_inputs), FILTER_OUTPUTS(freezedetect_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c index 5096bda382..cc30761388 100644 --- a/libavfilter/vf_identity.c +++ b/libavfilter/vf_identity.c @@ -412,7 +412,9 @@ const AVFilter ff_vf_identity = { FILTER_INPUTS(identity_inputs), FILTER_OUTPUTS(identity_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_IDENTITY_FILTER */ @@ -434,7 +436,9 @@ const AVFilter ff_vf_msad = { FILTER_INPUTS(identity_inputs), FILTER_OUTPUTS(identity_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_MSAD_FILTER */ diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 0f3e78c4ec..9320b485d8 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -436,6 +436,7 @@ const AVFilter ff_vf_idet = { .priv_size = sizeof(IDETContext), .init = init, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(idet_inputs), FILTER_OUTPUTS(idet_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_mestimate.c b/libavfilter/vf_mestimate.c index d8bcfdde02..eff58f612e 100644 --- a/libavfilter/vf_mestimate.c +++ b/libavfilter/vf_mestimate.c @@ -363,6 +363,7 @@ const AVFilter ff_vf_mestimate = { .priv_size = sizeof(MEContext), .priv_class = &mestimate_class, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(mestimate_inputs), FILTER_OUTPUTS(mestimate_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c index 33b1185ce0..fa80e2a102 100644 --- a/libavfilter/vf_null.c +++ b/libavfilter/vf_null.c @@ -43,6 +43,7 @@ static const AVFilterPad avfilter_vf_null_outputs[] = { const AVFilter ff_vf_null = { .name = "null", .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_null_inputs), FILTER_OUTPUTS(avfilter_vf_null_outputs), }; diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c index f6249e61fc..1648afa0f9 100644 --- a/libavfilter/vf_ocr.c +++ b/libavfilter/vf_ocr.c @@ -143,6 +143,7 @@ const AVFilter ff_vf_ocr = { .priv_class = &ocr_class, .init = init, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ocr_inputs), FILTER_OUTPUTS(ocr_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index f96179db44..19852eaa69 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -466,5 +466,7 @@ const AVFilter ff_vf_psnr = { FILTER_INPUTS(psnr_inputs), FILTER_OUTPUTS(psnr_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c index d942ba1579..7c9d60fe21 100644 --- a/libavfilter/vf_qp.c +++ b/libavfilter/vf_qp.c @@ -198,5 +198,6 @@ const AVFilter ff_vf_qp = { FILTER_INPUTS(qp_inputs), FILTER_OUTPUTS(qp_outputs), .priv_class = &qp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c index b9dc46e10e..a5a0249fb7 100644 --- a/libavfilter/vf_readeia608.c +++ b/libavfilter/vf_readeia608.c @@ -555,6 +555,8 @@ const AVFilter ff_vf_readeia608 = { FILTER_OUTPUTS(readeia608_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .process_command = process_command, }; diff --git a/libavfilter/vf_readvitc.c b/libavfilter/vf_readvitc.c index 370cf5d15d..d0fba234f7 100644 --- a/libavfilter/vf_readvitc.c +++ b/libavfilter/vf_readvitc.c @@ -242,6 +242,7 @@ const AVFilter ff_vf_readvitc = { .description = NULL_IF_CONFIG_SMALL("Read vertical interval timecode and write it to frame metadata."), .priv_size = sizeof(ReadVitcContext), .priv_class = &readvitc_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), diff --git a/libavfilter/vf_scdet.c b/libavfilter/vf_scdet.c index d11d2e2e2c..1576759c24 100644 --- a/libavfilter/vf_scdet.c +++ b/libavfilter/vf_scdet.c @@ -206,6 +206,7 @@ const AVFilter ff_vf_scdet = { .priv_size = sizeof(SCDetContext), .priv_class = &scdet_class, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(scdet_inputs), FILTER_OUTPUTS(scdet_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c index 0a79599bab..b3893adc13 100644 --- a/libavfilter/vf_setparams.c +++ b/libavfilter/vf_setparams.c @@ -165,6 +165,7 @@ const AVFilter ff_vf_setparams = { .description = NULL_IF_CONFIG_SMALL("Force field, or color property for the output video frame."), .priv_size = sizeof(SetParamsContext), .priv_class = &setparams_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), }; @@ -204,6 +205,7 @@ const AVFilter ff_vf_setrange = { .priv_size = sizeof(SetParamsContext), .init = init_setrange, .priv_class = &setrange_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), }; @@ -238,6 +240,7 @@ const AVFilter ff_vf_setfield = { .priv_size = sizeof(SetParamsContext), .init = init_setfield, .priv_class = &setfield_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), }; diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index ff438e70c6..62c7833247 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -678,4 +678,5 @@ const AVFilter ff_vf_showinfo = { FILTER_OUTPUTS(avfilter_vf_showinfo_outputs), .priv_size = sizeof(ShowInfoContext), .priv_class = &showinfo_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index c6989d618b..32f313817d 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -592,5 +592,7 @@ const AVFilter ff_vf_ssim = { FILTER_INPUTS(ssim_inputs), FILTER_OUTPUTS(ssim_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c index fda8c2d485..0ca221b5b8 100644 --- a/libavfilter/vf_vfrdet.c +++ b/libavfilter/vf_vfrdet.c @@ -108,6 +108,7 @@ const AVFilter ff_vf_vfrdet = { .priv_size = sizeof(VFRDETContext), .init = init, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(vfrdet_inputs), FILTER_OUTPUTS(vfrdet_outputs), }; diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index 05c95d0eeb..267a62ea9b 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.c @@ -196,6 +196,7 @@ const AVFilter ff_vf_vidstabdetect = { .priv_size = sizeof(StabData), .init = init, .uninit = uninit, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_vidstabdetect_inputs), FILTER_OUTPUTS(avfilter_vf_vidstabdetect_outputs), FILTER_PIXFMTS_ARRAY(ff_vidstab_pix_fmts), diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index 09854641b1..818cc51e36 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -638,5 +638,7 @@ const AVFilter ff_vf_vif = { FILTER_INPUTS(vif_inputs), FILTER_OUTPUTS(vif_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 362839735e..8b7e9b17ef 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -363,6 +363,7 @@ const AVFilter ff_vf_vmafmotion = { .uninit = uninit, .priv_size = sizeof(VMAFMotionContext), .priv_class = &vmafmotion_class, + .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(vmafmotion_inputs), FILTER_OUTPUTS(vmafmotion_outputs), FILTER_QUERY_FUNC(query_formats), |