pub enum VideoDecodeError {
Decode(Error),
Convert(ConvertError),
PostCommitNeverResynced(PostCommitNeverResynced),
FramePending,
}Expand description
Error type for [FfmpegVideoStreamDecoder].
Variants§
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.
FramePending
A decoded frame is parked, waiting for a conversion that can commit, and nothing may be sent until it has been delivered.
The answer is VideoStreamDecoder::receive_frame: it re-attempts
the parked frame. A caller who would rather abandon it calls
flush, which clears the seat with the rest of the decoder’s
position.
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
Sourcepub const fn is_frame_pending(&self) -> bool
pub const fn is_frame_pending(&self) -> bool
Returns true if this value is of type FramePending. 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.
Sourcepub fn unwrap_frame_pending(self)
pub fn unwrap_frame_pending(self)
Unwraps this value to the VideoDecodeError::FramePending variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_frame_pending_ref(&self)
pub fn unwrap_frame_pending_ref(&self)
Unwraps this reference to the VideoDecodeError::FramePending variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_frame_pending_mut(&mut self)
pub fn unwrap_frame_pending_mut(&mut self)
Unwraps this mutable reference to the VideoDecodeError::FramePending 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.
Sourcepub fn try_unwrap_frame_pending(self) -> Result<(), TryUnwrapError<Self>>
pub fn try_unwrap_frame_pending(self) -> Result<(), TryUnwrapError<Self>>
Attempts to unwrap this value to the VideoDecodeError::FramePending variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_frame_pending_ref(&self) -> Result<(), TryUnwrapError<&Self>>
pub fn try_unwrap_frame_pending_ref(&self) -> Result<(), TryUnwrapError<&Self>>
Attempts to unwrap this reference to the VideoDecodeError::FramePending variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_frame_pending_mut(
&mut self,
) -> Result<(), TryUnwrapError<&mut Self>>
pub fn try_unwrap_frame_pending_mut( &mut self, ) -> Result<(), TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the VideoDecodeError::FramePending 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()