use codec name in info
[nihav.git] / src / frame.rs
index 962198e84df7afba64412a1a179d2bf9c64dc326..7455b72a393bd298819b054a680a2d0187f60fc3 100644 (file)
@@ -73,17 +73,18 @@ pub struct NABuffer<'a> {
 #[allow(dead_code)]
 #[derive(Clone)]
 pub struct NACodecInfo {
+    name:       &'static str,
     properties: NACodecTypeInfo,
     extradata:  Option<Rc<Vec<u8>>>,
 }
 
 impl NACodecInfo {
-    pub fn new(p: NACodecTypeInfo, edata: Option<Vec<u8>>) -> Self {
+    pub fn new(name: &'static str, p: NACodecTypeInfo, edata: Option<Vec<u8>>) -> Self {
         let extradata = match edata {
             None => None,
             Some(vec) => Some(Rc::new(vec)),
         };
-        NACodecInfo { properties: p, extradata: extradata }
+        NACodecInfo { name: name, properties: p, extradata: extradata }
     }
     pub fn get_properties(&self) -> NACodecTypeInfo { self.properties }
     pub fn get_extradata(&self) -> Option<Rc<Vec<u8>>> {