pub enum DecoderError {
EndOfFile,
FileReadError {
cause: String,
},
GenericDecodeError {
cause: String,
},
NoVideoStream,
NoDecoder,
UnsupportedDecoder,
VariableFormat,
VariableResolution,
VariableFramerate,
UnsupportedChromaSubsampling {
x: usize,
y: usize,
},
UnsupportedFormat {
fmt: String,
},
}Expand description
Errors that can occur during video decoding operations.
This enum represents all possible error conditions that may arise when decoding video files using the av-decoders library. Errors range from file I/O issues to unsupported video formats and decoder-specific problems.
Variants§
EndOfFile
Indicates that the end of the video file has been reached.
This is returned when attempting to read frames beyond the end of the video stream. This is typically not an error condition but rather a normal end-of-stream indicator.
FileReadError
Failed to read or open the input video file.
This error occurs when the decoder cannot access the specified file, either due to file permissions, file not found, or other I/O related issues.
GenericDecodeError
Generic decoder error for issues not covered by specific error types.
This is a catch-all error for various decoding problems that don’t fit into other categories, providing additional context through the cause string.
NoVideoStream
No video stream found in the input file.
This error is returned when the input file doesn’t contain any decodeable video streams, or when all video streams are in unsupported formats.
NoDecoder
No suitable decoder available for the input file.
This occurs when none of the available decoders can handle the input format.
Consider enabling additional features like ffmpeg or vapoursynth to
support more video formats.
UnsupportedDecoder
The current decoder does not support the function which is being called.
VariableFormat
Variable format video clips are not supported.
This error is returned when the video file contains streams with changing pixel formats throughout the video, which is currently not supported by this library.
VariableResolution
Variable resolution video clips are not supported.
This error occurs when the video resolution changes during playback, which is not currently supported. All frames must have the same dimensions.
VariableFramerate
Variable framerate video clips are not supported.
This error is returned when the video has a variable framerate (VFR), where the time between frames is not constant. Only constant framerate videos are currently supported.
UnsupportedChromaSubsampling
Unsupported chroma subsampling format.
This error occurs when the video uses a chroma subsampling scheme that
is not supported by the decoder. The x and y values indicate the
horizontal and vertical subsampling factors respectively.
Fields
UnsupportedFormat
Unsupported video format.
This error is returned when the video uses a pixel format or codec that is not supported by the current decoder configuration.
Trait Implementations§
Source§impl Clone for DecoderError
impl Clone for DecoderError
Source§fn clone(&self) -> DecoderError
fn clone(&self) -> DecoderError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more