#[non_exhaustive]pub enum VorbisOptimizerError {
Show 30 variants
InvalidPacketType(TryPacketTypeFromInt),
UnexpectedPacketType {
expected_type: PacketType,
actual_type: PacketType,
},
TooSmallPacket(usize),
InvalidPattern,
UnexpectedHeaderPacketLength {
header_type: PacketType,
expected_length: usize,
actual_length: usize,
},
IncompatibleVorbisVersion(u32),
InvalidChannelCount(u8),
InvalidSamplingFrequency(u32),
InvalidBlocksizes(u16, u16),
TooBigInteger(TryFromIntError),
InvalidSetupValue,
TooBigCodewordLength,
ReservedLookupType(TryVectorLookupTypeFromInt),
InvalidCodebookDimension {
codebook: u8,
dimensions: u16,
expected_dimensions_multiple_of: u32,
},
UnsupportedFloorType(u16),
InvalidCodebookNumber(u8),
RepeatedFloor1Point(u8),
TooManyFloor1Points(u8),
ReservedResidueType(TryResidueTypeFromInt),
ReservedMappingType(u16),
InvalidChannelMapping {
magnitude_channel: u8,
angle_channel: u8,
audio_channels: u8,
},
InvalidChannelMultiplexing {
mux_submap: u8,
mapping_submap_count: u8,
},
InvalidFloorNumber(u8),
InvalidResidueNumber(u8),
InvalidMappingNumber(u8),
ScalarCodebookUsedInVectorContext(u8),
InvalidVectorQuantizationClassbook(usize),
InvalidModeNumber(u8),
CodebookError(VorbisCodebookError),
Io(Error),
}Expand description
Represents an error that may occur while optimizing a Vorbis stream. This error can
be returned by VorbisOptimizer methods.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidPacketType(TryPacketTypeFromInt)
A Vorbis packet is of an invalid type.
UnexpectedPacketType
A Vorbis packet was not of the expected type within a context.
Fields
expected_type: PacketTypeThe expected packet type.
actual_type: PacketTypeThe actual packet type.
TooSmallPacket(usize)
A Vorbis packet is too small to contain valid data.
InvalidPattern
A Vorbis data pattern, such as a fixed signature or sync pattern, was expected but not found in the stream.
UnexpectedHeaderPacketLength
A Vorbis header packet does not have the expected length for it to contain valid data.
Fields
header_type: PacketTypeThe type of the header packet.
IncompatibleVorbisVersion(u32)
The Vorbis stream reports to follow an unsupported version of the Vorbis specification.
InvalidChannelCount(u8)
The reported number of channels in the Vorbis identification header is not valid.
InvalidSamplingFrequency(u32)
The reported sampling frequency in the Vorbis identification header is not valid.
InvalidBlocksizes(u16, u16)
The reported block sizes in the Vorbis identification header are not valid.
TooBigInteger(TryFromIntError)
A integer conversion failed because the word size of this platform is not wide
enough to hold its value. Optimizing on a platform with a bigger word size (i.e.,
usize size) may help.
InvalidSetupValue
A value in the Vorbis I setup header was found to be invalid or incoherent.
TooBigCodewordLength
A codebook codeword in the Vorbis I setup header is too long.
ReservedLookupType(TryVectorLookupTypeFromInt)
The Vorbis I setup header referenced a codebook lookup type that is reserved by the Vorbis I specification.
InvalidCodebookDimension
A Vorbis I audio packet tried to decode a vector using a codebook that yields vectors of dimension zero, which is invalid, or of a dimension that does not fit in the residue vector.
Fields
UnsupportedFloorType(u16)
The Vorbis I setup header referenced an unsupported floor type.
InvalidCodebookNumber(u8)
The Vorbis I setup header referenced a codebook that is undefined.
RepeatedFloor1Point(u8)
The Vorbis I setup header contained a floor configuration of type 1 that referenced duplicated curve X points.
TooManyFloor1Points(u8)
The Vorbis I setup header contained a floor configuration of type 1 that contains curve X points than allowed by the specification.
ReservedResidueType(TryResidueTypeFromInt)
The Vorbis I setup header referenced a residue type that is reserved by the Vorbis I specification.
ReservedMappingType(u16)
The Vorbis I setup header referenced a channel mapping type that is reserved by the Vorbis I specification.
InvalidChannelMapping
The Vorbis I setup header referenced a channel mapping that was found to be invalid for the stream.
Fields
InvalidChannelMultiplexing
The Vorbis I setup header referenced a channel multiplexing that was found to be invalid for the stream.
InvalidFloorNumber(u8)
The Vorbis I setup header referenced a floor that is invalid.
InvalidResidueNumber(u8)
The Vorbis I setup header referenced a residue that is invalid.
InvalidMappingNumber(u8)
The Vorbis I setup header referenced a mapping that is invalid.
ScalarCodebookUsedInVectorContext(u8)
A Vorbis I audio packet tried to decode a vector using a codebook that can only yield scalar values, due to its vector lookup type being “no lookup”.
InvalidVectorQuantizationClassbook(usize)
A Vorbis I audio packet tried to decode a residue vector by using a codebook that was not defined.
InvalidModeNumber(u8)
A Vorbis I audio packet was encoded with a mode that was not defined in the setup header.
CodebookError(VorbisCodebookError)
An error occurred while performing an operation with a Vorbis codebook.
Io(Error)
An I/O error occurred while handling a Vorbis packet.