#[non_exhaustive]pub enum Error {
Show 19 variants
Ac3HeaderTooShort,
Ac3MissingSyncWord,
Ac3InvalidFrameSizeCode,
Ac3UnsupportedBsid(u8),
Ac3ReservedSampleRate,
Eac3HeaderTooShort,
Eac3MissingSyncWord,
Eac3NotEac3Bsid(u8),
Eac3ReservedStreamType,
Eac3DependentSubstream,
Eac3AdditionalSubstream(u8),
Eac3FrameShorterThanHeader(usize),
Eac3ReservedSampleRate,
Mp2HeaderTooShort,
Mp2MissingSync,
Mp2ReservedVersion,
Mp2NotLayerII,
Mp2ReservedSampleRate,
Mp2InvalidBitrate,
}Expand description
Legacy audio (MP2 / AC-3 / E-AC-3) header parsing errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ac3HeaderTooShort
An AC-3 header shorter than its 7 bytes.
Ac3MissingSyncWord
An AC-3 frame that does not start with its sync word.
Ac3InvalidFrameSizeCode
An AC-3 frame size code outside the table.
Ac3UnsupportedBsid(u8)
An AC-3 bitstream ID this build does not parse.
Ac3ReservedSampleRate
An AC-3 header with the reserved sample-rate code.
Eac3HeaderTooShort
An E-AC-3 header shorter than its 6 bytes.
Eac3MissingSyncWord
An E-AC-3 frame that does not start with its sync word.
Eac3NotEac3Bsid(u8)
A bitstream ID that is not E-AC-3.
Eac3ReservedStreamType
An E-AC-3 header with the reserved stream type.
Eac3DependentSubstream
An E-AC-3 dependent substream, which carries a 7.1+ layout.
Eac3AdditionalSubstream(u8)
An E-AC-3 independent substream past the first.
Eac3FrameShorterThanHeader(usize)
An E-AC-3 frame length shorter than its header.
Eac3ReservedSampleRate
An E-AC-3 header with the reserved sample-rate code.
Mp2HeaderTooShort
An MP2 header shorter than its 4 bytes.
Mp2MissingSync
An MP2 frame that does not start with its frame sync.
Mp2ReservedVersion
An MPEG audio header with the reserved or MPEG-2.5 version.
Mp2NotLayerII
An MPEG audio header for a layer other than II.
Mp2ReservedSampleRate
An MP2 header with the reserved sample-rate index.
Mp2InvalidBitrate
An MP2 header with a free-format or invalid bitrate.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()