Mercurial > libavformat.hg
comparison mov.c @ 2837:1caef0e2fb46 libavformat
supports glbl atom containing generic extradata for all codecs
author | bcoudurier |
---|---|
date | Wed, 19 Dec 2007 15:39:10 +0000 |
parents | 24ad70087e67 |
children | cb12e3352bf5 |
comparison
equal
deleted
inserted
replaced
2836:e043e56e6e6c | 2837:1caef0e2fb46 |
---|---|
503 } else | 503 } else |
504 url_fskip(pb, atom.size); | 504 url_fskip(pb, atom.size); |
505 return 0; | 505 return 0; |
506 } | 506 } |
507 | 507 |
508 static int mov_read_avcC(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) | 508 /** |
509 * This function reads atom content and puts data in extradata without tag | |
510 * nor size unlike mov_read_extradata. | |
511 */ | |
512 static int mov_read_glbl(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom) | |
509 { | 513 { |
510 AVStream *st = c->fc->streams[c->fc->nb_streams-1]; | 514 AVStream *st = c->fc->streams[c->fc->nb_streams-1]; |
511 | 515 |
512 if((uint64_t)atom.size > (1<<30)) | 516 if((uint64_t)atom.size > (1<<30)) |
513 return -1; | 517 return -1; |
1225 { MKTAG( 'e', 'd', 't', 's' ), mov_read_default }, | 1229 { MKTAG( 'e', 'd', 't', 's' ), mov_read_default }, |
1226 { MKTAG( 'e', 'l', 's', 't' ), mov_read_elst }, | 1230 { MKTAG( 'e', 'l', 's', 't' ), mov_read_elst }, |
1227 { MKTAG( 'e', 'n', 'd', 'a' ), mov_read_enda }, | 1231 { MKTAG( 'e', 'n', 'd', 'a' ), mov_read_enda }, |
1228 { MKTAG( 'f', 'i', 'e', 'l' ), mov_read_extradata }, | 1232 { MKTAG( 'f', 'i', 'e', 'l' ), mov_read_extradata }, |
1229 { MKTAG( 'f', 't', 'y', 'p' ), mov_read_ftyp }, | 1233 { MKTAG( 'f', 't', 'y', 'p' ), mov_read_ftyp }, |
1234 { MKTAG( 'g', 'l', 'b', 'l' ), mov_read_glbl }, | |
1230 { MKTAG( 'h', 'd', 'l', 'r' ), mov_read_hdlr }, | 1235 { MKTAG( 'h', 'd', 'l', 'r' ), mov_read_hdlr }, |
1231 { MKTAG( 'j', 'p', '2', 'h' ), mov_read_extradata }, | 1236 { MKTAG( 'j', 'p', '2', 'h' ), mov_read_extradata }, |
1232 { MKTAG( 'm', 'd', 'a', 't' ), mov_read_mdat }, | 1237 { MKTAG( 'm', 'd', 'a', 't' ), mov_read_mdat }, |
1233 { MKTAG( 'm', 'd', 'h', 'd' ), mov_read_mdhd }, | 1238 { MKTAG( 'm', 'd', 'h', 'd' ), mov_read_mdhd }, |
1234 { MKTAG( 'm', 'd', 'i', 'a' ), mov_read_default }, | 1239 { MKTAG( 'm', 'd', 'i', 'a' ), mov_read_default }, |
1235 { MKTAG( 'm', 'i', 'n', 'f' ), mov_read_default }, | 1240 { MKTAG( 'm', 'i', 'n', 'f' ), mov_read_default }, |
1236 { MKTAG( 'm', 'o', 'o', 'v' ), mov_read_moov }, | 1241 { MKTAG( 'm', 'o', 'o', 'v' ), mov_read_moov }, |
1237 { MKTAG( 'm', 'v', 'h', 'd' ), mov_read_mvhd }, | 1242 { MKTAG( 'm', 'v', 'h', 'd' ), mov_read_mvhd }, |
1238 { MKTAG( 'S', 'M', 'I', ' ' ), mov_read_smi }, /* Sorenson extension ??? */ | 1243 { MKTAG( 'S', 'M', 'I', ' ' ), mov_read_smi }, /* Sorenson extension ??? */ |
1239 { MKTAG( 'a', 'l', 'a', 'c' ), mov_read_extradata }, /* alac specific atom */ | 1244 { MKTAG( 'a', 'l', 'a', 'c' ), mov_read_extradata }, /* alac specific atom */ |
1240 { MKTAG( 'a', 'v', 'c', 'C' ), mov_read_avcC }, | 1245 { MKTAG( 'a', 'v', 'c', 'C' ), mov_read_glbl }, |
1241 { MKTAG( 's', 't', 'b', 'l' ), mov_read_default }, | 1246 { MKTAG( 's', 't', 'b', 'l' ), mov_read_default }, |
1242 { MKTAG( 's', 't', 'c', 'o' ), mov_read_stco }, | 1247 { MKTAG( 's', 't', 'c', 'o' ), mov_read_stco }, |
1243 { MKTAG( 's', 't', 's', 'c' ), mov_read_stsc }, | 1248 { MKTAG( 's', 't', 's', 'c' ), mov_read_stsc }, |
1244 { MKTAG( 's', 't', 's', 'd' ), mov_read_stsd }, /* sample description */ | 1249 { MKTAG( 's', 't', 's', 'd' ), mov_read_stsd }, /* sample description */ |
1245 { MKTAG( 's', 't', 's', 's' ), mov_read_stss }, /* sync sample */ | 1250 { MKTAG( 's', 't', 's', 's' ), mov_read_stss }, /* sync sample */ |