introduce NADecoderSupport and buffer pools
[nihav.git] / nihav-realmedia / src / codecs / rv40.rs
index eb45164401e6ed50127968d7f9549f995ba0e793..62fafba8056c91f0bb0fa8fca5ad96bfb857cda1 100644 (file)
@@ -314,7 +314,7 @@ impl RealVideo40Decoder {
 }
 
 impl NADecoder for RealVideo40Decoder {
-    fn init(&mut self, info: NACodecInfoRef) -> DecoderResult<()> {
+    fn init(&mut self, _supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()> {
         if let NACodecTypeInfo::Video(vinfo) = info.get_properties() {
             let fmt = formats::YUV420_FORMAT;
             let myinfo = NACodecTypeInfo::Video(NAVideoInfo::new(0, 0, false, fmt));
@@ -337,7 +337,7 @@ println!("???");
             Err(DecoderError::InvalidData)
         }
     }
-    fn decode(&mut self, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
+    fn decode(&mut self, _supp: &mut NADecoderSupport, pkt: &NAPacket) -> DecoderResult<NAFrameRef> {
         let src = pkt.get_buffer();
 
         let (bufinfo, ftype, ts) = self.dec.parse_frame(src.as_slice(), &mut self.bd)?;
@@ -346,7 +346,7 @@ println!("???");
         frm.set_keyframe(ftype == FrameType::I);
         frm.set_frame_type(ftype);
         frm.set_pts(Some(ts));
-        Ok(Rc::new(RefCell::new(frm)))
+        Ok(frm.into_ref())
     }
 }