pub struct FrameMut<'a> {
pub geometry: Geometry,
pub timestamp: Micros,
pub sequence: u32,
pub planes: PlanesMut<'a>,
}Expand description
A frame whose memory is being written or transformed in place: what a
source fills, a scaler or a colour conversion works on, before the
read-only Frame view moves down the pipeline.
Fields§
§geometry: GeometryDimensions and format.
timestamp: MicrosCapture instant.
sequence: u32Frame counter.
planes: PlanesMut<'a>The pixels.
Implementations§
Source§impl<'a> FrameMut<'a>
impl<'a> FrameMut<'a>
Sourcepub fn packed(
geometry: Geometry,
timestamp: Micros,
sequence: u32,
data: &'a mut [u8],
) -> Result<Self>
pub fn packed( geometry: Geometry, timestamp: Micros, sequence: u32, data: &'a mut [u8], ) -> Result<Self>
A packed frame over data, with the same checks as Frame::packed
except the JPEG-magic check (the bytes are about to be written).
Sourcepub fn yuv420p(
geometry: Geometry,
timestamp: Micros,
sequence: u32,
y: (&'a mut [u8], usize),
u: (&'a mut [u8], usize),
v: (&'a mut [u8], usize),
) -> Result<Self>
pub fn yuv420p( geometry: Geometry, timestamp: Micros, sequence: u32, y: (&'a mut [u8], usize), u: (&'a mut [u8], usize), v: (&'a mut [u8], usize), ) -> Result<Self>
A planar 4:2:0 frame over three buffers, as Frame::yuv420p.
Sourcepub fn as_frame(&self) -> Result<Frame<'_>>
pub fn as_frame(&self) -> Result<Frame<'_>>
The read-only view, for handing on once the writing is done. A
packed compressed frame is checked for its magic here, as
Frame::packed does.
Sourcepub fn packed_mut(&mut self) -> Option<&mut [u8]>
pub fn packed_mut(&mut self) -> Option<&mut [u8]>
The packed bytes, mutable, when the frame is packed.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for FrameMut<'a>
impl<'a> Freeze for FrameMut<'a>
impl<'a> RefUnwindSafe for FrameMut<'a>
impl<'a> Send for FrameMut<'a>
impl<'a> Sync for FrameMut<'a>
impl<'a> Unpin for FrameMut<'a>
impl<'a> UnsafeUnpin for FrameMut<'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