#[non_exhaustive]pub enum Error {
HeadTooShort,
InvalidSignature,
UnsupportedVersion(u8),
UnsupportedChannelCount(u32),
MappingTableTooShort,
InvalidMappingTable,
UnsupportedMappingFamily(u8),
}Expand description
Opus parsing errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HeadTooShort
The OpusHead packet was shorter than the 19-byte minimum (RFC 7845 §5.1).
InvalidSignature
The packet did not start with the OpusHead magic signature.
UnsupportedVersion(u8)
The OpusHead major version (the upper four bits) is not one this parser understands, so none of its fields can be trusted (RFC 7845 §5.1).
UnsupportedChannelCount(u32)
The channel count is zero, or one the channel mapping family does not allow: family 0 covers mono/stereo, family 1 up to eight channels, and family 2 the square counts of first order ambisonics and up.
MappingTableTooShort
A nonzero channel mapping family without its complete mapping table.
InvalidMappingTable
The channel mapping table names no streams, more coupled streams than streams, or a channel index past the decoded streams.
UnsupportedMappingFamily(u8)
A channel mapping family the operation cannot carry: family 0 given to
Mapping::new, which has no table, or a container with no room for
the mapping, such as family 3’s demixing matrix in an fMP4 dOps.
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()