forked from FFmpeg/FFmpeg
fftools/cmdutils: drop alt_flags parameter from show_help_options()
No user sets it to more than one flag, so it is redundant with req_flags.
This commit is contained in:
parent
03aedbdd40
commit
67529ad8a4
5 changed files with 19 additions and 21 deletions
|
@ -108,7 +108,7 @@ int parse_number(const char *context, const char *numstr, enum OptionType type,
|
|||
}
|
||||
|
||||
void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
int rej_flags, int alt_flags)
|
||||
int rej_flags)
|
||||
{
|
||||
const OptionDef *po;
|
||||
int first;
|
||||
|
@ -118,7 +118,6 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
|||
char buf[128];
|
||||
|
||||
if (((po->flags & req_flags) != req_flags) ||
|
||||
(alt_flags && !(po->flags & alt_flags)) ||
|
||||
(po->flags & rej_flags))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -200,10 +200,9 @@ typedef struct OptionDef {
|
|||
* @param msg title of this group. Only printed if at least one option matches.
|
||||
* @param req_flags print only options which have all those flags set.
|
||||
* @param rej_flags don't print options which have any of those flags set.
|
||||
* @param alt_flags print only options that have at least one of those flags set
|
||||
*/
|
||||
void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
int rej_flags, int alt_flags);
|
||||
int rej_flags);
|
||||
|
||||
/**
|
||||
* Show help for all options with given flags in class and all its
|
||||
|
|
|
@ -1198,46 +1198,46 @@ void show_help_default(const char *opt, const char *arg)
|
|||
"\n", program_name);
|
||||
|
||||
show_help_options(options, "Print help / information / capabilities:",
|
||||
OPT_EXIT, OPT_EXPERT, 0);
|
||||
OPT_EXIT, OPT_EXPERT);
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Advanced information / capabilities:",
|
||||
OPT_EXIT | OPT_EXPERT, 0, 0);
|
||||
OPT_EXIT | OPT_EXPERT, 0);
|
||||
|
||||
show_help_options(options, "Global options (affect whole program "
|
||||
"instead of just one file):",
|
||||
0, OPT_PERFILE | OPT_EXIT | OPT_EXPERT, 0);
|
||||
0, OPT_PERFILE | OPT_EXIT | OPT_EXPERT);
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Advanced global options:", OPT_EXPERT,
|
||||
OPT_PERFILE | OPT_EXIT, 0);
|
||||
OPT_PERFILE | OPT_EXIT);
|
||||
|
||||
show_help_options(options, "Per-file main options:", 0,
|
||||
show_help_options(options, "Per-file main options:", OPT_PERFILE,
|
||||
OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | OPT_DATA |
|
||||
OPT_EXIT, OPT_PERFILE);
|
||||
OPT_EXIT);
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Advanced per-file options:",
|
||||
OPT_EXPERT, OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE, OPT_PERFILE);
|
||||
OPT_EXPERT | OPT_PERFILE, OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE);
|
||||
|
||||
show_help_options(options, "Video options:",
|
||||
OPT_VIDEO, OPT_EXPERT | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA, 0);
|
||||
OPT_VIDEO, OPT_EXPERT | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Advanced Video options:",
|
||||
OPT_EXPERT | OPT_VIDEO, OPT_AUDIO | OPT_SUBTITLE | OPT_DATA, 0);
|
||||
OPT_EXPERT | OPT_VIDEO, OPT_AUDIO | OPT_SUBTITLE | OPT_DATA);
|
||||
|
||||
show_help_options(options, "Audio options:",
|
||||
OPT_AUDIO, OPT_EXPERT | OPT_VIDEO | OPT_SUBTITLE | OPT_DATA, 0);
|
||||
OPT_AUDIO, OPT_EXPERT | OPT_VIDEO | OPT_SUBTITLE | OPT_DATA);
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Advanced Audio options:",
|
||||
OPT_EXPERT | OPT_AUDIO, OPT_VIDEO | OPT_SUBTITLE | OPT_DATA, 0);
|
||||
OPT_EXPERT | OPT_AUDIO, OPT_VIDEO | OPT_SUBTITLE | OPT_DATA);
|
||||
|
||||
show_help_options(options, "Subtitle options:",
|
||||
OPT_SUBTITLE, OPT_EXPERT | OPT_VIDEO | OPT_AUDIO | OPT_DATA, 0);
|
||||
OPT_SUBTITLE, OPT_EXPERT | OPT_VIDEO | OPT_AUDIO | OPT_DATA);
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Advanced Subtitle options:",
|
||||
OPT_EXPERT | OPT_SUBTITLE, OPT_VIDEO | OPT_AUDIO | OPT_DATA, 0);
|
||||
OPT_EXPERT | OPT_SUBTITLE, OPT_VIDEO | OPT_AUDIO | OPT_DATA);
|
||||
|
||||
if (show_advanced)
|
||||
show_help_options(options, "Data stream options:",
|
||||
OPT_DATA, OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE, 0);
|
||||
OPT_DATA, OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE);
|
||||
printf("\n");
|
||||
|
||||
if (show_avoptions) {
|
||||
|
|
|
@ -3705,8 +3705,8 @@ void show_help_default(const char *opt, const char *arg)
|
|||
{
|
||||
av_log_set_callback(log_callback_help);
|
||||
show_usage();
|
||||
show_help_options(options, "Main options:", 0, OPT_EXPERT, 0);
|
||||
show_help_options(options, "Advanced options:", OPT_EXPERT, 0, 0);
|
||||
show_help_options(options, "Main options:", 0, OPT_EXPERT);
|
||||
show_help_options(options, "Advanced options:", OPT_EXPERT, 0);
|
||||
printf("\n");
|
||||
show_help_children(avcodec_get_class(), AV_OPT_FLAG_DECODING_PARAM);
|
||||
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
|
||||
|
|
|
@ -3869,7 +3869,7 @@ void show_help_default(const char *opt, const char *arg)
|
|||
{
|
||||
av_log_set_callback(log_callback_help);
|
||||
show_usage();
|
||||
show_help_options(options, "Main options:", 0, 0, 0);
|
||||
show_help_options(options, "Main options:", 0, 0);
|
||||
printf("\n");
|
||||
|
||||
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
|
||||
|
|
Loading…
Add table
Reference in a new issue