pub struct AudioEncoderBuilder { /* private fields */ }
Expand description
Builder for the audio encoder.
Implementations§
Source§impl AudioEncoderBuilder
impl AudioEncoderBuilder
Sourcepub fn set_option<V>(self, name: &str, value: V) -> Selfwhere
V: ToString,
pub fn set_option<V>(self, name: &str, value: V) -> Selfwhere
V: ToString,
Set an encoder option.
Sourcepub fn bit_rate(self, bit_rate: u64) -> Self
pub fn bit_rate(self, bit_rate: u64) -> Self
Set encoder bit rate. The default is 0 (i.e. automatic).
Sourcepub fn time_base(self, time_base: TimeBase) -> Self
pub fn time_base(self, time_base: TimeBase) -> Self
Set encoder time base. The default time base is in microseconds.
Sourcepub fn sample_format(self, format: SampleFormat) -> Self
pub fn sample_format(self, format: SampleFormat) -> Self
Set audio sample format.
Sourcepub fn sample_rate(self, rate: u32) -> Self
pub fn sample_rate(self, rate: u32) -> Self
Set sampling rate.
Sourcepub fn channel_layout(self, layout: ChannelLayout) -> Self
pub fn channel_layout(self, layout: ChannelLayout) -> Self
Set channel layout.
Sourcepub fn build(self) -> Result<AudioEncoder, Error>
pub fn build(self) -> Result<AudioEncoder, Error>
Build the encoder.
Auto Trait Implementations§
impl Freeze for AudioEncoderBuilder
impl RefUnwindSafe for AudioEncoderBuilder
impl Send for AudioEncoderBuilder
impl Sync for AudioEncoderBuilder
impl Unpin for AudioEncoderBuilder
impl UnwindSafe for AudioEncoderBuilder
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