#[non_exhaustive]pub struct AudioInit {
pub format: AudioFormat,
pub data: Bytes,
pub label: Option<String>,
pub container: Container,
pub bitrate: Option<u64>,
}Expand description
What an audio importer needs to start: a format, its init bytes, and an optional label.
format selects the codec parser ("opus", "aac", "flac", "mp3"). data carries the
codec init bytes (an OpusHead, an AudioSpecificConfig, …), which audio needs up front because
an audio importer cannot resolve its config from frames.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format: AudioFormatThe audio format, e.g. "opus" or "aac".
data: BytesCodec init bytes. Required: audio has no in-band config.
label: Option<String>Human-readable rendition name for a track picker.
container: ContainerThe container wrapping each frame on the wire.
Legacy unless selected. A video rendition carries the
same knob on its VideoInit::hint.
bitrate: Option<u64>The maximum bitrate in bits per second, for an encoder that knows it. Supplied, it replaces any value the init bytes give and is never estimated.
Implementations§
Trait Implementations§
impl StructuralPartialEq for AudioInit
Auto Trait Implementations§
impl !Freeze for AudioInit
impl RefUnwindSafe for AudioInit
impl Send for AudioInit
impl Sync for AudioInit
impl Unpin for AudioInit
impl UnsafeUnpin for AudioInit
impl UnwindSafe for AudioInit
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