];
const ROOT_CHUNK_HANDLERS: &[RootChunkHandler] = &[
+ RootChunkHandler { ctype: mktag!(b"ftyp"), parse: read_ftyp },
RootChunkHandler { ctype: mktag!(b"mdat"), parse: read_mdat },
RootChunkHandler { ctype: mktag!(b"moov"), parse: read_moov },
];
Ok(size)
}
+fn read_ftyp(dmx: &mut MOVDemuxer, _strmgr: &mut StreamManager, size: u64) -> DemuxerResult<u64> {
+ dmx.src.skip64(size)?;
+ Ok(size)
+}
+
fn read_mdat(dmx: &mut MOVDemuxer, _strmgr: &mut StreamManager, size: u64) -> DemuxerResult<u64> {
dmx.mdat_pos = dmx.src.tell();
dmx.mdat_size = size;
RootChunkHandler { ctype: mktag!(b"mvhd"), parse: read_mvhd },
RootChunkHandler { ctype: mktag!(b"ctab"), parse: read_ctab },
RootChunkHandler { ctype: mktag!(b"trak"), parse: read_trak },
+ RootChunkHandler { ctype: mktag!(b"meta"), parse: read_meta },
];
fn read_mvhd(dmx: &mut MOVDemuxer, _strmgr: &mut StreamManager, size: u64) -> DemuxerResult<u64> {
read_palette(&mut dmx.src, size, &mut dmx.pal)
}
+fn read_meta(dmx: &mut MOVDemuxer, _strmgr: &mut StreamManager, size: u64) -> DemuxerResult<u64> {
+ dmx.src.skip64(size)?;
+ Ok(size)
+}
+
fn read_trak(dmx: &mut MOVDemuxer, strmgr: &mut StreamManager, size: u64) -> DemuxerResult<u64> {
let mut track = Track::new(dmx.cur_track as u32, dmx.tb_den);
track.read_trak(&mut dmx.src, size)?;