| 3095 | } |
| 3096 | |
| 3097 | void show_help_default(const char *opt, const char *arg) |
| 3098 | { |
| 3099 | /* per-file options have at least one of those set */ |
| 3100 | const int per_file = OPT_SPEC | OPT_OFFSET | OPT_PERFILE; |
| 3101 | int show_advanced = 0, show_avoptions = 0; |
| 3102 | |
| 3103 | if (opt && *opt) { |
| 3104 | if (!strcmp(opt, "long")) |
| 3105 | show_advanced = 1; |
| 3106 | else if (!strcmp(opt, "full")) |
| 3107 | show_advanced = show_avoptions = 1; |
| 3108 | else |
| 3109 | av_log(NULL, AV_LOG_ERROR, "Unknown help option '%s'.\n", opt); |
| 3110 | } |
| 3111 | |
| 3112 | show_usage(); |
| 3113 | |
| 3114 | printf("Getting help:\n" |
| 3115 | " -h -- print basic options\n" |
| 3116 | " -h long -- print more options\n" |
| 3117 | " -h full -- print all options (including all format and codec specific options, very long)\n" |
| 3118 | " -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter\n" |
| 3119 | " See man %s for detailed description of the options.\n" |
| 3120 | "\n", program_name); |
| 3121 | |
| 3122 | show_help_options(options, "Print help / information / capabilities:", |
| 3123 | OPT_EXIT, 0, 0); |
| 3124 | |
| 3125 | show_help_options(options, "Global options (affect whole program " |
| 3126 | "instead of just one file:", |
| 3127 | 0, per_file | OPT_EXIT | OPT_EXPERT, 0); |
| 3128 | if (show_advanced) |
| 3129 | show_help_options(options, "Advanced global options:", OPT_EXPERT, |
| 3130 | per_file | OPT_EXIT, 0); |
| 3131 | |
| 3132 | show_help_options(options, "Per-file main options:", 0, |
| 3133 | OPT_EXPERT | OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE | |
| 3134 | OPT_EXIT, per_file); |
| 3135 | if (show_advanced) |
| 3136 | show_help_options(options, "Advanced per-file options:", |
| 3137 | OPT_EXPERT, OPT_AUDIO | OPT_VIDEO | OPT_SUBTITLE, per_file); |
| 3138 | |
| 3139 | show_help_options(options, "Video options:", |
| 3140 | OPT_VIDEO, OPT_EXPERT | OPT_AUDIO, 0); |
| 3141 | if (show_advanced) |
| 3142 | show_help_options(options, "Advanced Video options:", |
| 3143 | OPT_EXPERT | OPT_VIDEO, OPT_AUDIO, 0); |
| 3144 | |
| 3145 | show_help_options(options, "Audio options:", |
| 3146 | OPT_AUDIO, OPT_EXPERT | OPT_VIDEO, 0); |
| 3147 | if (show_advanced) |
| 3148 | show_help_options(options, "Advanced Audio options:", |
| 3149 | OPT_EXPERT | OPT_AUDIO, OPT_VIDEO, 0); |
| 3150 | show_help_options(options, "Subtitle options:", |
| 3151 | OPT_SUBTITLE, 0, 0); |
| 3152 | printf("\n"); |
| 3153 | |
| 3154 | if (show_avoptions) { |
no test coverage detected