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

Function print_codecs

fftools/opt_common.c:731–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729}
730
731static int print_codecs(int encoder)
732{
733 const AVCodecDescriptor **codecs;
734 int i, nb_codecs = get_codecs_sorted(&codecs);
735
736 if (nb_codecs < 0)
737 return nb_codecs;
738
739 printf("%s:\n"
740 " V..... = Video\n"
741 " A..... = Audio\n"
742 " S..... = Subtitle\n"
743 " .F.... = Frame-level multithreading\n"
744 " ..S... = Slice-level multithreading\n"
745 " ...X.. = Codec is experimental\n"
746 " ....B. = Supports draw_horiz_band\n"
747 " .....D = Supports direct rendering method 1\n"
748 " ------\n",
749 encoder ? "Encoders" : "Decoders");
750 for (i = 0; i < nb_codecs; i++) {
751 const AVCodecDescriptor *desc = codecs[i];
752 const AVCodec *codec;
753 void *iter = NULL;
754
755 while ((codec = next_codec_for_id(desc->id, &iter, encoder))) {
756 printf(" %c%c%c%c%c%c",
757 get_media_type_char(desc->type),
758 (codec->capabilities & AV_CODEC_CAP_FRAME_THREADS) ? 'F' : '.',
759 (codec->capabilities & AV_CODEC_CAP_SLICE_THREADS) ? 'S' : '.',
760 (codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) ? 'X' : '.',
761 (codec->capabilities & AV_CODEC_CAP_DRAW_HORIZ_BAND) ? 'B' : '.',
762 (codec->capabilities & AV_CODEC_CAP_DR1) ? 'D' : '.');
763
764 printf(" %-20s %s", codec->name, codec->long_name ? codec->long_name : "");
765 if (strcmp(codec->name, desc->name))
766 printf(" (codec %s)", desc->name);
767
768 printf("\n");
769 }
770 }
771 av_free(codecs);
772 return 0;
773}
774
775int show_decoders(void *optctx, const char *opt, const char *arg)
776{

Callers 2

show_decodersFunction · 0.85
show_encodersFunction · 0.85

Calls 4

get_codecs_sortedFunction · 0.85
next_codec_for_idFunction · 0.85
get_media_type_charFunction · 0.70
av_freeFunction · 0.50

Tested by

no test coverage detected