Skip to main content

VideoDecoder

Trait VideoDecoder 

Source
pub trait VideoDecoder: Send {
    // Required methods
    fn codec(&self) -> Codec;
    fn decode(&mut self, data: &[u8]) -> Result<Option<I420Frame>>;
}
Expand description

Decodes one compressed frame at a time into I420.

Required Methods§

Source

fn codec(&self) -> Codec

The format this decoder reads.

Source

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

Decodes one compressed frame. Returns None when the decoder has no picture to show for it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§