pub struct DecodedYUV<'a> { /* private fields */ }Expand description
Frame returned by the Decoder and provides safe data access.
Implementations§
Source§impl DecodedYUV<'_>
impl DecodedYUV<'_>
Sourcepub const fn dimensions_uv(&self) -> (usize, usize)
pub const fn dimensions_uv(&self) -> (usize, usize)
Returns the unpadded U size.
This is often smaller (by half) than the image size.
Sourcepub const fn timestamp(&self) -> Timestamp
pub const fn timestamp(&self) -> Timestamp
Timestamp of this frame in milliseconds(?) with respect to the video stream.
Sourcepub fn split<const N: usize>(&self) -> [YUVSlices<'_>; N]
pub fn split<const N: usize>(&self) -> [YUVSlices<'_>; N]
Cut the YUV buffer into vertical sections.
The slices do not overlap. If N does not divide the buffer, then the last YUVSlice has fewer pixel rows.
Sourcepub fn write_rgb8(&self, target: &mut [u8])
pub fn write_rgb8(&self, target: &mut [u8])
Writes the image into a byte buffer of size w*h*3.
§Panics
Panics if the target image dimension don’t match the configured format.
Sourcepub fn write_rgba8(&self, target: &mut [u8])
pub fn write_rgba8(&self, target: &mut [u8])
Writes the image into a byte buffer of size w*h*4.
§Panics
Panics if the target image dimension don’t match the configured format.
Trait Implementations§
Source§impl<'a> Debug for DecodedYUV<'a>
impl<'a> Debug for DecodedYUV<'a>
Source§impl YUVSource for DecodedYUV<'_>
impl YUVSource for DecodedYUV<'_>
Auto Trait Implementations§
impl<'a> Freeze for DecodedYUV<'a>
impl<'a> RefUnwindSafe for DecodedYUV<'a>
impl<'a> Send for DecodedYUV<'a>
impl<'a> Sync for DecodedYUV<'a>
impl<'a> Unpin for DecodedYUV<'a>
impl<'a> UnsafeUnpin for DecodedYUV<'a>
impl<'a> UnwindSafe for DecodedYUV<'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