pub enum SubtitleDecodeError {
Decode(Error),
Convert(ConvertError),
NoFrameReady,
FramePending,
}Expand description
Errors from FfmpegSubtitleStreamDecoder.
Variants§
Decode(Error)
The wrapped ffmpeg::decoder::Subtitle reported an error.
Convert(ConvertError)
Conversion from FFmpeg’s AVSubtitle to mediadecode’s
SubtitleFrame failed.
NoFrameReady
receive_frame was called with no buffered frame ready — caller
should send another packet.
FramePending
send_packet was called while a decoded frame from a previous
packet hasn’t been drained — the legacy decode() API can’t
queue, so the caller must drain via receive_frame first.
Implementations§
Source§impl SubtitleDecodeError
impl SubtitleDecodeError
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_no_frame_ready(&self) -> bool
pub const fn is_no_frame_ready(&self) -> bool
Returns true if this value is of type NoFrameReady. 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 SubtitleDecodeError
impl SubtitleDecodeError
Sourcepub fn unwrap_decode(self) -> Error
pub fn unwrap_decode(self) -> Error
Unwraps this value to the SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::Convert variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_no_frame_ready(self)
pub fn unwrap_no_frame_ready(self)
Unwraps this value to the SubtitleDecodeError::NoFrameReady variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_no_frame_ready_ref(&self)
pub fn unwrap_no_frame_ready_ref(&self)
Unwraps this reference to the SubtitleDecodeError::NoFrameReady variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_no_frame_ready_mut(&mut self)
pub fn unwrap_no_frame_ready_mut(&mut self)
Unwraps this mutable reference to the SubtitleDecodeError::NoFrameReady 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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::FramePending variant.
Panics if this value is of any other type.
Source§impl SubtitleDecodeError
impl SubtitleDecodeError
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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::Convert variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_no_frame_ready(self) -> Result<(), TryUnwrapError<Self>>
pub fn try_unwrap_no_frame_ready(self) -> Result<(), TryUnwrapError<Self>>
Attempts to unwrap this value to the SubtitleDecodeError::NoFrameReady variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_no_frame_ready_ref(&self) -> Result<(), TryUnwrapError<&Self>>
pub fn try_unwrap_no_frame_ready_ref(&self) -> Result<(), TryUnwrapError<&Self>>
Attempts to unwrap this reference to the SubtitleDecodeError::NoFrameReady variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_no_frame_ready_mut(
&mut self,
) -> Result<(), TryUnwrapError<&mut Self>>
pub fn try_unwrap_no_frame_ready_mut( &mut self, ) -> Result<(), TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the SubtitleDecodeError::NoFrameReady 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 SubtitleDecodeError::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 SubtitleDecodeError::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 SubtitleDecodeError::FramePending variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Debug for SubtitleDecodeError
impl Debug for SubtitleDecodeError
Source§impl Display for SubtitleDecodeError
impl Display for SubtitleDecodeError
Source§impl Error for SubtitleDecodeError
impl Error for SubtitleDecodeError
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()