pub struct BytesDecoder { /* private fields */ }This crate has been renamed. Please migrate to gpu-video.
Expand description
A decoder that outputs frames stored as Vec<u8> with the raw pixel data.
Implementations§
Source§impl BytesDecoder
impl BytesDecoder
Sourcepub fn decode(
&mut self,
frame: EncodedInputChunk<'_>,
) -> Result<Vec<OutputFrame<RawFrameData>>, DecoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn decode( &mut self, frame: EncodedInputChunk<'_>, ) -> Result<Vec<OutputFrame<RawFrameData>>, DecoderError>
This crate has been renamed. Please migrate to gpu-video.
The result is a sequence of frames. The payload of each OutputFrame struct is a Vec<u8>. Each Vec<u8> contains a single
decoded frame in the NV12 format.
Sourcepub fn flush(&mut self) -> Result<Vec<OutputFrame<RawFrameData>>, DecoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn flush(&mut self) -> Result<Vec<OutputFrame<RawFrameData>>, DecoderError>
This crate has been renamed. Please migrate to gpu-video.
Flush all frames from the decoder.
Make sure that this is done when you have the knowledge that no more frames will be coming that need to be presented before the already decoded frames.
Sourcepub fn process_event(
&mut self,
event: DecoderEvent<'_>,
) -> Result<Vec<OutputFrame<RawFrameData>>, DecoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn process_event( &mut self, event: DecoderEvent<'_>, ) -> Result<Vec<OutputFrame<RawFrameData>>, DecoderError>
This crate has been renamed. Please migrate to gpu-video.
Process a DecoderEvent. For most use cases, using Self::decode and Self::flush is enough.
Use this only when you need more fine-grained control.
May return a sequence of decoded frames in the NV12 format.