#[non_exhaustive]pub enum Error {
Show 15 variants
ConfigTooShort,
ExtendedConfigTooShort,
IncompleteConfig,
ExplicitSampleRateTooShort,
UnsupportedSampleRateIndex(u8),
ReservedChannelConfig(u8),
UnsupportedChannelCount(u32),
ProgramConfigUnsupported(u8),
ProgramConfigMissing,
ProgramConfigTruncated,
ProgramConfigEmpty,
MissingDescription,
UnsupportedConfig(&'static str),
TrailingBytes(usize),
Adts(Error),
}Expand description
AAC parsing errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConfigTooShort
The AudioSpecificConfig is shorter than its two-byte minimum.
ExtendedConfigTooShort
The extended audioObjectType is truncated.
IncompleteConfig
The AudioSpecificConfig ends before its required fields.
ExplicitSampleRateTooShort
The explicit sample rate is truncated.
UnsupportedSampleRateIndex(u8)
The sample rate index is unsupported.
ReservedChannelConfig(u8)
The channelConfiguration is a reserved value (8, 9, 10, or 15).
UnsupportedChannelCount(u32)
A channel count that does not pick a channelConfiguration on its own.
Counts 1 through 6 are that configuration, and 8 channels are configuration 7 (7.1). Seven channels (6.1, or configuration 11) and 24 (22.2, configuration 13) have a configuration but also program config element layouts, so the speaker positions are not guessed. Every other count has no configuration at all.
ProgramConfigUnsupported(u8)
A program config element is used with an object type that has no GASpecificConfig.
ProgramConfigMissing
ADTS signals a program config element, but none leads the first raw data block.
ProgramConfigTruncated
The program config element ends before its declared fields.
ProgramConfigEmpty
The program config element declares zero channels.
MissingDescription
Raw AAC publication needs an AudioSpecificConfig in the catalog.
UnsupportedConfig(&'static str)
The AudioSpecificConfig carries syntax an exact parse does not read, such as another object type’s specific config.
TrailingBytes(usize)
Whole bytes follow the AudioSpecificConfig’s last field.
Adts(Error)
An ADTS header or frame is invalid, or cannot carry the frame.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()