pub struct AudioTranscodeParams {
pub input_layout: AudioLayout,
pub output_layout: AudioLayout,
pub input_sample_rate: u32,
pub output_sample_rate: u32,
pub target_bitrate_bps: u32,
pub gain_linear: f32,
pub normalise_loudness: bool,
}Expand description
Parameters that govern how a single audio stream is transcoded.
Fields§
§input_layout: AudioLayoutInput channel layout.
output_layout: AudioLayoutDesired output channel layout.
input_sample_rate: u32Input sample rate in Hz.
output_sample_rate: u32Desired output sample rate in Hz.
target_bitrate_bps: u32Target audio bitrate in bits per second.
gain_linear: f32Linear gain to apply during transcode (1.0 = no change).
normalise_loudness: boolWhether to normalise loudness to EBU R128.
Implementations§
Source§impl AudioTranscodeParams
impl AudioTranscodeParams
Sourcepub fn mono_downmix() -> Self
pub fn mono_downmix() -> Self
Create params for a mono downmix.
Sourcepub fn is_passthrough(&self) -> bool
pub fn is_passthrough(&self) -> bool
Returns true when the output layout and sample rate match the input
and no gain or loudness normalisation is applied — i.e. pure passthrough.
Trait Implementations§
Source§impl Clone for AudioTranscodeParams
impl Clone for AudioTranscodeParams
Source§fn clone(&self) -> AudioTranscodeParams
fn clone(&self) -> AudioTranscodeParams
Returns a duplicate 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 AudioTranscodeParams
impl Debug for AudioTranscodeParams
Source§impl Default for AudioTranscodeParams
impl Default for AudioTranscodeParams
Source§impl<'de> Deserialize<'de> for AudioTranscodeParams
impl<'de> Deserialize<'de> for AudioTranscodeParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AudioTranscodeParams
impl RefUnwindSafe for AudioTranscodeParams
impl Send for AudioTranscodeParams
impl Sync for AudioTranscodeParams
impl Unpin for AudioTranscodeParams
impl UnsafeUnpin for AudioTranscodeParams
impl UnwindSafe for AudioTranscodeParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more