diff --git a/cidre/src/cv/pixel_buffer.rs b/cidre/src/cv/pixel_buffer.rs index ce14b38e..feddf685 100644 --- a/cidre/src/cv/pixel_buffer.rs +++ b/cidre/src/cv/pixel_buffer.rs @@ -61,6 +61,12 @@ impl PixelBuf { unsafe { CVPixelBufferGetBaseAddressOfPlane(self, plane_index) } } + #[doc(alias = "CVPixelBufferGetBytesPerRowOfPlane")] + #[inline] + pub fn plane_bytes_per_row(&self, plane_index: usize) -> usize { + unsafe { CVPixelBufferGetBytesPerRowOfPlane(self, plane_index) } + } + /// ``` /// use cidre::{cv, cg}; /// @@ -666,6 +672,7 @@ extern "C-unwind" { fn CVPixelBufferGetWidthOfPlane(pixel_buffer: &PixelBuf, plane_index: usize) -> usize; fn CVPixelBufferGetHeightOfPlane(pixel_buffer: &PixelBuf, plane_index: usize) -> usize; fn CVPixelBufferGetBaseAddressOfPlane(pixel_buffer: &PixelBuf, plane_index: usize) -> *const u8; + fn CVPixelBufferGetBytesPerRowOfPlane(pixel_buffer: &PixelBuf, plane_index: usize) -> usize; fn CVPixelBufferLockBaseAddress(pixel_buffer: &PixelBuf, lock_flags: LockFlags) -> cv::Return; fn CVPixelBufferUnlockBaseAddress(pixel_buffer: &PixelBuf, lock_flags: LockFlags)