pub struct Frame<'f> { /* private fields */ }
Expand description
A single frame.
Implementations§
source§impl<'f> Frame<'f>
impl<'f> Frame<'f>
sourcepub fn new(planes: [&'f [u8]; 3], raw_params: Option<Vec<u8>>) -> Frame<'f>
pub fn new(planes: [&'f [u8]; 3], raw_params: Option<Vec<u8>>) -> Frame<'f>
Create a new frame with optional parameters. No heap allocations are made.
sourcepub fn from_u16(
planes: [&'f [u16]; 3],
raw_params: Option<Vec<u8>>
) -> Frame<'f>
pub fn from_u16( planes: [&'f [u16]; 3], raw_params: Option<Vec<u8>> ) -> Frame<'f>
Create a new frame from data in 16-bit format.
sourcepub fn get_y_plane(&self) -> &[u8] ⓘ
pub fn get_y_plane(&self) -> &[u8] ⓘ
Return Y (first) plane.
sourcepub fn get_u_plane(&self) -> &[u8] ⓘ
pub fn get_u_plane(&self) -> &[u8] ⓘ
Return U (second) plane. Empty in case of grayscale.
sourcepub fn get_v_plane(&self) -> &[u8] ⓘ
pub fn get_v_plane(&self) -> &[u8] ⓘ
Return V (third) plane. Empty in case of grayscale.
sourcepub fn get_raw_params(&self) -> Option<&[u8]>
pub fn get_raw_params(&self) -> Option<&[u8]>
Return frame raw parameters if any.
Trait Implementations§
Auto Trait Implementations§
impl<'f> RefUnwindSafe for Frame<'f>
impl<'f> Send for Frame<'f>
impl<'f> Sync for Frame<'f>
impl<'f> Unpin for Frame<'f>
impl<'f> UnwindSafe for Frame<'f>
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