pub struct AudioFrame(/* private fields */);Expand description
An audio frame. Thin wrapper around GenericFrame. Like a frame but has specific audio properties.
Implementations§
Source§impl AudioFrame
impl AudioFrame
Sourcepub fn set_channel_layout_default(
&mut self,
channel_count: usize,
) -> Result<(), FfmpegError>
pub fn set_channel_layout_default( &mut self, channel_count: usize, ) -> Result<(), FfmpegError>
Sets channel layout to default with a channel count of channel_count.
Sourcepub fn set_channel_layout_custom(
&mut self,
custom_layout: AudioChannelLayout,
) -> Result<(), FfmpegError>
pub fn set_channel_layout_custom( &mut self, custom_layout: AudioChannelLayout, ) -> Result<(), FfmpegError>
Sets channel layout to a custom layout. Note that the channel count
is defined by the given crate::ffi::AVChannelLayout.
Sourcepub const fn channel_layout(&self) -> AVChannelLayout
pub const fn channel_layout(&self) -> AVChannelLayout
Returns the channel layout of the frame.
Sourcepub const fn channel_count(&self) -> usize
pub const fn channel_count(&self) -> usize
Returns the channel count of the frame.
Sourcepub const fn nb_samples(&self) -> i32
pub const fn nb_samples(&self) -> i32
Returns the number of samples in the frame.
Sourcepub const fn set_nb_samples(&mut self, nb_samples: usize)
pub const fn set_nb_samples(&mut self, nb_samples: usize)
Sets the number of samples in the frame.
Sourcepub const fn sample_rate(&self) -> i32
pub const fn sample_rate(&self) -> i32
Returns the sample rate of the frame.
Sourcepub const fn set_sample_rate(&mut self, sample_rate: usize)
pub const fn set_sample_rate(&mut self, sample_rate: usize)
Sets the sample rate of the frame.
Trait Implementations§
Source§impl Clone for AudioFrame
impl Clone for AudioFrame
Source§fn clone(&self) -> AudioFrame
fn clone(&self) -> AudioFrame
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioFrame
impl Debug for AudioFrame
Source§impl Deref for AudioFrame
impl Deref for AudioFrame
Auto Trait Implementations§
impl Freeze for AudioFrame
impl RefUnwindSafe for AudioFrame
impl Send for AudioFrame
impl Sync for AudioFrame
impl Unpin for AudioFrame
impl UnwindSafe for AudioFrame
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