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

Function show_codecs

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

Source from the content-addressed store, hash-verified

1493}
1494
1495int show_codecs(void *optctx, const char *opt, const char *arg)
1496{
1497 const AVCodecDescriptor **codecs;
1498 unsigned i, nb_codecs = get_codecs_sorted(&codecs);
1499
1500 printf("Codecs:\n"
1501 " D..... = Decoding supported\n"
1502 " .E.... = Encoding supported\n"
1503 " ..V... = Video codec\n"
1504 " ..A... = Audio codec\n"
1505 " ..S... = Subtitle codec\n"
1506 " ...I.. = Intra frame-only codec\n"
1507 " ....L. = Lossy compression\n"
1508 " .....S = Lossless compression\n"
1509 " -------\n");
1510 for (i = 0; i < nb_codecs; i++) {
1511 const AVCodecDescriptor *desc = codecs[i];
1512 const AVCodec *codec = NULL;
1513
1514 if (strstr(desc->name, "_deprecated"))
1515 continue;
1516
1517 printf(" ");
1518 printf(avcodec_find_decoder(desc->id) ? "D" : ".");
1519 printf(avcodec_find_encoder(desc->id) ? "E" : ".");
1520
1521 printf("%c", get_media_type_char(desc->type));
1522 printf((desc->props & AV_CODEC_PROP_INTRA_ONLY) ? "I" : ".");
1523 printf((desc->props & AV_CODEC_PROP_LOSSY) ? "L" : ".");
1524 printf((desc->props & AV_CODEC_PROP_LOSSLESS) ? "S" : ".");
1525
1526 printf(" %-20s %s", desc->name, desc->long_name ? desc->long_name : "");
1527
1528 /* print decoders/encoders when there's more than one or their
1529 * names are different from codec name */
1530 while ((codec = next_codec_for_id(desc->id, codec, 0))) {
1531 if (strcmp(codec->name, desc->name)) {
1532 print_codecs_for_id(desc->id, 0);
1533 break;
1534 }
1535 }
1536 codec = NULL;
1537 while ((codec = next_codec_for_id(desc->id, codec, 1))) {
1538 if (strcmp(codec->name, desc->name)) {
1539 print_codecs_for_id(desc->id, 1);
1540 break;
1541 }
1542 }
1543
1544 printf("\n");
1545 }
1546 av_free(codecs);
1547 return 0;
1548}
1549
1550static void print_codecs(int encoder)
1551{

Callers

nothing calls this directly

Calls 4

get_codecs_sortedFunction · 0.85
get_media_type_charFunction · 0.85
next_codec_for_idFunction · 0.85
print_codecs_for_idFunction · 0.85

Tested by

no test coverage detected