pub struct FrameRef<'a> { /* private fields */ }Expand description
A borrowed view of one decoded frame.
Lives as long as the borrow of the decoder that produced it, so one frame is live at a time. Copy explicitly to retain a frame.
Implementations§
Source§impl<'a> FrameRef<'a>
impl<'a> FrameRef<'a>
Sourcepub fn plane(&self, i: usize) -> &'a [u8] ⓘ
pub fn plane(&self, i: usize) -> &'a [u8] ⓘ
Plane i as wire-format bytes (Y=0, U=1, V=2, empty chroma for
mono). For >8-bit streams these are the little-endian wire bytes.
§Panics
Panics if i > 2.
Sourcepub fn plane_u16(&self, i: usize) -> Option<&'a [u16]>
pub fn plane_u16(&self, i: usize) -> Option<&'a [u16]>
Plane i as host-order u16 samples for >8-bit streams, or None
when the bit depth is 8 or less.
§Panics
Panics if i > 2.
Sourcepub fn raw_params(&self) -> &'a [u8] ⓘ
pub fn raw_params(&self) -> &'a [u8] ⓘ
Frame header parameter bytes verbatim (the bytes after "FRAME ",
LF excluded), empty when the frame header was bare. Feed to
Encoder::write_frame_with_params
for a byte-exact re-encode.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for FrameRef<'a>
impl<'a> RefUnwindSafe for FrameRef<'a>
impl<'a> Send for FrameRef<'a>
impl<'a> Sync for FrameRef<'a>
impl<'a> Unpin for FrameRef<'a>
impl<'a> UnsafeUnpin for FrameRef<'a>
impl<'a> UnwindSafe for FrameRef<'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