#[non_exhaustive]pub enum AudioCodec {
AAC(AAC),
Opus,
Pcm,
Flac,
Mp3,
Mp2,
Ac3,
Ec3,
Unknown(String),
}Expand description
Supported audio codec mimetypes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AAC(AAC)
AAC codec with profile information
Opus
Opus codec (no mimetype parameters)
Pcm
Uncompressed interleaved little-endian IEEE-754 binary32 PCM.
Flac
FLAC, the Free Lossless Audio Codec (RFC 9639). The decoder
initialization data (the fLaC stream marker plus the STREAMINFO
metadata block) travels out of band in AudioConfig::description. Both
the codec string and the description match the WebCodecs FLAC
registration, so browsers decode it directly.
Mp3
MPEG-1/2 Audio Layer III (MP3). Configuration is carried in band in each
frame header, so there is no out-of-band description. Browsers decode it
via WebCodecs (AudioDecoder codec string "mp3"), so unlike the legacy
codecs below it gets its own AudioCodecKind.
Mp2
MPEG-1/2 Audio Layer II. Legacy broadcast codec, carried verbatim by the MPEG-TS bridge for TS gear. WebCodecs cannot decode it, so browsers should skip this rendition. Do not use it for new content.
Ac3
Dolby Digital (AC-3). Legacy broadcast codec, same contract as
Self::Mp2: TS bridge only, not decodable in browsers, not for new
content.
Ec3
Dolby Digital Plus, also known as E-AC-3 or Enhanced AC-3 (“ec-3” is its
registered codec string). Legacy broadcast codec, same contract as
Self::Mp2: TS bridge only, not decodable in browsers, not for new
content.
Unknown(String)
Unknown or unsupported codec with original string
Implementations§
Source§impl AudioCodec
impl AudioCodec
Sourcepub fn kind(&self) -> AudioCodecKind
pub fn kind(&self) -> AudioCodecKind
Return the coarse codec family for tag-only matching.
Trait Implementations§
Source§impl Clone for AudioCodec
impl Clone for AudioCodec
Source§impl Debug for AudioCodec
impl Debug for AudioCodec
Source§impl Display for AudioCodec
impl Display for AudioCodec
impl Eq for AudioCodec
Source§impl From<AAC> for AudioCodec
impl From<AAC> for AudioCodec
Source§impl From<String> for AudioCodec
impl From<String> for AudioCodec
Source§impl FromStr for AudioCodec
impl FromStr for AudioCodec
Source§impl PartialEq for AudioCodec
impl PartialEq for AudioCodec
impl StructuralPartialEq for AudioCodec
Auto Trait Implementations§
impl Freeze for AudioCodec
impl RefUnwindSafe for AudioCodec
impl Send for AudioCodec
impl Sync for AudioCodec
impl Unpin for AudioCodec
impl UnsafeUnpin for AudioCodec
impl UnwindSafe for AudioCodec
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.