| 1756 | } |
| 1757 | |
| 1758 | static 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 | |
| 1793 | static void show_help_demuxer(const char *name) |
| 1794 | { |
no test coverage detected