Struct ac_ffmpeg::codec::audio::AudioEncoderBuilder
source · 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.