Skip to main content

Decoder

Trait Decoder 

Source
pub trait Decoder {
    // Required methods
    fn codec(&self) -> Codec;
    fn decode(&mut self, data: &[u8]) -> Result<bool, DecodeError>;
    fn frame(&self) -> Option<I420View<'_>>;
}

Required Methods§

Source

fn codec(&self) -> Codec

Source

fn decode(&mut self, data: &[u8]) -> Result<bool, DecodeError>

Decode one encoded frame. Ok(true) when frame() now holds a new picture.

Source

fn frame(&self) -> Option<I420View<'_>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§