diff mbox series

[FFmpeg-devel,4/8] fftools/ffmpeg_opt: add more structure to long help output

Message ID 20240117124036.7877-4-anton@khirnov.net
State Accepted
Commit 43323c38020665d7b5459b1ed487356c82bcb703
Headers show
Series [FFmpeg-devel,1/8] fftools/cmdutils: hide some information listing options from basic help | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch
yinshiyou/configure_loongarch64 warning Failed to apply patch

Commit Message

Anton Khirnov Jan. 17, 2024, 12:40 p.m. UTC
Split the "Per-file main options" section into
* per-file input and output
* per-file input-only
* per-file output-only
* per-stream
---
 fftools/ffmpeg_opt.c | 43 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 919e1eae46..4abdd457d3 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1209,12 +1209,45 @@  void show_help_default(const char *opt, const char *arg)
         show_help_options(options, "Advanced global options:", OPT_EXPERT,
                           OPT_PERFILE | OPT_EXIT);
 
-    show_help_options(options, "Per-file main options:", OPT_PERFILE,
-                      OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | OPT_DATA |
-                      OPT_EXIT);
+    show_help_options(options, "Per-file options (input and output):",
+                      OPT_PERFILE | OPT_INPUT | OPT_OUTPUT,
+                      OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_EXPERT |
+                      OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
     if (show_advanced)
-        show_help_options(options, "Advanced per-file options:",
-                          OPT_EXPERT | OPT_PERFILE, OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE);
+        show_help_options(options, "Advanced per-file options (input and output):",
+                          OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_EXPERT,
+                          OPT_EXIT | OPT_FLAG_PERSTREAM |
+                          OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
+
+    show_help_options(options, "Per-file options (input-only):",
+                      OPT_PERFILE | OPT_INPUT,
+                      OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_OUTPUT | OPT_EXPERT |
+                      OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
+    if (show_advanced)
+        show_help_options(options, "Advanced per-file options (input-only):",
+                          OPT_PERFILE | OPT_INPUT | OPT_EXPERT,
+                          OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_OUTPUT |
+                          OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
+
+    show_help_options(options, "Per-file options (output-only):",
+                      OPT_PERFILE | OPT_OUTPUT,
+                      OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_INPUT | OPT_EXPERT |
+                      OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
+    if (show_advanced)
+        show_help_options(options, "Advanced per-file options (output-only):",
+                          OPT_PERFILE | OPT_OUTPUT | OPT_EXPERT,
+                          OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_INPUT |
+                          OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
+
+    show_help_options(options, "Per-stream options:",
+                      OPT_FLAG_PERSTREAM,
+                      OPT_EXIT | OPT_EXPERT |
+                      OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
+    if (show_advanced)
+        show_help_options(options, "Advanced per-stream options:",
+                          OPT_FLAG_PERSTREAM | OPT_EXPERT,
+                          OPT_EXIT |
+                          OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
 
     show_help_options(options, "Video options:",
                       OPT_VIDEO, OPT_EXPERT | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);