pub struct AudioDecoder(/* private fields */);
Expand description
An audio decoder.
Implementations§
Source§impl AudioDecoder
impl AudioDecoder
Sourcepub const fn sample_rate(&self) -> i32
pub const fn sample_rate(&self) -> i32
Returns the sample rate of the audio frame.
Sourcepub const fn sample_format(&self) -> AVSampleFormat
pub const fn sample_format(&self) -> AVSampleFormat
Returns the sample format of the audio frame.
Sourcepub fn receive_frame(&mut self) -> Result<Option<AudioFrame>, FfmpegError>
pub fn receive_frame(&mut self) -> Result<Option<AudioFrame>, FfmpegError>
Receives a frame from the decoder.
Methods from Deref<Target = GenericDecoder>§
Sourcepub fn codec_type(&self) -> AVMediaType
pub fn codec_type(&self) -> AVMediaType
Returns the codec type of the decoder.
Sourcepub fn time_base(&self) -> Option<Rational>
pub fn time_base(&self) -> Option<Rational>
Returns the time base of the decoder or None
if the denominator is zero.
Sourcepub fn send_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>
pub fn send_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>
Sends a packet to the decoder.
Sourcepub fn send_eof(&mut self) -> Result<(), FfmpegError>
pub fn send_eof(&mut self) -> Result<(), FfmpegError>
Sends an end-of-file packet to the decoder.
Sourcepub fn receive_frame(&mut self) -> Result<Option<GenericFrame>, FfmpegError>
pub fn receive_frame(&mut self) -> Result<Option<GenericFrame>, FfmpegError>
Receives a frame from the decoder.
Trait Implementations§
Source§impl Debug for AudioDecoder
impl Debug for AudioDecoder
Source§impl Deref for AudioDecoder
impl Deref for AudioDecoder
Auto Trait Implementations§
impl Freeze for AudioDecoder
impl RefUnwindSafe for AudioDecoder
impl Send for AudioDecoder
impl !Sync for AudioDecoder
impl Unpin for AudioDecoder
impl UnwindSafe for AudioDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more