[−][src]Trait ac_ffmpeg::codec::Decoder
A media decoder.
Common decoder operation
- Push a packet to the decoder.
- Take all frames from the decoder until you get None.
- If there are more packets to be decoded, continue with 1.
- Flush the decoder.
- Take all frames from the decoder until you get None.
Associated Types
type CodecParameters
type Frame
Required methods
fn codec_parameters(&self) -> Self::CodecParameters
Get codec parameters.
fn try_push(&mut self, packet: Packet) -> Result<(), CodecError>
Push a given packet to the decoder.
fn try_flush(&mut self) -> Result<(), CodecError>
Flush the decoder.
fn take(&mut self) -> Result<Option<Self::Frame>, Error>
Take the next frame from the decoder.
Provided methods
fn push(&mut self, packet: Packet) -> Result<(), Error>
Push a given packet to the decoder.
Panics
The method panics if the operation is not expected (i.e. another operation needs to be done).
fn flush(&mut self) -> Result<(), Error>
Flush the decoder.
Panics
The method panics if the operation is not expected (i.e. another operation needs to be done).