MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / show_help_codec

Function show_help_codec

ffmpeg-single-cmd/src/main/cpp/cmdutils.c:1758–1791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1756}
1757
1758static void show_help_codec(const char *name, int encoder)
1759{
1760 const AVCodecDescriptor *desc;
1761 const AVCodec *codec;
1762
1763 if (!name) {
1764 av_log(NULL, AV_LOG_ERROR, "No codec name specified.\n");
1765 return;
1766 }
1767
1768 codec = encoder ? avcodec_find_encoder_by_name(name) :
1769 avcodec_find_decoder_by_name(name);
1770
1771 if (codec)
1772 print_codec(codec);
1773 else if ((desc = avcodec_descriptor_get_by_name(name))) {
1774 int printed = 0;
1775
1776 while ((codec = next_codec_for_id(desc->id, codec, encoder))) {
1777 printed = 1;
1778 print_codec(codec);
1779 }
1780
1781 if (!printed) {
1782 av_log(NULL, AV_LOG_ERROR, "Codec '%s' is known to FFmpeg, "
1783 "but no %s for it are available. FFmpeg might need to be "
1784 "recompiled with additional external libraries.\n",
1785 name, encoder ? "encoders" : "decoders");
1786 }
1787 } else {
1788 av_log(NULL, AV_LOG_ERROR, "Codec '%s' is not recognized by FFmpeg.\n",
1789 name);
1790 }
1791}
1792
1793static void show_help_demuxer(const char *name)
1794{

Callers 1

show_helpFunction · 0.85

Calls 2

print_codecFunction · 0.85
next_codec_for_idFunction · 0.85

Tested by

no test coverage detected