pub struct CompressStats {
pub compressed_bytes: u64,
pub encode_ms: f64,
pub decode_ms: f64,
}Expand description
Stats from a file-bitstream compression pass.
Fields§
§compressed_bytes: u64Size of the compressed bitstream on disk.
encode_ms: f64Encode wall time (ms).
decode_ms: f64Decode wall time (ms); 0.0 for an encode-only call.
Implementations§
Source§impl CompressStats
impl CompressStats
Sourcepub fn compression_ratio(&self, raw_pcm_bytes: u64) -> f64
pub fn compression_ratio(&self, raw_pcm_bytes: u64) -> f64
Compression ratio vs an uncompressed PCM size (raw_pcm_bytes / compressed).
Sourcepub fn bitrate_bps(&self, duration_secs: f64) -> f64
pub fn bitrate_bps(&self, duration_secs: f64) -> f64
Effective bitrate (bits/sec) for an audio clip of duration_secs.
Trait Implementations§
Source§impl Clone for CompressStats
impl Clone for CompressStats
Source§fn clone(&self) -> CompressStats
fn clone(&self) -> CompressStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompressStats
Source§impl Debug for CompressStats
impl Debug for CompressStats
Source§impl PartialEq for CompressStats
impl PartialEq for CompressStats
Source§fn eq(&self, other: &CompressStats) -> bool
fn eq(&self, other: &CompressStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompressStats
Auto Trait Implementations§
impl Freeze for CompressStats
impl RefUnwindSafe for CompressStats
impl Send for CompressStats
impl Sync for CompressStats
impl Unpin for CompressStats
impl UnsafeUnpin for CompressStats
impl UnwindSafe for CompressStats
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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