pub struct WgpuTexturesDecoder { /* private fields */ }This crate has been renamed. Please migrate to gpu-video.
Expand description
A decoder that outputs frames stored as wgpu::Textures
Implementations§
Source§impl WgpuTexturesDecoder
impl WgpuTexturesDecoder
Sourcepub fn decode(
&mut self,
frame: EncodedInputChunk<'_>,
) -> Result<Vec<OutputFrame<Texture>>, 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<Texture>>, DecoderError>
This crate has been renamed. Please migrate to gpu-video.
The produced textures have the wgpu::TextureFormat::NV12 format and can be used as a texture binding.
Sourcepub fn flush(&mut self) -> Result<Vec<OutputFrame<Texture>>, DecoderError>
👎Deprecated since 0.3.1: This crate has been renamed. Please migrate to gpu-video.
pub fn flush(&mut self) -> Result<Vec<OutputFrame<Texture>>, 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<Texture>>, 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<Texture>>, 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.