pub enum AudioCoding {
PcmS16le,
Aac {
asc: Vec<u8>,
},
}Expand description
How the audio samples are coded.
The two cases are not variations on a theme: PCM frames are all the same size and arrive as a byte stream to be cut up, while AAC frames are already packets of their own length and carry a configuration the decoder cannot work without. They differ in the sample entry, the sample-size table, and even the file’s brand.
Variants§
PcmS16le
Signed 16-bit little-endian interleaved PCM, stored as sowt. Makes the
file a QuickTime movie — see Mp4StreamWriter::new.
Aac
AAC access units, stored as mp4a with an esds.
asc is the AudioSpecificConfig — two bytes for plain AAC-LC, five with
explicit SBR signalling. It is not something to synthesise: every
encoder hands it over, WebCodecs as decoderConfig.description on the
first output and the ISO reference as the DecoderSpecificInfo. Without
it the track says it is AAC and declines to say which kind.
Trait Implementations§
Source§impl Clone for AudioCoding
impl Clone for AudioCoding
impl Eq for AudioCoding
Source§impl PartialEq for AudioCoding
impl PartialEq for AudioCoding
impl StructuralPartialEq for AudioCoding
Auto Trait Implementations§
impl Forget for AudioCoding
impl Freeze for AudioCoding
impl Move for AudioCoding
impl RefUnwindSafe for AudioCoding
impl Send for AudioCoding
impl Sync for AudioCoding
impl Unpin for AudioCoding
impl UnsafeUnpin for AudioCoding
impl UnwindSafe for AudioCoding
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
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> ⓘ
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> ⓘ
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