pub struct CameraFrame {
pub width: u32,
pub height: u32,
pub format: PixelFormat,
pub data: Vec<u8>,
pub timestamp_ms: u64,
}Expand description
A captured video frame.
Fields§
§width: u32Frame width in pixels.
height: u32Frame height in pixels.
format: PixelFormatPixel format of data.
data: Vec<u8>Raw pixel data.
timestamp_ms: u64Milliseconds since capture stream was opened.
Implementations§
Source§impl CameraFrame
impl CameraFrame
Sourcepub fn bytes_per_pixel(&self) -> u32
pub fn bytes_per_pixel(&self) -> u32
Bytes per pixel for packed formats; 0 for compressed formats like MJPEG.
Trait Implementations§
Source§impl Clone for CameraFrame
impl Clone for CameraFrame
Source§fn clone(&self) -> CameraFrame
fn clone(&self) -> CameraFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CameraFrame
impl RefUnwindSafe for CameraFrame
impl Send for CameraFrame
impl Sync for CameraFrame
impl Unpin for CameraFrame
impl UnsafeUnpin for CameraFrame
impl UnwindSafe for CameraFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more