pub struct Decoder { /* private fields */ }Expand description
A VP8 decoder.
Feed it whole frames in order with Decoder::decode. It starts at a
keyframe and, after any error, waits for the next keyframe
(DecodeError::NeedKeyframe).
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn set_max_pixels(&mut self, max_pixels: u64)
pub fn set_max_pixels(&mut self, max_pixels: u64)
Sets the largest frame (width times height) the decoder accepts. A
larger keyframe fails with Unsupported instead of allocating. The
default, DEFAULT_MAX_PIXELS, allows 4096x2304.
Sourcepub fn last_frame_info(&self) -> Option<FrameInfo>
pub fn last_frame_info(&self) -> Option<FrameInfo>
The header of the last frame decoded successfully.
Sourcepub fn dimensions(&self) -> Option<(u32, u32)>
pub fn dimensions(&self) -> Option<(u32, u32)>
The current coded size, after at least one keyframe.
Sourcepub fn color_space_reserved(&self) -> bool
pub fn color_space_reserved(&self) -> bool
The colour space bit of the last keyframe: false for BT.601 (the only one RFC 6386 defines).
Trait Implementations§
Auto Trait Implementations§
impl Forget for Decoder
impl Freeze for Decoder
impl Move for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnsafeUnpin for Decoder
impl UnwindSafe for Decoder
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