| 1307 | #endif |
| 1308 | |
| 1309 | void show_help_default(const char *opt, const char *arg) |
| 1310 | { |
| 1311 | int show_advanced = 0, show_avoptions = 0; |
| 1312 | |
| 1313 | if (opt && *opt) { |
| 1314 | if (!strcmp(opt, "long")) |
| 1315 | show_advanced = 1; |
| 1316 | else if (!strcmp(opt, "full")) |
| 1317 | show_advanced = show_avoptions = 1; |
| 1318 | else |
| 1319 | av_log(NULL, AV_LOG_ERROR, "Unknown help option '%s'.\n", opt); |
| 1320 | } |
| 1321 | |
| 1322 | show_usage(); |
| 1323 | |
| 1324 | printf("Getting help:\n" |
| 1325 | " -h -- print basic options\n" |
| 1326 | " -h long -- print more options\n" |
| 1327 | " -h full -- print all options (including all format and codec specific options, very long)\n" |
| 1328 | " -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol\n" |
| 1329 | " See man %s for detailed description of the options.\n" |
| 1330 | "\n" |
| 1331 | "Per-stream options can be followed by :<stream_spec> to apply that option to specific streams only. " |
| 1332 | "<stream_spec> can be a stream index, or v/a/s for video/audio/subtitle (see manual for full syntax).\n" |
| 1333 | "\n", program_name); |
| 1334 | |
| 1335 | show_help_options(options, "Print help / information / capabilities:", |
| 1336 | OPT_EXIT, OPT_EXPERT); |
| 1337 | if (show_advanced) |
| 1338 | show_help_options(options, "Advanced information / capabilities:", |
| 1339 | OPT_EXIT | OPT_EXPERT, 0); |
| 1340 | |
| 1341 | show_help_options(options, "Global options (affect whole program " |
| 1342 | "instead of just one file):", |
| 1343 | 0, OPT_PERFILE | OPT_EXIT | OPT_EXPERT); |
| 1344 | if (show_advanced) |
| 1345 | show_help_options(options, "Advanced global options:", OPT_EXPERT, |
| 1346 | OPT_PERFILE | OPT_EXIT); |
| 1347 | |
| 1348 | show_help_options(options, "Per-file options (input and output):", |
| 1349 | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT, |
| 1350 | OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_EXPERT | |
| 1351 | OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA); |
| 1352 | if (show_advanced) |
| 1353 | show_help_options(options, "Advanced per-file options (input and output):", |
| 1354 | OPT_PERFILE | OPT_INPUT | OPT_OUTPUT | OPT_EXPERT, |
| 1355 | OPT_EXIT | OPT_FLAG_PERSTREAM | |
| 1356 | OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA); |
| 1357 | |
| 1358 | show_help_options(options, "Per-file options (input-only):", |
| 1359 | OPT_PERFILE | OPT_INPUT, |
| 1360 | OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_OUTPUT | OPT_EXPERT | |
| 1361 | OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA); |
| 1362 | if (show_advanced) |
| 1363 | show_help_options(options, "Advanced per-file options (input-only):", |
| 1364 | OPT_PERFILE | OPT_INPUT | OPT_EXPERT, |
| 1365 | OPT_EXIT | OPT_FLAG_PERSTREAM | OPT_OUTPUT | |
| 1366 | OPT_VIDEO | OPT_AUDIO | OPT_SUBTITLE | OPT_DATA); |
nothing calls this directly
no test coverage detected