• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/ffmpeg-0.5.1/libavformat/

Lines Matching defs:atom

153     MOVFragment fragment; ///< current fragment in moof atom
162 /* those functions parse an atom */
164 0: continue to parse next atom
167 /* links atom IDs to parse functions */
170 int (*parse)(MOVContext *ctx, ByteIOContext *pb, MOVAtom atom);
175 static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
182 a.offset = atom.offset;
184 if (atom.size < 0)
185 atom.size = INT64_MAX;
186 while(((total_size + 8) < atom.size) && !url_feof(pb) && !err) {
187 a.size = atom.size;
189 if(atom.size >= 8) {
196 a.type, (char*)&a.type, a.size, atom.size, total_size);
203 a.size = atom.size - total_size;
210 a.size = FFMIN(a.size, atom.size - total_size);
225 if (left > 0) /* skip garbage at atom end */
233 if (!err && total_size < atom.size && atom.size < 0x7ffff)
234 url_fskip(pb, atom.size - total_size);
239 static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
314 static int mov_read_hdlr(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
346 if(atom.size <= 24)
349 url_fskip(pb, atom.size - (url_ftell(pb) - atom.offset));
387 static int mov_read_esds(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
448 static int mov_read_pasp(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
462 "sample aspect ratio already set to %d:%d, overriding by 'pasp' atom\n",
470 /* this atom contains actual media data */
471 static int mov_read_mdat(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
473 if(atom.size == 0) /* wrong one (MP4) */
479 static int mov_read_ftyp(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
487 url_fskip(pb, atom.size - 8);
491 /* this atom should contain all header atoms */
492 static int mov_read_moov(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
494 if (mov_read_default(c, pb, atom) < 0)
496 /* we parsed the 'moov' atom, we can terminate the parsing as soon as we find the 'mdat' */
502 static int mov_read_moof(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
506 return mov_read_default(c, pb, atom);
509 static int mov_read_mdhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
546 static int mov_read_mvhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
582 static int mov_read_smi(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
590 if((uint64_t)atom.size > (1<<30))
596 st->codec->extradata = av_mallocz(atom.size + 0x5a + FF_INPUT_BUFFER_PADDING_SIZE);
599 st->codec->extradata_size = 0x5a + atom.size;
601 get_buffer(pb, st->codec->extradata + 0x5a, atom.size);
602 dprintf(c->fc, "Reading SMI %"PRId64" %s\n", atom.size, st->codec->extradata + 0x5a);
606 static int mov_read_enda(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
638 /* FIXME modify qdm2/svq3/h264 decoders to take full atom as extradata */
639 static int mov_read_extradata(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
648 size= (uint64_t)st->codec->extradata_size + atom.size + 8 + FF_INPUT_BUFFER_PADDING_SIZE;
649 if(size > INT_MAX || (uint64_t)atom.size > INT_MAX)
657 AV_WB32( buf , atom.size + 8);
658 AV_WL32( buf + 4, atom.type);
659 get_buffer(pb, buf + 8, atom.size);
663 static int mov_read_wave(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
671 if((uint64_t)atom.size > (1<<30))
675 // pass all frma atom to codec, needed at least for QDM2
677 st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE);
680 st->codec->extradata_size = atom.size;
681 get_buffer(pb, st->codec->extradata, atom.size);
682 } else if (atom.size > 8) { /* to read frma, esds atoms */
683 if (mov_read_default(c, pb, atom) < 0)
686 url_fskip(pb, atom.size);
691 * This function reads atom content and puts data in extradata without tag
694 static int mov_read_glbl(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
702 if((uint64_t)atom.size > (1<<30))
706 st->codec->extradata = av_mallocz(atom.size + FF_INPUT_BUFFER_PADDING_SIZE);
709 st->codec->extradata_size = atom.size;
710 get_buffer(pb, st->codec->extradata, atom.size);
714 static int mov_read_stco(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
738 if (atom.type == MKTAG('s','t','c','o'))
741 else if (atom.type == MKTAG('c','o','6','4'))
785 static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1038 // color, fonts, and default styles, so fake an atom to read it
1112 static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1145 static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1177 static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1213 static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1262 static int mov_read_ctts(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1416 static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1431 if ((ret = mov_read_default(c, pb, atom)) < 0)
1494 static int mov_read_ilst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1498 ret = mov_read_default(c, pb, atom);
1503 static int mov_read_meta(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1506 atom.size -= 4;
1507 return mov_read_default(c, pb, atom);
1510 static int mov_read_trkn(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1517 dprintf(c->fc, "%.4s %s\n", (char*)&atom.type, track);
1521 static int mov_read_udta_string(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1534 atom.size -= 16;
1539 atom.size -= 4;
1541 switch (atom.type) {
1557 if (atom.size < 0)
1560 str_size = FFMIN3(sizeof(str)-1, str_size, atom.size);
1568 dprintf(c->fc, "%.4s %s %d %lld\n", (char*)&atom.type, str, str_size, atom.size);
1572 static int mov_read_tkhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1652 static int mov_read_tfhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1687 static int mov_read_trex(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1708 static int mov_read_trun(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1778 /* this atom should be null (from specs), but some buggy files put the 'moov' atom inside it... */
1781 static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1785 if (atom.size < 8)
1787 if (get_be32(pb) != 0) { /* 0 sized mdat atom... use the 'wide' atom size */
1788 url_fskip(pb, atom.size - 4);
1791 atom.type = get_le32(pb);
1792 atom.offset += 8;
1793 atom.size -= 8;
1794 if (atom.type != MKTAG('m','d','a','t')) {
1795 url_fskip(pb, atom.size);
1798 err = mov_read_mdat(c, pb, atom);
1802 static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1811 get_be32(pb); /* dcom atom */
1815 av_log(c->fc, AV_LOG_ERROR, "unknown compression for cmov atom !");
1818 get_be32(pb); /* cmvd atom */
1822 cmov_len = atom.size - 6 * 4;
1837 atom.type = MKTAG('m','o','o','v');
1838 atom.offset = 0;
1839 atom.size = moov_len;
1843 ret = mov_read_default(c, &ctx, atom);
1854 /* edit list atom */
1855 static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
1912 { MKTAG('a','l','a','c'), mov_read_extradata }, /* alac specific atom */
2000 MOVAtom atom = { 0, 0, 0 };
2005 atom.size = url_fsize(pb);
2007 atom.size = INT64_MAX;
2010 if ((err = mov_read_default(mov, pb, atom)) < 0) {
2015 av_log(s, AV_LOG_ERROR, "moov atom not found\n");