From: Anton Khirnov <anton@khirnov.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 1/8] fftools/cmdutils: hide some information listing options from basic help
Date: Wed, 17 Jan 2024 13:40:28 +0100
Message-ID: <20240117124036.7877-1-anton@khirnov.net> (raw)
They are for advanced usage only and should not clutter basic output.
---
fftools/ffmpeg_opt.c | 7 +++++--
fftools/opt_common.h | 24 ++++++++++++------------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 1978f438fe..6b16d92a87 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1197,7 +1197,10 @@ void show_help_default(const char *opt, const char *arg)
"\n", program_name);
show_help_options(options, "Print help / information / capabilities:",
- OPT_EXIT, 0, 0);
+ OPT_EXIT, OPT_EXPERT, 0);
+ if (show_advanced)
+ show_help_options(options, "Advanced information / capabilities:",
+ OPT_EXIT | OPT_EXPERT, 0, 0);
show_help_options(options, "Global options (affect whole program "
"instead of just one file):",
@@ -1806,7 +1809,7 @@ const OptionDef options[] = {
{ "hwaccel_output_format", OPT_TYPE_STRING, OPT_VIDEO | OPT_EXPERT | OPT_SPEC | OPT_INPUT,
{ .off = OFFSET(hwaccel_output_formats) },
"select output format used with HW accelerated decoding", "format" },
- { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT,
+ { "hwaccels", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT,
{ .func_arg = show_hwaccels },
"show available HW acceleration methods" },
{ "autorotate", OPT_TYPE_BOOL, OPT_SPEC | OPT_EXPERT | OPT_INPUT,
diff --git a/fftools/opt_common.h b/fftools/opt_common.h
index 36c591cc94..9bb5268472 100644
--- a/fftools/opt_common.h
+++ b/fftools/opt_common.h
@@ -41,9 +41,9 @@ int show_sources(void *optctx, const char *opt, const char *arg);
#if CONFIG_AVDEVICE
#define CMDUTILS_COMMON_OPTIONS_AVDEVICE \
- { "sources" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG, { .func_arg = show_sources }, \
+ { "sources" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = show_sources }, \
"list sources of the input device", "device" }, \
- { "sinks" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG, { .func_arg = show_sinks }, \
+ { "sinks" , OPT_TYPE_FUNC, OPT_EXIT | OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = show_sinks }, \
"list sinks of the output device", "device" }, \
#else
@@ -199,26 +199,26 @@ int opt_cpucount(void *optctx, const char *opt, const char *arg);
#define CMDUTILS_COMMON_OPTIONS \
{ "L", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_license }, "show license" }, \
{ "h", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
- { "?", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
- { "help", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
- { "-help", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_help }, "show help", "topic" }, \
+ { "?", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_help }, "show help", "topic" }, \
+ { "help", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_help }, "show help", "topic" }, \
+ { "-help", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_help }, "show help", "topic" }, \
{ "version", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_version }, "show version" }, \
- { "buildconf", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_buildconf }, "show build configuration" }, \
- { "formats", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_formats }, "show available formats" }, \
+ { "buildconf", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_buildconf }, "show build configuration" }, \
+ { "formats", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_formats }, "show available formats" }, \
{ "muxers", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_muxers }, "show available muxers" }, \
{ "demuxers", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_demuxers }, "show available demuxers" }, \
{ "devices", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_devices }, "show available devices" }, \
- { "codecs", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_codecs }, "show available codecs" }, \
+ { "codecs", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_codecs }, "show available codecs" }, \
{ "decoders", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_decoders }, "show available decoders" }, \
{ "encoders", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_encoders }, "show available encoders" }, \
- { "bsfs", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \
- { "protocols", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_protocols }, "show available protocols" }, \
+ { "bsfs", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_bsfs }, "show available bit stream filters" }, \
+ { "protocols", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_protocols }, "show available protocols" }, \
{ "filters", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_filters }, "show available filters" }, \
{ "pix_fmts", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_pix_fmts }, "show available pixel formats" }, \
{ "layouts", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_layouts }, "show standard channel layouts" }, \
{ "sample_fmts", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_sample_fmts }, "show available audio sample formats" }, \
- { "dispositions", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_dispositions}, "show available stream dispositions" }, \
- { "colors", OPT_TYPE_FUNC, OPT_EXIT, { .func_arg = show_colors }, "show available color names" }, \
+ { "dispositions", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_dispositions}, "show available stream dispositions" }, \
+ { "colors", OPT_TYPE_FUNC, OPT_EXIT | OPT_EXPERT, { .func_arg = show_colors }, "show available color names" }, \
{ "loglevel", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \
{ "v", OPT_TYPE_FUNC, OPT_FUNC_ARG, { .func_arg = opt_loglevel }, "set logging level", "loglevel" }, \
{ "report", OPT_TYPE_FUNC, OPT_EXPERT, { .func_arg = opt_report }, "generate a report" }, \
--
2.42.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2024-01-17 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 12:40 Anton Khirnov [this message]
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 2/8] fftools/cmdutils: add a flag for per-stream options Anton Khirnov
2024-01-17 13:01 ` Michael Niedermayer
2024-01-17 14:57 ` Anton Khirnov
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 3/8] fftools/cmdutils: drop alt_flags parameter from show_help_options() Anton Khirnov
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 4/8] fftools/ffmpeg_opt: add more structure to long help output Anton Khirnov
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 5/8] fftools/cmdutils: indicate specifiers in option syntax in " Anton Khirnov
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 6/8] fftools/ffmpeg_opt: briefly mention stream specifier " Anton Khirnov
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 7/8] fftools/cmdutils: surround option arguments by <> " Anton Khirnov
2024-01-17 12:40 ` [FFmpeg-devel] [PATCH 8/8] fftools/ffmpeg_opt: improve wording in option descriptions Anton Khirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240117124036.7877-1-anton@khirnov.net \
--to=anton@khirnov.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git