From b914ee01a678df890f66d7e7c63dde8f43ec6a80 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 10 Dec 2019 18:44:52 +0100 Subject: [PATCH] core/frame: add get_num_components() call to NAVideoBuffer --- nihav-core/src/frame.rs | 1 + 1 file changed, 1 insertion(+) 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()); -- 2.30.2