objc2_video_toolbox/generated/VTErrors.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
6use crate::*;
7
8/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpropertynotsupportederr?language=objc)
9pub const kVTPropertyNotSupportedErr: OSStatus = -12900;
10/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpropertyreadonlyerr?language=objc)
11pub const kVTPropertyReadOnlyErr: OSStatus = -12901;
12/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtparametererr?language=objc)
13pub const kVTParameterErr: OSStatus = -12902;
14/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtinvalidsessionerr?language=objc)
15pub const kVTInvalidSessionErr: OSStatus = -12903;
16/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtallocationfailederr?language=objc)
17pub const kVTAllocationFailedErr: OSStatus = -12904;
18/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpixeltransfernotsupportederr?language=objc)
19pub const kVTPixelTransferNotSupportedErr: OSStatus = -12905;
20/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindvideodecodererr?language=objc)
21pub const kVTCouldNotFindVideoDecoderErr: OSStatus = -12906;
22/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotcreateinstanceerr?language=objc)
23pub const kVTCouldNotCreateInstanceErr: OSStatus = -12907;
24/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindvideoencodererr?language=objc)
25pub const kVTCouldNotFindVideoEncoderErr: OSStatus = -12908;
26/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderbaddataerr?language=objc)
27pub const kVTVideoDecoderBadDataErr: OSStatus = -12909;
28/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderunsupporteddataformaterr?language=objc)
29pub const kVTVideoDecoderUnsupportedDataFormatErr: OSStatus = -12910;
30/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecodermalfunctionerr?language=objc)
31pub const kVTVideoDecoderMalfunctionErr: OSStatus = -12911;
32/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencodermalfunctionerr?language=objc)
33pub const kVTVideoEncoderMalfunctionErr: OSStatus = -12912;
34/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecodernotavailablenowerr?language=objc)
35pub const kVTVideoDecoderNotAvailableNowErr: OSStatus = -12913;
36/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtimagerotationnotsupportederr?language=objc)
37pub const kVTImageRotationNotSupportedErr: OSStatus = -12914;
38/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpixelrotationnotsupportederr?language=objc)
39pub const kVTPixelRotationNotSupportedErr: OSStatus = -12914;
40/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencodernotavailablenowerr?language=objc)
41pub const kVTVideoEncoderNotAvailableNowErr: OSStatus = -12915;
42/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtformatdescriptionchangenotsupportederr?language=objc)
43pub const kVTFormatDescriptionChangeNotSupportedErr: OSStatus = -12916;
44/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtinsufficientsourcecolordataerr?language=objc)
45pub const kVTInsufficientSourceColorDataErr: OSStatus = -12917;
46/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotcreatecolorcorrectiondataerr?language=objc)
47pub const kVTCouldNotCreateColorCorrectionDataErr: OSStatus = -12918;
48/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcolorsynctransformconvertfailederr?language=objc)
49pub const kVTColorSyncTransformConvertFailedErr: OSStatus = -12919;
50/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderauthorizationerr?language=objc)
51pub const kVTVideoDecoderAuthorizationErr: OSStatus = -12210;
52/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderauthorizationerr?language=objc)
53pub const kVTVideoEncoderAuthorizationErr: OSStatus = -12211;
54/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcolorcorrectionpixeltransferfailederr?language=objc)
55pub const kVTColorCorrectionPixelTransferFailedErr: OSStatus = -12212;
56/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtmultipassstorageidentifiermismatcherr?language=objc)
57pub const kVTMultiPassStorageIdentifierMismatchErr: OSStatus = -12213;
58/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtmultipassstorageinvaliderr?language=objc)
59pub const kVTMultiPassStorageInvalidErr: OSStatus = -12214;
60/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtframesiloinvalidtimestamperr?language=objc)
61pub const kVTFrameSiloInvalidTimeStampErr: OSStatus = -12215;
62/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtframesiloinvalidtimerangeerr?language=objc)
63pub const kVTFrameSiloInvalidTimeRangeErr: OSStatus = -12216;
64/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindtemporalfiltererr?language=objc)
65pub const kVTCouldNotFindTemporalFilterErr: OSStatus = -12217;
66/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtpixeltransfernotpermittederr?language=objc)
67pub const kVTPixelTransferNotPermittedErr: OSStatus = -12218;
68/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcolorcorrectionimagerotationfailederr?language=objc)
69pub const kVTColorCorrectionImageRotationFailedErr: OSStatus = -12219;
70/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderremovederr?language=objc)
71pub const kVTVideoDecoderRemovedErr: OSStatus = -17690;
72/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtsessionmalfunctionerr?language=objc)
73pub const kVTSessionMalfunctionErr: OSStatus = -17691;
74/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderneedsrosettaerr?language=objc)
75pub const kVTVideoDecoderNeedsRosettaErr: OSStatus = -17692;
76/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderneedsrosettaerr?language=objc)
77pub const kVTVideoEncoderNeedsRosettaErr: OSStatus = -17693;
78/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderreferencemissingerr?language=objc)
79pub const kVTVideoDecoderReferenceMissingErr: OSStatus = -17694;
80/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecodercallbackmessagingerr?language=objc)
81pub const kVTVideoDecoderCallbackMessagingErr: OSStatus = -17695;
82/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderunknownerr?language=objc)
83pub const kVTVideoDecoderUnknownErr: OSStatus = -17696;
84/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtextensiondisablederr?language=objc)
85pub const kVTExtensionDisabledErr: OSStatus = -17697;
86/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencodermvhevcvideolayeridsmismatcherr?language=objc)
87pub const kVTVideoEncoderMVHEVCVideoLayerIDsMismatchErr: OSStatus = -17698;
88/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotoutputtaggedbuffergrouperr?language=objc)
89pub const kVTCouldNotOutputTaggedBufferGroupErr: OSStatus = -17699;
90/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtcouldnotfindextensionerr?language=objc)
91pub const kVTCouldNotFindExtensionErr: OSStatus = -19510;
92/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtextensionconflicterr?language=objc)
93pub const kVTExtensionConflictErr: OSStatus = -19511;
94/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtvideoencoderautowhitebalancenotlockederr?language=objc)
95pub const kVTVideoEncoderAutoWhiteBalanceNotLockedErr: OSStatus = -19512;
96
97/// Directives for the decompression session and the video decoder, passed into
98/// decodeFlags parameter of VTDecompressionSessionDecodeFrame.
99///
100///
101/// With the kVTDecodeFrame_EnableAsynchronousDecompression bit clear, the video decoder
102/// is compelled to emit every frame before it returns. With the bit set, the decoder may
103/// process frames asynchronously, but it is not compelled to do so.
104///
105/// A hint to the decompression session and video decoder that a CVImageBuffer should not
106/// be emitted for this frame. NULL will be returned instead.
107///
108/// A hint to the video decoder that it would be OK to use a low-power mode that can not decode faster than 1x realtime.
109///
110/// With the kVTDecodeFrame_EnableTemporalProcessing bit clear, the video decoder should emit
111/// every frame once that frame's decoding is done -- frames may not be delayed indefinitely. With
112/// the bit set, it is legal for the decoder to delay frames indefinitely -- at least
113/// until VTDecompressionSessionFinishDelayedFrames or VTDecompressionSessionInvalidate is called.
114///
115/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtdecodeframeflags?language=objc)
116// NS_OPTIONS
117#[repr(transparent)]
118#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
119pub struct VTDecodeFrameFlags(pub u32);
120bitflags::bitflags! {
121 impl VTDecodeFrameFlags: u32 {
122#[doc(alias = "kVTDecodeFrame_EnableAsynchronousDecompression")]
123 const Frame_EnableAsynchronousDecompression = 1<<0;
124#[doc(alias = "kVTDecodeFrame_DoNotOutputFrame")]
125 const Frame_DoNotOutputFrame = 1<<1;
126#[doc(alias = "kVTDecodeFrame_1xRealTimePlayback")]
127 const Frame_1xRealTimePlayback = 1<<2;
128#[doc(alias = "kVTDecodeFrame_EnableTemporalProcessing")]
129 const Frame_EnableTemporalProcessing = 1<<3;
130 }
131}
132
133#[cfg(feature = "objc2")]
134unsafe impl Encode for VTDecodeFrameFlags {
135 const ENCODING: Encoding = u32::ENCODING;
136}
137
138#[cfg(feature = "objc2")]
139unsafe impl RefEncode for VTDecodeFrameFlags {
140 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
141}
142
143/// Informational status for decoding -- non-error flags
144///
145///
146/// The kVTDecodeInfo_Asynchronous bit may be set if the decode ran asynchronously.
147///
148/// The kVTDecodeInfo_FrameDropped bit may be set if the frame was dropped.
149///
150/// If the kVTDecodeInfo_ImageBufferModifiable bit is set, it is safe for the client to modify the imageBuffer.
151///
152/// The kVTDecodeInfo_SkippedLeadingFrameDropped may be set if a leading frame after a sync frame is dropped.
153/// This can happen when a seek to a sync frame is initiated and, due to frame reordering, there are leading
154/// frames following the sync frame that cannot be decoded due to missing references. Dropping these frames
155/// has no impact to playback since the non-decodeable frames will not be rendered.
156/// If kVTDecodeInfo_SkippedLeadingFrameDropped is set, kVTDecodeInfo_FrameDropped will also be set.
157///
158/// The kVTDecodeInfo_FrameInterrupted bit may be set if the frame was decoded successfully but the decoded
159/// content was not provided in the output callback. When this bit is set, the imageBuffer provided to the output
160/// handler may either be NULL or contain only black pixels.
161///
162/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtdecodeinfoflags?language=objc)
163// NS_OPTIONS
164#[repr(transparent)]
165#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
166pub struct VTDecodeInfoFlags(pub u32);
167bitflags::bitflags! {
168 impl VTDecodeInfoFlags: u32 {
169 #[doc(alias = "kVTDecodeInfo_Asynchronous")]
170 const Asynchronous = 1<<0;
171 #[doc(alias = "kVTDecodeInfo_FrameDropped")]
172 const FrameDropped = 1<<1;
173 #[doc(alias = "kVTDecodeInfo_ImageBufferModifiable")]
174 const ImageBufferModifiable = 1<<2;
175 #[doc(alias = "kVTDecodeInfo_SkippedLeadingFrameDropped")]
176 const SkippedLeadingFrameDropped = 1<<3;
177 #[doc(alias = "kVTDecodeInfo_FrameInterrupted")]
178 const FrameInterrupted = 1<<4;
179 }
180}
181
182#[cfg(feature = "objc2")]
183unsafe impl Encode for VTDecodeInfoFlags {
184 const ENCODING: Encoding = u32::ENCODING;
185}
186
187#[cfg(feature = "objc2")]
188unsafe impl RefEncode for VTDecodeInfoFlags {
189 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
190}
191
192/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtencodeinfoflags?language=objc)
193// NS_OPTIONS
194#[repr(transparent)]
195#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
196pub struct VTEncodeInfoFlags(pub u32);
197bitflags::bitflags! {
198 impl VTEncodeInfoFlags: u32 {
199 #[doc(alias = "kVTEncodeInfo_Asynchronous")]
200 const Asynchronous = 1<<0;
201 #[doc(alias = "kVTEncodeInfo_FrameDropped")]
202 const FrameDropped = 1<<1;
203 }
204}
205
206#[cfg(feature = "objc2")]
207unsafe impl Encode for VTEncodeInfoFlags {
208 const ENCODING: Encoding = u32::ENCODING;
209}
210
211#[cfg(feature = "objc2")]
212unsafe impl RefEncode for VTEncodeInfoFlags {
213 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
214}