pub struct Frame<'a> {
pub geometry: Geometry,
pub timestamp: Micros,
pub sequence: u32,
pub planes: Planes<'a>,
}Expand description
A borrowed frame: geometry, capture timestamp, sequence and pixel views.
Fields§
§geometry: GeometryWidth, height, format.
timestamp: MicrosCapture instant on the device’s monotonic clock.
sequence: u32Wrapping capture counter from the source; gaps mean drops.
planes: Planes<'a>The pixels.
Implementations§
Source§impl<'a> Frame<'a>
impl<'a> Frame<'a>
Sourcepub fn packed(
geometry: Geometry,
timestamp: Micros,
sequence: u32,
data: &'a [u8],
) -> Result<Frame<'a>, Error>
pub fn packed( geometry: Geometry, timestamp: Micros, sequence: u32, data: &'a [u8], ) -> Result<Frame<'a>, Error>
A packed or coded frame over data.
For uncompressed formats data must hold at least
Geometry::byte_len bytes. For JPEG it must be non-empty and start
with the SOI marker FF D8.
Sourcepub fn yuv420p(
geometry: Geometry,
timestamp: Micros,
sequence: u32,
y: (&'a [u8], usize),
u: (&'a [u8], usize),
v: (&'a [u8], usize),
) -> Result<Frame<'a>, Error>
pub fn yuv420p( geometry: Geometry, timestamp: Micros, sequence: u32, y: (&'a [u8], usize), u: (&'a [u8], usize), v: (&'a [u8], usize), ) -> Result<Frame<'a>, Error>
A planar 4:2:0 frame over three caller-owned planes.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Frame<'a>
impl<'a> RefUnwindSafe for Frame<'a>
impl<'a> Send for Frame<'a>
impl<'a> Sync for Frame<'a>
impl<'a> Unpin for Frame<'a>
impl<'a> UnsafeUnpin for Frame<'a>
impl<'a> UnwindSafe for Frame<'a>
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