| 390 | } |
| 391 | |
| 392 | static void show_help_codec(const char *name, int encoder) |
| 393 | { |
| 394 | const AVCodecDescriptor *desc; |
| 395 | const AVCodec *codec; |
| 396 | |
| 397 | if (!name) { |
| 398 | av_log(NULL, AV_LOG_ERROR, "No codec name specified.\n"); |
| 399 | return; |
| 400 | } |
| 401 | |
| 402 | codec = encoder ? avcodec_find_encoder_by_name(name) : |
| 403 | avcodec_find_decoder_by_name(name); |
| 404 | |
| 405 | if (codec) |
| 406 | print_codec(codec); |
| 407 | else if ((desc = avcodec_descriptor_get_by_name(name))) { |
| 408 | void *iter = NULL; |
| 409 | int printed = 0; |
| 410 | |
| 411 | while ((codec = next_codec_for_id(desc->id, &iter, encoder))) { |
| 412 | printed = 1; |
| 413 | print_codec(codec); |
| 414 | } |
| 415 | |
| 416 | if (!printed) { |
| 417 | av_log(NULL, AV_LOG_ERROR, "Codec '%s' is known to FFmpeg, " |
| 418 | "but no %s for it are available. FFmpeg might need to be " |
| 419 | "recompiled with additional external libraries.\n", |
| 420 | name, encoder ? "encoders" : "decoders"); |
| 421 | } |
| 422 | } else { |
| 423 | av_log(NULL, AV_LOG_ERROR, "Codec '%s' is not recognized by FFmpeg.\n", |
| 424 | name); |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | static void show_help_demuxer(const char *name) |
| 429 | { |
no test coverage detected