Struct AudioEncoderSettingsBuilder

Source
pub struct AudioEncoderSettingsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> AudioEncoderSettingsBuilder<S>

Source

pub fn build(self) -> AudioEncoderSettings
where S: IsComplete,

Finish building and return the requested object

Source

pub fn sample_rate( self, value: i32, ) -> AudioEncoderSettingsBuilder<SetSampleRate<S>>
where S::SampleRate: IsUnset,

Required.

Source

pub fn ch_layout( self, value: AudioChannelLayout, ) -> AudioEncoderSettingsBuilder<SetChLayout<S>>
where S::ChLayout: IsUnset,

Required.

Source

pub fn sample_fmt( self, value: AVSampleFormat, ) -> AudioEncoderSettingsBuilder<SetSampleFmt<S>>
where S::SampleFmt: IsUnset,

Required.

Source

pub fn thread_count( self, value: i32, ) -> AudioEncoderSettingsBuilder<SetThreadCount<S>>
where S::ThreadCount: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_thread_count( self, value: Option<i32>, ) -> AudioEncoderSettingsBuilder<SetThreadCount<S>>
where S::ThreadCount: IsUnset,

Optional (Some / Option setters).

Source

pub fn thread_type( self, value: i32, ) -> AudioEncoderSettingsBuilder<SetThreadType<S>>
where S::ThreadType: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_thread_type( self, value: Option<i32>, ) -> AudioEncoderSettingsBuilder<SetThreadType<S>>
where S::ThreadType: IsUnset,

Optional (Some / Option setters).

Source

pub fn bitrate(self, value: i64) -> AudioEncoderSettingsBuilder<SetBitrate<S>>
where S::Bitrate: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_bitrate( self, value: Option<i64>, ) -> AudioEncoderSettingsBuilder<SetBitrate<S>>
where S::Bitrate: IsUnset,

Optional (Some / Option setters).

Source

pub fn rc_min_rate( self, value: i64, ) -> AudioEncoderSettingsBuilder<SetRcMinRate<S>>
where S::RcMinRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_rc_min_rate( self, value: Option<i64>, ) -> AudioEncoderSettingsBuilder<SetRcMinRate<S>>
where S::RcMinRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn rc_max_rate( self, value: i64, ) -> AudioEncoderSettingsBuilder<SetRcMaxRate<S>>
where S::RcMaxRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_rc_max_rate( self, value: Option<i64>, ) -> AudioEncoderSettingsBuilder<SetRcMaxRate<S>>
where S::RcMaxRate: IsUnset,

Optional (Some / Option setters).

Source

pub fn rc_buffer_size( self, value: i32, ) -> AudioEncoderSettingsBuilder<SetRcBufferSize<S>>
where S::RcBufferSize: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_rc_buffer_size( self, value: Option<i32>, ) -> AudioEncoderSettingsBuilder<SetRcBufferSize<S>>
where S::RcBufferSize: IsUnset,

Optional (Some / Option setters).

Source

pub fn codec_specific_options( self, value: Dictionary, ) -> AudioEncoderSettingsBuilder<SetCodecSpecificOptions<S>>
where S::CodecSpecificOptions: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_codec_specific_options( self, value: Option<Dictionary>, ) -> AudioEncoderSettingsBuilder<SetCodecSpecificOptions<S>>
where S::CodecSpecificOptions: IsUnset,

Optional (Some / Option setters).

Source

pub fn flags(self, value: i32) -> AudioEncoderSettingsBuilder<SetFlags<S>>
where S::Flags: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_flags( self, value: Option<i32>, ) -> AudioEncoderSettingsBuilder<SetFlags<S>>
where S::Flags: IsUnset,

Optional (Some / Option setters).

Source

pub fn flags2(self, value: i32) -> AudioEncoderSettingsBuilder<SetFlags2<S>>
where S::Flags2: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_flags2( self, value: Option<i32>, ) -> AudioEncoderSettingsBuilder<SetFlags2<S>>
where S::Flags2: IsUnset,

Optional (Some / Option setters).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more