pub struct StreamInfo {
pub format: FormatKind,
pub sample_rate: u32,
pub channels: u16,
pub bits_per_sample: u32,
pub total_frames: Option<u64>,
}Expand description
Metadata describing a decoded stream, populated at
ContainerDecoder::open time.
All fields are known once the container header has been parsed; they do
not change across subsequent ContainerDecoder::next_frame calls.
Fields§
§format: FormatKindThe sniffed container format (FLAC / WAV / PCM).
sample_rate: u32Sample rate in Hz (48000 is the common baseline).
channels: u16Number of channels (1 = mono, 2 = stereo, …).
bits_per_sample: u32Bit depth of the encoded samples (e.g. 16, 24).
total_frames: Option<u64>Total per-channel frame count, when known from the container header.
None indicates an unbounded or streaming source (e.g. raw PCM with no
length prefix). Callers must not assume a finite length in that case.
Trait Implementations§
Source§impl Clone for StreamInfo
impl Clone for StreamInfo
Source§fn clone(&self) -> StreamInfo
fn clone(&self) -> StreamInfo
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 moreSource§impl Debug for StreamInfo
impl Debug for StreamInfo
impl Eq for StreamInfo
Source§impl PartialEq for StreamInfo
impl PartialEq for StreamInfo
impl StructuralPartialEq for StreamInfo
Auto Trait Implementations§
impl Freeze for StreamInfo
impl RefUnwindSafe for StreamInfo
impl Send for StreamInfo
impl Sync for StreamInfo
impl Unpin for StreamInfo
impl UnsafeUnpin for StreamInfo
impl UnwindSafe for StreamInfo
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