Skip to main content

TileEncodeOp

Trait TileEncodeOp 

Source
pub trait TileEncodeOp: Send + Sync {
    // Required method
    fn encode_tile(
        &self,
        frame: &VideoFrame,
        x: u32,
        y: u32,
        width: u32,
        height: u32,
    ) -> CodecResult<Vec<u8>>;
}
Expand description

Codec-specific tile encoding operation.

Implementors receive a reference to the full frame plus the pixel coordinates of the tile to encode. They return the raw encoded bytes for that tile or a CodecError.

§Thread Safety

Implementations must be Send + Sync because TileEncoder drives them from Rayon parallel iterators.

Required Methods§

Source

fn encode_tile( &self, frame: &VideoFrame, x: u32, y: u32, width: u32, height: u32, ) -> CodecResult<Vec<u8>>

Encode the tile at (x, y) with size (width, height) pixels.

§Errors

Return a CodecError if encoding fails for any reason.

Implementors§