| 490 | } |
| 491 | |
| 492 | void show_codecs(void) |
| 493 | { |
| 494 | AVCodec *p=NULL, *p2; |
| 495 | const char *last_name; |
| 496 | printf( |
| 497 | "Codecs:\n" |
| 498 | " D..... = Decoding supported\n" |
| 499 | " .E.... = Encoding supported\n" |
| 500 | " ..V... = Video codec\n" |
| 501 | " ..A... = Audio codec\n" |
| 502 | " ..S... = Subtitle codec\n" |
| 503 | " ...S.. = Supports draw_horiz_band\n" |
| 504 | " ....D. = Supports direct rendering method 1\n" |
| 505 | " .....T = Supports weird frame truncation\n" |
| 506 | " ------\n"); |
| 507 | last_name= "000"; |
| 508 | for(;;){ |
| 509 | int decode=0; |
| 510 | int encode=0; |
| 511 | int cap=0; |
| 512 | const char *type_str; |
| 513 | |
| 514 | p2=NULL; |
| 515 | while((p= av_codec_next(p))) { |
| 516 | if((p2==NULL || strcmp(p->name, p2->name)<0) && |
| 517 | strcmp(p->name, last_name)>0){ |
| 518 | p2= p; |
| 519 | decode= encode= cap=0; |
| 520 | } |
| 521 | if(p2 && strcmp(p->name, p2->name)==0){ |
| 522 | if(p->decode) decode=1; |
| 523 | if(p->encode) encode=1; |
| 524 | cap |= p->capabilities; |
| 525 | } |
| 526 | } |
| 527 | if(p2==NULL) |
| 528 | break; |
| 529 | last_name= p2->name; |
| 530 | |
| 531 | switch(p2->type) { |
| 532 | case AVMEDIA_TYPE_VIDEO: |
| 533 | type_str = "V"; |
| 534 | break; |
| 535 | case AVMEDIA_TYPE_AUDIO: |
| 536 | type_str = "A"; |
| 537 | break; |
| 538 | case AVMEDIA_TYPE_SUBTITLE: |
| 539 | type_str = "S"; |
| 540 | break; |
| 541 | default: |
| 542 | type_str = "?"; |
| 543 | break; |
| 544 | } |
| 545 | printf( |
| 546 | " %s%s%s%s%s%s %-15s %s", |
| 547 | decode ? "D": (/*p2->decoder ? "d":*/" "), |
| 548 | encode ? "E":" ", |
| 549 | type_str, |
nothing calls this directly
no test coverage detected