#[non_exhaustive]pub enum VTError {
Show 13 variants
SessionCreateFailed(OSStatus),
SetPropertyFailed {
key: String,
status: OSStatus,
},
PrepareFailed(OSStatus),
EncodeFailed(OSStatus),
CompleteFailed(OSStatus),
PixelBufferCreateFailed(i32),
EncoderCallback(OSStatus),
ApiFailed {
api: &'static str,
status: OSStatus,
},
UnexpectedSampleCount {
operation: &'static str,
expected: usize,
actual: i64,
},
TimedOut {
operation: &'static str,
},
InvalidArgument(String),
Unsupported {
api: &'static str,
minimum: &'static str,
},
CommandBuffer(CommandBufferError),
}Expand description
Top-level error returned by all fallible APIs in this crate.
Wraps Apple’s OSStatus and tags the call site so the user can tell
“the encoder failed to create” apart from “the encoder rejected this frame”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SessionCreateFailed(OSStatus)
VTCompressionSessionCreate returned non-zero.
SetPropertyFailed
VTSessionSetProperty returned non-zero. The String identifies which property.
PrepareFailed(OSStatus)
VTCompressionSessionPrepareToEncodeFrames returned non-zero.
EncodeFailed(OSStatus)
VTCompressionSessionEncodeFrame returned non-zero.
CompleteFailed(OSStatus)
VTCompressionSessionCompleteFrames returned non-zero.
PixelBufferCreateFailed(i32)
CVPixelBufferCreateWithIOSurface returned non-zero or NULL.
EncoderCallback(OSStatus)
The user-supplied async callback reported a non-zero status when encoding a frame.
ApiFailed
A specific VideoToolbox / CoreVideo / CoreMedia API returned non-zero.
UnexpectedSampleCount
A one-shot operation received a buffer containing an unsupported number of samples.
TimedOut
A bounded bridge operation did not finish before its deadline.
InvalidArgument(String)
An invalid argument was supplied (e.g. zero width).
Unsupported
CommandBuffer(CommandBufferError)
frame_processor only.Implementations§
Trait Implementations§
impl Eq for VTError
Source§impl Error for VTError
impl Error for VTError
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()