From 074abeb57e210d7a13ac89026af2a3f0636c2907 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 15 Dec 2023 09:21:09 +0100 Subject: [PATCH] fftools/ffmpeg_opt: move deprecated options to the end of the list This way they don't clutter this already-cluttered code even further. --- fftools/ffmpeg_opt.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 9b6f2850c3..2b69f3df55 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1452,10 +1452,6 @@ const OptionDef options[] = { OPT_OUTPUT, { .func_arg = opt_map }, "set input stream mapping", "[-]input_file_id[:stream_specifier][,sync_file_id[:stream_specifier]]" }, -#if FFMPEG_OPT_MAP_CHANNEL - { "map_channel", HAS_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_map_channel }, - "map an audio channel from one stream to another (deprecated)", "file.stream.channel[:syncfile.syncstream]" }, -#endif { "map_metadata", OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(metadata_map) }, "set metadata information of outfile from infile", @@ -1533,10 +1529,6 @@ const OptionDef options[] = { "set video sync method globally; deprecated, use -fps_mode", "" }, { "frame_drop_threshold", OPT_FLOAT | OPT_EXPERT, { &frame_drop_threshold }, "frame drop threshold", "" }, -#if FFMPEG_OPT_ADRIFT_THRESHOLD - { "adrift_threshold", HAS_ARG | OPT_EXPERT, { .func_arg = opt_adrift_threshold }, - "deprecated, does nothing", "threshold" }, -#endif { "copyts", OPT_BOOL | OPT_EXPERT, { ©_ts }, "copy timestamps" }, { "start_at_zero", OPT_BOOL | OPT_EXPERT, { &start_at_zero }, @@ -1685,10 +1677,6 @@ const OptionDef options[] = { { "passlogfile", OPT_VIDEO | OPT_STRING | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(passlogfiles) }, "select two pass log file name prefix", "prefix" }, -#if FFMPEG_OPT_PSNR - { "psnr", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &do_psnr }, - "calculate PSNR of compressed frames (deprecated, use -flags +psnr)" }, -#endif { "vstats", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_vstats }, "dump video coding statistics to file" }, { "vstats_file", OPT_VIDEO | HAS_ARG | OPT_EXPERT , { .func_arg = opt_vstats_file }, @@ -1706,18 +1694,9 @@ const OptionDef options[] = { { "chroma_intra_matrix", OPT_VIDEO | OPT_EXPERT | OPT_STRING | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(chroma_intra_matrices) }, "specify intra matrix coeffs", "matrix" }, -#if FFMPEG_OPT_TOP - { "top", OPT_VIDEO | OPT_EXPERT | OPT_INT| OPT_SPEC | - OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(top_field_first) }, - "deprecated, use the setfield video filter", "" }, -#endif { "vtag", OPT_VIDEO | HAS_ARG | OPT_EXPERT | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_old2new }, "force video tag/fourcc", "fourcc/tag" }, -#if FFMPEG_OPT_QPHIST - { "qphist", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_qphist }, - "deprecated, does nothing" }, -#endif { "fps_mode", OPT_VIDEO | OPT_STRING | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(fps_mode) }, "set framerate mode for matching video streams; overrides vsync" }, @@ -1858,5 +1837,28 @@ const OptionDef options[] = { { "filter_hw_device", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_hw_device }, "set hardware device used when filtering", "device" }, + // deprecated options +#if FFMPEG_OPT_MAP_CHANNEL + { "map_channel", HAS_ARG | OPT_EXPERT | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_map_channel }, + "map an audio channel from one stream to another (deprecated)", "file.stream.channel[:syncfile.syncstream]" }, +#endif +#if FFMPEG_OPT_ADRIFT_THRESHOLD + { "adrift_threshold", HAS_ARG | OPT_EXPERT, { .func_arg = opt_adrift_threshold }, + "deprecated, does nothing", "threshold" }, +#endif +#if FFMPEG_OPT_PSNR + { "psnr", OPT_VIDEO | OPT_BOOL | OPT_EXPERT, { &do_psnr }, + "calculate PSNR of compressed frames (deprecated, use -flags +psnr)" }, +#endif +#if FFMPEG_OPT_TOP + { "top", OPT_VIDEO | OPT_EXPERT | OPT_INT| OPT_SPEC | + OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(top_field_first) }, + "deprecated, use the setfield video filter", "" }, +#endif +#if FFMPEG_OPT_QPHIST + { "qphist", OPT_VIDEO | OPT_EXPERT , { .func_arg = opt_qphist }, + "deprecated, does nothing" }, +#endif + { NULL, }, };