MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / show_help_codec

Function show_help_codec

fftools/opt_common.c:392–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392static 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
428static void show_help_demuxer(const char *name)
429{

Callers 1

show_helpFunction · 0.85

Calls 6

av_logFunction · 0.85
print_codecFunction · 0.85
next_codec_for_idFunction · 0.85

Tested by

no test coverage detected