DecoderError

Enum DecoderError 

Source
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.

Fields

§cause: String

The underlying cause of the error

§

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.

Fields

§cause: String

The underlying cause of the error

§

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

§x: usize

The horizontal chroma subsampling which triggered the error

§y: usize

The vertical chroma subsampling which triggered the error

§

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.

Fields

§fmt: String

The video format which triggered the error

Trait Implementations§

Source§

impl Clone for DecoderError

Source§

fn clone(&self) -> DecoderError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DecoderError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DecoderError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for DecoderError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.