pub enum Error {
Show 13 variants
CodecInterfaceNotAvailable,
CodecControlFailed(vpx_codec_err_t, String),
EncoderConfigInitFailed(vpx_codec_err_t, String),
VpxCodecInitFailed(vpx_codec_err_t, String),
UnsupportedRateControlMode,
ErrorWrappingImage,
ErrorEncodingImage(vpx_codec_err_t, String),
ErrorDecodingBitstream(vpx_codec_err_t, String),
InvalidImageFormat(vpx_img_fmt),
ImageDataBadLength {
expected: usize,
received: usize,
},
WidthNotMultipleOfTwo,
HeightNotMultipleOfTwo,
InvalidProfileSelected,
}Expand description
Error enums returned by this crate. Many variants include a
vpx_codec_err_t - this encodes the underlying libvpx library
error code. You can use this to fine-tune error reporting if you
so desire. The included string is a human-readable representation
of the error code as returned from libvpx.
Variants§
CodecInterfaceNotAvailable
An attempt to instantiate a given codec interface failed, probably because libvpx was compiled with that codec disabled.
CodecControlFailed(vpx_codec_err_t, String)
A call to Encoder::codec_control_set() failed. The attached
libvpx error code might tell you more information about why the
call failed (usually this is due to an argument value being invalid).
EncoderConfigInitFailed(vpx_codec_err_t, String)
There was an error initializing the encoder configuration.
VpxCodecInitFailed(vpx_codec_err_t, String)
Failed to initialize encoder or decoder context.
UnsupportedRateControlMode
The specified rate control mode (lossless) isn’t supported by the codec (VP8).
ErrorWrappingImage
libvpx returned an error trying to wrap an image for encoding.
ErrorEncodingImage(vpx_codec_err_t, String)
libvpx returned an error trying to encode the image we passed
it in Encoder::encode().
ErrorDecodingBitstream(vpx_codec_err_t, String)
libvpx returned an error trying to decode the bitstream we passed
it in Decoder::decode().
InvalidImageFormat(vpx_img_fmt)
We’ve encountered an invalid image format passed to us from libvpx.
ImageDataBadLength
The raw image data buffer has the wrong length for the specified image format, width and height (either too little or too much data compared to what a well-formed data buffer should have).
Fields
WidthNotMultipleOfTwo
The image width wasn’t a multiple of 2, but the passed image format requires it to be.
HeightNotMultipleOfTwo
The image height wasn’t a multiple of 2, but the passed image format requires it to be.
InvalidProfileSelected
Indicates that an attempt was made to set anything other than the default profile for VP8 (which only supports that).