objc2_video_toolbox/generated/
VTFrameProcessorErrors.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3#[cfg(feature = "objc2")]
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-foundation")]
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtframeprocessorerrordomain?language=objc)
12    #[cfg(feature = "objc2-foundation")]
13    pub static VTFrameProcessorErrorDomain: Option<&'static NSErrorDomain>;
14}
15
16/// VTFrameProcessor  error codes.
17///
18/// These error codes are returned in the NSError object in the event a method fails.
19///
20/// Returned if the processor failed for unknown reason.
21///
22/// Returned if the processor failed due to an unsupported resolution.
23///
24/// Returned if the session is used to process frames without being started.
25///
26/// Returned if a startSessionWithConfiguration call is made on a session which has already been started.
27///
28/// Returned if a fatal error is encoutnered during processing.
29///
30/// Returned if processing failed and current session should be stopped.
31///
32/// Returned if the session failed to initialize the processing pipeline.
33///
34/// Returned to indicate that one or more frames is in a format which is not supproted by the processor.
35///
36/// Returned if the session or processor is unable to allocate required memory.
37///
38/// Returned if the specifed revision is not supported by the configured processor.
39///
40/// Returned if the processor encountered an issue preventing it from processing the provided frame.
41///
42/// Returned if one of the provided parameters is not valid.
43///
44/// Returned if one of the provided VTFrameProcessorFrame objects has a PTS which is not supported by the processor, either invalid or out-of-order.
45///
46/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtframeprocessorerror?language=objc)
47// NS_ERROR_ENUM
48#[cfg(feature = "objc2")]
49#[repr(transparent)]
50#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
51pub struct VTFrameProcessorError(pub NSInteger);
52#[cfg(feature = "objc2")]
53impl VTFrameProcessorError {
54    #[doc(alias = "VTFrameProcessorUnknownError")]
55    pub const UnknownError: Self = Self(-19730);
56    #[doc(alias = "VTFrameProcessorUnsupportedResolution")]
57    pub const UnsupportedResolution: Self = Self(-19731);
58    #[doc(alias = "VTFrameProcessorSessionNotStarted")]
59    pub const SessionNotStarted: Self = Self(-19732);
60    #[doc(alias = "VTFrameProcessorSessionAlreadyActive")]
61    pub const SessionAlreadyActive: Self = Self(-19733);
62    #[doc(alias = "VTFrameProcessorFatalError")]
63    pub const FatalError: Self = Self(-19734);
64    #[doc(alias = "VTFrameProcessorSessionLevelError")]
65    pub const SessionLevelError: Self = Self(-19735);
66    #[doc(alias = "VTFrameProcessorInitializationFailed")]
67    pub const InitializationFailed: Self = Self(-19736);
68    #[doc(alias = "VTFrameProcessorUnsupportedInput")]
69    pub const UnsupportedInput: Self = Self(-19737);
70    #[doc(alias = "VTFrameProcessorMemoryAllocationFailure")]
71    pub const MemoryAllocationFailure: Self = Self(-19738);
72    #[doc(alias = "VTFrameProcessorRevisionNotSupported")]
73    pub const RevisionNotSupported: Self = Self(-19739);
74    #[doc(alias = "VTFrameProcessorProcessingError")]
75    pub const ProcessingError: Self = Self(-19740);
76    #[doc(alias = "VTFrameProcessorInvalidParameterError")]
77    pub const InvalidParameterError: Self = Self(-19741);
78    #[doc(alias = "VTFrameProcessorInvalidFrameTiming")]
79    pub const InvalidFrameTiming: Self = Self(-19742);
80}
81
82#[cfg(feature = "objc2")]
83unsafe impl Encode for VTFrameProcessorError {
84    const ENCODING: Encoding = NSInteger::ENCODING;
85}
86
87#[cfg(feature = "objc2")]
88unsafe impl RefEncode for VTFrameProcessorError {
89    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
90}