pub trait StatelessDecoderBackend<FormatInfo> {
    type Handle: DecodedHandle;
    type Picture;

    // Required methods
    fn stream_info(&self) -> Option<&StreamInfo>;
    fn surface_pool(
        &mut self
    ) -> &mut dyn SurfacePool<<Self::Handle as DecodedHandle>::Descriptor>;
    fn try_format(
        &mut self,
        format_info: &FormatInfo,
        format: DecodedFormat
    ) -> Result<()>;
}
Expand description

Common trait shared by all stateless video decoder backends, providing codec-independent methods.

Required Associated Types§

source

type Handle: DecodedHandle

The type that the backend returns as a result of a decode operation. This will usually be some backend-specific type with a resource and a resource pool so that said buffer can be reused for another decode operation when it goes out of scope.

source

type Picture

Backend-specific type representing a frame being decoded. Useful for decoders that need to render a frame in several steps and to preserve its state in between.

Required Methods§

source

fn stream_info(&self) -> Option<&StreamInfo>

Returns the current decoding parameters, as parsed from the stream.

source

fn surface_pool( &mut self ) -> &mut dyn SurfacePool<<Self::Handle as DecodedHandle>::Descriptor>

Returns the surface pool currently in use by the backend.

source

fn try_format( &mut self, format_info: &FormatInfo, format: DecodedFormat ) -> Result<()>

Try altering the decoded format.

Implementors§