Mercurial > mplayer.hg
comparison codec-cfg.c @ 4675:d8a577a52437
added informat support (for encoding)
author | alex |
---|---|
date | Tue, 12 Feb 2002 17:33:27 +0000 |
parents | 04880518728d |
children | f6a2d81c52ac |
comparison
equal
deleted
inserted
replaced
4674:5a7eb882bb19 | 4675:d8a577a52437 |
---|---|
133 {"MPES", IMGFMT_MPEGPES}, | 133 {"MPES", IMGFMT_MPEGPES}, |
134 {NULL, 0} | 134 {NULL, 0} |
135 }; | 135 }; |
136 | 136 |
137 | 137 |
138 static int add_to_out(char *sfmt, char *sflags, unsigned int *outfmt, | 138 static int add_to_inout(char *sfmt, char *sflags, unsigned int *outfmt, |
139 unsigned char *outflags) | 139 unsigned char *outflags) |
140 { | 140 { |
141 | 141 |
142 static char *flagstr[] = { | 142 static char *flagstr[] = { |
143 "flip", | 143 "flip", |
498 codec=*codecsp + *nr_codecsp; | 498 codec=*codecsp + *nr_codecsp; |
499 ++*nr_codecsp; | 499 ++*nr_codecsp; |
500 memset(codec,0,sizeof(codecs_t)); | 500 memset(codec,0,sizeof(codecs_t)); |
501 memset(codec->fourcc, 0xff, sizeof(codec->fourcc)); | 501 memset(codec->fourcc, 0xff, sizeof(codec->fourcc)); |
502 memset(codec->outfmt, 0xff, sizeof(codec->outfmt)); | 502 memset(codec->outfmt, 0xff, sizeof(codec->outfmt)); |
503 memset(codec->infmt, 0xff, sizeof(codec->infmt)); | |
503 | 504 |
504 if (get_token(1, 1) < 0) | 505 if (get_token(1, 1) < 0) |
505 goto err_out_parse_error; | 506 goto err_out_parse_error; |
506 for (i = 0; i < *nr_codecsp - 1; i++) { | 507 for (i = 0; i < *nr_codecsp - 1; i++) { |
507 if(( (*codecsp)[i].name!=NULL) && | 508 if(( (*codecsp)[i].name!=NULL) && |
571 goto err_out_parse_error; | 572 goto err_out_parse_error; |
572 } | 573 } |
573 } else if (!strcmp(token[0], "out")) { | 574 } else if (!strcmp(token[0], "out")) { |
574 if (get_token(1, 2) < 0) | 575 if (get_token(1, 2) < 0) |
575 goto err_out_parse_error; | 576 goto err_out_parse_error; |
576 if (!add_to_out(token[0], token[1], codec->outfmt, | 577 if (!add_to_inout(token[0], token[1], codec->outfmt, |
577 codec->outflags)) | 578 codec->outflags)) |
579 goto err_out_print_linenum; | |
580 } else if (!strcmp(token[0], "in")) { | |
581 if (get_token(1, 2) < 0) | |
582 goto err_out_parse_error; | |
583 if (!add_to_inout(token[0], token[1], codec->infmt, | |
584 codec->inflags)) | |
578 goto err_out_print_linenum; | 585 goto err_out_print_linenum; |
579 } else if (!strcmp(token[0], "flags")) { | 586 } else if (!strcmp(token[0], "flags")) { |
580 if (get_token(1, 1) < 0) | 587 if (get_token(1, 1) < 0) |
581 goto err_out_parse_error; | 588 goto err_out_parse_error; |
582 if (!strcmp(token[0], "seekable")) | 589 if (!strcmp(token[0], "seekable")) |