frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ for pair in self.pairs.iter_mut() {
+ pair.ics[0].delay = [0.0; 1024];
+ pair.ics[1].delay = [0.0; 1024];
+ }
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ for ch_data in self.ch_data.iter_mut() {
+ ch_data.delay = [0.0; 1024];
+ ch_data.qmf_delay = [0.0; 64 * 3];
+ }
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
}
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.frmmgr.clear();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.delay = [[0.0; BLOCK_LEN]; MAX_CHANNELS + 1];
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
pub trait NADecoder {
fn init(&mut self, supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()>;
fn decode(&mut self, supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult<NAFrameRef>;
+ fn flush(&mut self);
}
#[derive(Clone,Copy)]
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_dk3() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_500() -> Box<dyn NADecoder> {
frm.set_frame_type(if is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.lastframe.reset();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(if is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(if self.is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(FrameType::I);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(if self.is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.shuf.clear();
+ }
}
pub fn get_decoder_vp3() -> Box<NADecoder> {
frm.set_frame_type(ftype);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
pub fn get_decoder() -> Box<NADecoder> {
self.set_dimensions(vinfo.get_width(), vinfo.get_height());
Ok(())
}
+ pub fn flush(&mut self) {
+ self.shuf.clear();
+ }
pub fn decode_frame(&mut self, supp: &mut NADecoderSupport, src: &[u8], br: &mut dyn VP56Parser) -> DecoderResult<(NABufferType, FrameType)> {
let aoffset;
let mut bc;
frm.set_frame_type(ftype);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
pub fn get_decoder_vp6() -> Box<NADecoder> {
frm.set_frame_type(if self.dstate.is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.shuf.clear();
+ }
}
pub fn get_decoder() -> Box<NADecoder> {
frm.set_frame_type(if is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_audio() -> Box<dyn NADecoder> {
frm.set_frame_type(if self.is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_audio() -> Box<dyn NADecoder> {
frm.set_frame_type(if is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_video() -> Box<dyn NADecoder> {
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_audio() -> Box<dyn NADecoder> {
frm.set_frame_type(if is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.hams.clear();
+ }
}
frm.set_frame_type(if is_intra { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.hams.clear();
+ }
}
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_audio() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_imc() -> Box<dyn NADecoder> {
Ok(frm.into_ref())
}
}
+ fn flush(&mut self) {
+ self.frmmgr.clear();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(if intraframe { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.bufs.reset();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(self.dec.get_frame_type());
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
const INDEO4_PICTURE_SIZE_TAB: [[usize; 2]; 7] = [
frm.set_frame_type(self.dec.get_frame_type());
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
const INDEO5_PICTURE_SIZE_TAB: [[usize; 2]; 15] = [
frm.set_frame_type(if self.dec.is_intra() { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
res
}
+ pub fn flush(&mut self) {
+ self.prev_frame = MISSING_REF;
+ self.next_frame = MISSING_REF;
+ self.iref_0 = MISSING_REF;
+ self.iref_1 = MISSING_REF;
+ self.scal_ref = MISSING_REF;
+ }
+
pub fn is_intra(&self) -> bool {
self.ftype.is_intra()
}
frm.set_frame_type(if self.key_frame { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.ips.clear();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ self.delay = [[0.0; 256]; 2];
+ }
}
pub fn get_decoder_dct() -> Box<dyn NADecoder> {
frm.set_frame_type(FrameType::P);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.ips.clear();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(ftype);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_video() -> Box<dyn NADecoder> {
Err(DecoderError::InvalidData)
}
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder_audio() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ for pair in self.pairs.iter_mut() {
+ pair.delay = [[0.0; MAX_SAMPLES]; 2];
+ }
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_keyframe(true);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(if self.dec.is_intra() { FrameType::I } else { FrameType::P });
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
frm.set_frame_type(self.dec.get_frame_type());
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
struct MBB { blocks: usize, bits: u8 }
frm.set_frame_type(ftype);//if ftype == FrameType::B { FrameType::Skip } else { ftype } );
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
Ok((NABufferType::Video(buf), hdr0.ftype, ts))
}
+ pub fn flush(&mut self) {
+ self.ipbs.clear();
+ }
}
frm.set_pts(Some(ts));
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.dec.flush();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {
frm.set_frame_type(hdr.ftype);
Ok(frm.into_ref())
}
+ fn flush(&mut self) {
+ self.ipbs.clear();
+ }
}
pub fn get_decoder() -> Box<dyn NADecoder> {