pub struct Decoder { /* private fields */ }Expand description
Video decoder.
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn new(input: &mut impl Input) -> Result<Self, InvalidVideoStream>
pub fn new(input: &mut impl Input) -> Result<Self, InvalidVideoStream>
Create new decoder from the provided input.
Sourcepub fn read_rgb888_frame(
&mut self,
input: &mut impl Input,
rgb_frame: &mut [u8],
) -> Result<(), InvalidVideoStream>
pub fn read_rgb888_frame( &mut self, input: &mut impl Input, rgb_frame: &mut [u8], ) -> Result<(), InvalidVideoStream>
Decode next frame as RGB888.
Sourcepub fn read_rgba8888_frame(
&mut self,
input: &mut impl Input,
rgba_frame: &mut [u8],
) -> Result<(), InvalidVideoStream>
pub fn read_rgba8888_frame( &mut self, input: &mut impl Input, rgba_frame: &mut [u8], ) -> Result<(), InvalidVideoStream>
Decode next frame as RGBA8888.
All pixels are fully opaque.
Auto Trait Implementations§
impl Freeze 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