Struct ac_ffmpeg::codec::audio::AudioDecoder
source · pub struct AudioDecoder { /* private fields */ }
Expand description
Audio decoder.
Implementations§
source§impl AudioDecoder
impl AudioDecoder
sourcepub fn from_codec_parameters(
codec_parameters: &AudioCodecParameters
) -> Result<AudioDecoderBuilder, Error>
pub fn from_codec_parameters(
codec_parameters: &AudioCodecParameters
) -> Result<AudioDecoderBuilder, Error>
Create a new decoder from given codec parameters.
sourcepub fn from_stream(stream: &Stream) -> Result<AudioDecoderBuilder, Error>
pub fn from_stream(stream: &Stream) -> Result<AudioDecoderBuilder, Error>
Create a new decoder for a given stream.
Panics
The method panics if the stream is not an audio stream.
Trait Implementations§
source§impl Decoder for AudioDecoder
impl Decoder for AudioDecoder
type CodecParameters = AudioCodecParameters
type Frame = AudioFrame
source§fn codec_parameters(&self) -> Self::CodecParameters
fn codec_parameters(&self) -> Self::CodecParameters
Get codec parameters.
source§fn try_push(&mut self, packet: Packet) -> Result<(), CodecError>
fn try_push(&mut self, packet: Packet) -> Result<(), CodecError>
Push a given packet to the decoder.