Trait cros_codecs::decoders::vp9::backends::StatelessDecoderBackend
source · [−]pub(crate) trait StatelessDecoderBackend: VideoDecoderBackend {
fn new_sequence(&mut self, header: &Header) -> Result<()>;
fn submit_picture(
&mut self,
picture: &Header,
reference_frames: &[Option<Self::Handle>; 8],
bitstream: &[u8],
timestamp: u64,
segmentation: &[Segmentation; 8],
block: BlockingMode
) -> Result<Self::Handle>;
}
Expand description
Trait for stateless decoder backends. The decoder will call into the backend to request decode operations. The backend can operate in blocking mode, where it will wait until the current decode finishes, or in non-blocking mode, where it should return immediately with any previously decoded frames that happen to be ready.
Required Methods
sourcefn new_sequence(&mut self, header: &Header) -> Result<()>
fn new_sequence(&mut self, header: &Header) -> Result<()>
Called when new stream parameters are found.
sourcefn submit_picture(
&mut self,
picture: &Header,
reference_frames: &[Option<Self::Handle>; 8],
bitstream: &[u8],
timestamp: u64,
segmentation: &[Segmentation; 8],
block: BlockingMode
) -> Result<Self::Handle>
fn submit_picture(
&mut self,
picture: &Header,
reference_frames: &[Option<Self::Handle>; 8],
bitstream: &[u8],
timestamp: u64,
segmentation: &[Segmentation; 8],
block: BlockingMode
) -> Result<Self::Handle>
Called when the decoder wants the backend to finish the decoding
operations for picture
. The argument block
dictates whether this
call should wait until the current decode finishes, or whether it should
return immediately.
This call will assign the ownership of the BackendHandle to the Picture and then assign the ownership of the Picture to the Handle.