#[non_exhaustive]pub enum FrameError {
TooManyVideoPlanes(TooManyVideoPlanes),
TooManyAudioPlanes(TooManyAudioPlanes),
TooManyImagePlanes(TooManyImagePlanes),
}Expand description
Errors returned by the try_new constructors on the frame types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TooManyVideoPlanes(TooManyVideoPlanes)
VideoFrame::try_new was called with plane_count > 4. The
fixed plane array has exactly 4 slots; plane_count values
up to and including 4 are accepted, larger values would
later panic inside VideoFrame::planes far from the
construction site. See TooManyVideoPlanes for the
payload details. #[from] gives a free
impl From<TooManyVideoPlanes> for FrameError, so inner
helpers that return Result<_, TooManyVideoPlanes> can be
?-propagated into FrameError directly.
TooManyAudioPlanes(TooManyAudioPlanes)
AudioFrame::try_new was called with plane_count > 8. The
fixed plane array has exactly 8 slots (matches FFmpeg’s
AV_NUM_DATA_POINTERS). See TooManyAudioPlanes for the
payload details. #[from] gives a free
impl From<TooManyAudioPlanes> for FrameError.
TooManyImagePlanes(TooManyImagePlanes)
ImageFrame::try_new was called with plane_count > 4. The
fixed plane array has exactly 4 slots — the same cap the video
household carries, and for the same reason: packed RGB is 1,
MJPEG’s YUV is 3, and an alpha channel makes 4. See
TooManyImagePlanes for the payload details. #[from] gives a
free impl From<TooManyImagePlanes> for FrameError.
Implementations§
Source§impl FrameError
impl FrameError
Sourcepub const fn is_too_many_video_planes(&self) -> bool
pub const fn is_too_many_video_planes(&self) -> bool
Returns true if this value is of type TooManyVideoPlanes. Returns false otherwise
Sourcepub const fn is_too_many_audio_planes(&self) -> bool
pub const fn is_too_many_audio_planes(&self) -> bool
Returns true if this value is of type TooManyAudioPlanes. Returns false otherwise
Sourcepub const fn is_too_many_image_planes(&self) -> bool
pub const fn is_too_many_image_planes(&self) -> bool
Returns true if this value is of type TooManyImagePlanes. Returns false otherwise
Trait Implementations§
Source§impl Clone for FrameError
impl Clone for FrameError
Source§fn clone(&self) -> FrameError
fn clone(&self) -> FrameError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FrameError
Source§impl Debug for FrameError
impl Debug for FrameError
Source§impl Display for FrameError
impl Display for FrameError
impl Eq for FrameError
Source§impl Error for FrameError
impl Error for FrameError
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()