#[allow(dead_code)]
struct AVIDemuxer<'a> {
- opened: bool,
src: &'a mut ByteReader<'a>,
cur_frame: Vec<u64>,
num_streams: u8,
#[allow(unused_variables)]
fn open(&mut self, strmgr: &mut StreamManager) -> DemuxerResult<()> {
self.read_header(strmgr)?;
- self.opened = true;
Ok(())
}
fn get_frame(&mut self, strmgr: &mut StreamManager) -> DemuxerResult<NAPacket> {
- if !self.opened { return Err(NoSuchInput); }
if self.movi_size == 0 { return Err(EOF); }
let mut tag: [u8; 4] = [0; 4];
loop {
#[allow(unused_variables)]
fn seek(&mut self, time: u64) -> DemuxerResult<()> {
- if !self.opened { return Err(NoSuchInput); }
Err(NotImplemented)
}
}
AVIDemuxer {
cur_frame: Vec::new(),
num_streams: 0,
- opened: false,
src: io,
size: 0,
movi_size: 0,
#[allow(dead_code)]
struct GremlinVideoDemuxer<'a> {
- opened: bool,
src: &'a mut ByteReader<'a>,
frames: u16,
cur_frame: u16,
self.apacked = (aflags & 8) != 0;
}
self.frames = frames;
- self.opened = true;
self.state = GDVState::NewFrame;
Ok(())
}
#[allow(unused_variables)]
fn get_frame(&mut self, strmgr: &mut StreamManager) -> DemuxerResult<NAPacket> {
- if !self.opened { return Err(DemuxerError::NoSuchInput); }
if self.cur_frame >= self.frames { return Err(DemuxerError::EOF); }
match self.state {
GDVState::NewFrame if self.asize > 0 => { self.read_achunk(strmgr) }
#[allow(unused_variables)]
fn seek(&mut self, time: u64) -> DemuxerResult<()> {
- if !self.opened { return Err(DemuxerError::NoSuchInput); }
Err(DemuxerError::NotImplemented)
}
}
GremlinVideoDemuxer {
cur_frame: 0,
frames: 0,
- opened: false,
asize: 0,
apacked: false,
state: GDVState::NewFrame,