#[non_exhaustive]pub enum VideoDecodeError {
Decode(Error),
Convert(ConvertError),
PostCommitNeverResynced(PostCommitNeverResynced),
}Expand description
Error type for [FfmpegVideoStreamDecoder] — faults and the
send-side refusal.
Every arm here is something that went wrong or something the push
face declined. The drain’s needs input and ended are
Received states out of receive_frame; they used to arrive as
Decode(Ffmpeg(Other { errno: EAGAIN })) and Decode(Ffmpeg(Eof)),
which is to say they had no name at this tier at all.
Self::PostCommitNeverResynced is the deliberate exception on the
end-of-stream road: it is not “the stream ended”, it is “the stream
ended and the tail was lost”, which is a fault.
Open fault taxonomy, so it is #[non_exhaustive]. New ways to
fail are discovered — a backend, a ceiling, a corruption a codec
learns to report — and a consumer that meets one it has never heard
of should take its generic-fault path. That is exactly what the
wildcard arm this attribute forces is for. The two status
vocabularies opposite it,
Sent and Received,
are exhaustive for the mirror-image reason: their arms are the
substrate’s fixed state set, and there the wildcard would be dead
weight hiding a state a consumer forgot.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Decode(Error)
The wrapped decoder (HW or SW) reported an error.
Convert(ConvertError)
Frame conversion from FFmpeg’s native types to mediadecode’s types failed.
PostCommitNeverResynced(PostCommitNeverResynced)
A post-commit HW->SW fallback degraded the stream but the software decoder reached EOF without ever producing a frame.
Implementations§
Source§impl VideoDecodeError
impl VideoDecodeError
Sourcepub const fn is_decode(&self) -> bool
pub const fn is_decode(&self) -> bool
Returns true if this value is of type Decode. Returns false otherwise
Sourcepub const fn is_convert(&self) -> bool
pub const fn is_convert(&self) -> bool
Returns true if this value is of type Convert. Returns false otherwise
Sourcepub const fn is_post_commit_never_resynced(&self) -> bool
pub const fn is_post_commit_never_resynced(&self) -> bool
Returns true if this value is of type PostCommitNeverResynced. Returns false otherwise
Source§impl VideoDecodeError
impl VideoDecodeError
Sourcepub fn unwrap_decode(self) -> Error
pub fn unwrap_decode(self) -> Error
Unwraps this value to the VideoDecodeError::Decode variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_decode_ref(&self) -> &Error
pub fn unwrap_decode_ref(&self) -> &Error
Unwraps this reference to the VideoDecodeError::Decode variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_decode_mut(&mut self) -> &mut Error
pub fn unwrap_decode_mut(&mut self) -> &mut Error
Unwraps this mutable reference to the VideoDecodeError::Decode variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_convert(self) -> ConvertError
pub fn unwrap_convert(self) -> ConvertError
Unwraps this value to the VideoDecodeError::Convert variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_convert_ref(&self) -> &ConvertError
pub fn unwrap_convert_ref(&self) -> &ConvertError
Unwraps this reference to the VideoDecodeError::Convert variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_convert_mut(&mut self) -> &mut ConvertError
pub fn unwrap_convert_mut(&mut self) -> &mut ConvertError
Unwraps this mutable reference to the VideoDecodeError::Convert variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_post_commit_never_resynced(self) -> PostCommitNeverResynced
pub fn unwrap_post_commit_never_resynced(self) -> PostCommitNeverResynced
Unwraps this value to the VideoDecodeError::PostCommitNeverResynced variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_post_commit_never_resynced_ref(&self) -> &PostCommitNeverResynced
pub fn unwrap_post_commit_never_resynced_ref(&self) -> &PostCommitNeverResynced
Unwraps this reference to the VideoDecodeError::PostCommitNeverResynced variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_post_commit_never_resynced_mut(
&mut self,
) -> &mut PostCommitNeverResynced
pub fn unwrap_post_commit_never_resynced_mut( &mut self, ) -> &mut PostCommitNeverResynced
Unwraps this mutable reference to the VideoDecodeError::PostCommitNeverResynced variant.
Panics if this value is of any other type.
Source§impl VideoDecodeError
impl VideoDecodeError
Sourcepub fn try_unwrap_decode(self) -> Result<Error, TryUnwrapError<Self>>
pub fn try_unwrap_decode(self) -> Result<Error, TryUnwrapError<Self>>
Attempts to unwrap this value to the VideoDecodeError::Decode variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_decode_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
pub fn try_unwrap_decode_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the VideoDecodeError::Decode variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_decode_mut(
&mut self,
) -> Result<&mut Error, TryUnwrapError<&mut Self>>
pub fn try_unwrap_decode_mut( &mut self, ) -> Result<&mut Error, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the VideoDecodeError::Decode variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_convert(self) -> Result<ConvertError, TryUnwrapError<Self>>
pub fn try_unwrap_convert(self) -> Result<ConvertError, TryUnwrapError<Self>>
Attempts to unwrap this value to the VideoDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_convert_ref(
&self,
) -> Result<&ConvertError, TryUnwrapError<&Self>>
pub fn try_unwrap_convert_ref( &self, ) -> Result<&ConvertError, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the VideoDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_convert_mut(
&mut self,
) -> Result<&mut ConvertError, TryUnwrapError<&mut Self>>
pub fn try_unwrap_convert_mut( &mut self, ) -> Result<&mut ConvertError, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the VideoDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_post_commit_never_resynced(
self,
) -> Result<PostCommitNeverResynced, TryUnwrapError<Self>>
pub fn try_unwrap_post_commit_never_resynced( self, ) -> Result<PostCommitNeverResynced, TryUnwrapError<Self>>
Attempts to unwrap this value to the VideoDecodeError::PostCommitNeverResynced variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_post_commit_never_resynced_ref(
&self,
) -> Result<&PostCommitNeverResynced, TryUnwrapError<&Self>>
pub fn try_unwrap_post_commit_never_resynced_ref( &self, ) -> Result<&PostCommitNeverResynced, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the VideoDecodeError::PostCommitNeverResynced variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_post_commit_never_resynced_mut(
&mut self,
) -> Result<&mut PostCommitNeverResynced, TryUnwrapError<&mut Self>>
pub fn try_unwrap_post_commit_never_resynced_mut( &mut self, ) -> Result<&mut PostCommitNeverResynced, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the VideoDecodeError::PostCommitNeverResynced variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Debug for VideoDecodeError
impl Debug for VideoDecodeError
Source§impl Display for VideoDecodeError
impl Display for VideoDecodeError
Source§impl Error for VideoDecodeError
impl Error for VideoDecodeError
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()