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/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtframeprocessorerror?language=objc)
21// NS_ERROR_ENUM
22#[cfg(feature = "objc2")]
23#[repr(transparent)]
24#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
25pub struct VTFrameProcessorError(pub NSInteger);
26#[cfg(feature = "objc2")]
27impl VTFrameProcessorError {
28    /// Returned if the processor failed for unknown reason.
29    #[doc(alias = "VTFrameProcessorUnknownError")]
30    pub const UnknownError: Self = Self(-19730);
31    /// Returned if the processor failed due to an unsupported resolution.
32    #[doc(alias = "VTFrameProcessorUnsupportedResolution")]
33    pub const UnsupportedResolution: Self = Self(-19731);
34    /// Returned if the session is used to process frames without being started.
35    #[doc(alias = "VTFrameProcessorSessionNotStarted")]
36    pub const SessionNotStarted: Self = Self(-19732);
37    /// Returned if a `startSessionWithConfiguration` call is made on a session which has already been started.
38    #[doc(alias = "VTFrameProcessorSessionAlreadyActive")]
39    pub const SessionAlreadyActive: Self = Self(-19733);
40    /// Returned if a fatal error is encoutnered during processing.
41    #[doc(alias = "VTFrameProcessorFatalError")]
42    pub const FatalError: Self = Self(-19734);
43    /// Returned if processing failed and current session should be stopped.
44    #[doc(alias = "VTFrameProcessorSessionLevelError")]
45    pub const SessionLevelError: Self = Self(-19735);
46    /// Returned if the session failed to initialize the processing pipeline.
47    #[doc(alias = "VTFrameProcessorInitializationFailed")]
48    pub const InitializationFailed: Self = Self(-19736);
49    /// Returned to indicate that one or more frames is in a format which is not supproted by the processor.
50    #[doc(alias = "VTFrameProcessorUnsupportedInput")]
51    pub const UnsupportedInput: Self = Self(-19737);
52    /// Returned if the session or processor is unable to allocate required memory.
53    #[doc(alias = "VTFrameProcessorMemoryAllocationFailure")]
54    pub const MemoryAllocationFailure: Self = Self(-19738);
55    /// Returned if the specifed revision is not supported by the configured processor.
56    #[doc(alias = "VTFrameProcessorRevisionNotSupported")]
57    pub const RevisionNotSupported: Self = Self(-19739);
58    /// Returned if the processor encountered an issue preventing it from processing the provided frame.
59    #[doc(alias = "VTFrameProcessorProcessingError")]
60    pub const ProcessingError: Self = Self(-19740);
61    /// Returned if one of the provided parameters is not valid.
62    #[doc(alias = "VTFrameProcessorInvalidParameterError")]
63    pub const InvalidParameterError: Self = Self(-19741);
64    /// Returned if one of the provided `VTFrameProcessorFrame` objects has a presentation time which is not supported by the processor, either invalid or out-of-order.
65    #[doc(alias = "VTFrameProcessorInvalidFrameTiming")]
66    pub const InvalidFrameTiming: Self = Self(-19742);
67    /// Returned if download of a required model asset for the processor failed
68    #[doc(alias = "VTFrameProcessorAssetDownloadFailed")]
69    pub const AssetDownloadFailed: Self = Self(-19743);
70}
71
72#[cfg(feature = "objc2")]
73unsafe impl Encode for VTFrameProcessorError {
74    const ENCODING: Encoding = NSInteger::ENCODING;
75}
76
77#[cfg(feature = "objc2")]
78unsafe impl RefEncode for VTFrameProcessorError {
79    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
80}