Trait re_video::decode::AsyncDecoder

source ·
pub trait AsyncDecoder: Send + Sync {
    // Required methods
    fn submit_chunk(&mut self, chunk: Chunk) -> Result<()>;
    fn reset(&mut self) -> Result<()>;

    // Provided method
    fn end_of_video(&mut self) -> Result<()> { ... }
}
Expand description

Interface for an asynchronous video decoder.

Output callback is passed in on creation of a concrete type.

Required Methods§

source

fn submit_chunk(&mut self, chunk: Chunk) -> Result<()>

Submits a chunk for decoding in the background.

Chunks are expected to come in the order of their decoding timestamp.

source

fn reset(&mut self) -> Result<()>

Resets the decoder.

This does not block, all chunks sent to decode before this point will be discarded.

Provided Methods§

source

fn end_of_video(&mut self) -> Result<()>

Called after submitting the last chunk.

Should flush all pending frames.

Implementors§