X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-core%2Fsrc%2Fframe.rs;h=3af0d1d1af3ba09c11272b4d50702f11695779cf;hb=e64739f87a35f29be0bbbce366876180ba3eb57e;hp=697013c442a99d653004bcc4a593f1feb8ab1753;hpb=df159213f11b19739b8e7c8d5ec4e8318cdcef24;p=nihav.git diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs index 697013c..3af0d1d 100644 --- a/nihav-core/src/frame.rs +++ b/nihav-core/src/frame.rs @@ -118,6 +118,7 @@ impl NAVideoBuffer { pub fn get_info(&self) -> NAVideoInfo { self.info } pub fn get_data(&self) -> &Vec { self.data.as_ref() } pub fn get_data_mut(&mut self) -> Option<&mut Vec> { self.data.as_mut() } + pub fn get_num_components(&self) -> usize { self.offs.len() } pub fn copy_buffer(&mut self) -> Self { let mut data: Vec = Vec::with_capacity(self.data.len()); data.clone_from(self.data.as_ref());