Trait cros_codecs::decoder::stateless::StatelessDecoderBackend
source · 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§
sourcetype Handle: DecodedHandle
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.
Required Methods§
sourcefn stream_info(&self) -> Option<&StreamInfo>
fn stream_info(&self) -> Option<&StreamInfo>
Returns the current decoding parameters, as parsed from the stream.
sourcefn surface_pool(
&mut self
) -> &mut dyn SurfacePool<<Self::Handle as DecodedHandle>::Descriptor>
fn surface_pool( &mut self ) -> &mut dyn SurfacePool<<Self::Handle as DecodedHandle>::Descriptor>
Returns the surface pool currently in use by the backend.
sourcefn try_format(
&mut self,
format_info: &FormatInfo,
format: DecodedFormat
) -> Result<()>
fn try_format( &mut self, format_info: &FormatInfo, format: DecodedFormat ) -> Result<()>
Try altering the decoded format.