pub struct Info {
pub file_paths: Vec<String>,
pub duration_map: HashMap<u32, f64>,
pub channels: u32,
pub sample_rate: u32,
pub bits_per_sample: u32,
}Expand description
Combined container info (track list, durations, sample format).
Fields§
§file_paths: Vec<String>§duration_map: HashMap<u32, f64>§channels: u32§sample_rate: u32§bits_per_sample: u32Implementations§
Source§impl Info
impl Info
Sourcepub fn new(file_path: String) -> Self
pub fn new(file_path: String) -> Self
Build info for a single container file by scanning all packets.
Sourcepub fn new_from_file_paths(file_paths: Vec<String>) -> Self
pub fn new_from_file_paths(file_paths: Vec<String>) -> Self
Build info for a list of standalone files.
Uses metadata when available and falls back to scanning.
Sourcepub fn get_duration(&self, index: u32) -> Option<f64>
pub fn get_duration(&self, index: u32) -> Option<f64>
Get the duration for the given track index, if known.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Info
impl RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl UnwindSafe for Info
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