-use std::rc::Rc;
-use std::cell::RefCell;
use nihav_core::formats::YUV420_FORMAT;
use nihav_core::frame::*;
use nihav_core::codecs::{NADecoder, MV, ZERO_MV, DecoderError, DecoderResult, IPBShuffler};
}
struct RealVideo60Decoder {
- info: Rc<NACodecInfo>,
+ info: NACodecInfoRef,
cbs: RV60Codebooks,
ipbs: IPBShuffler,
dsp: RV60DSP,
let vb = vt.get_vbuf();
let avg_buf = vb.unwrap();
RealVideo60Decoder{
- info: Rc::new(DUMMY_CODEC_INFO),
+ info: NACodecInfoRef::default(),
cbs: RV60Codebooks::init(),
ipbs: IPBShuffler::new(),
ipred: IntraPredContext::new(),
}
impl NADecoder for RealVideo60Decoder {
- fn init(&mut self, info: Rc<NACodecInfo>) -> DecoderResult<()> {
+ fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> {
if let NACodecTypeInfo::Video(_vinfo) = info.get_properties() {
let fmt = YUV420_FORMAT;
let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(0, 0, false, fmt));
- self.info = Rc::new(NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()));
+ self.info = NACodecInfo::new_ref(info.get_name(), myinfo, info.get_extradata()).into_ref();
let edata = info.get_extradata().unwrap();
let src: &[u8] = &edata;