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
95/// Directives for the decompression session and the video decoder, passed into
96/// decodeFlags parameter of VTDecompressionSessionDecodeFrame.
97///
98///
99/// With the kVTDecodeFrame_EnableAsynchronousDecompression bit clear, the video decoder
100/// is compelled to emit every frame before it returns. With the bit set, the decoder may
101/// process frames asynchronously, but it is not compelled to do so.
102///
103/// A hint to the decompression session and video decoder that a CVImageBuffer should not
104/// be emitted for this frame. NULL will be returned instead.
105///
106/// 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.
107///
108/// With the kVTDecodeFrame_EnableTemporalProcessing bit clear, the video decoder should emit
109/// every frame once that frame's decoding is done -- frames may not be delayed indefinitely. With
110/// the bit set, it is legal for the decoder to delay frames indefinitely -- at least
111/// until VTDecompressionSessionFinishDelayedFrames or VTDecompressionSessionInvalidate is called.
112///
113/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtdecodeframeflags?language=objc)
114// NS_OPTIONS
115#[repr(transparent)]
116#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
117pub struct VTDecodeFrameFlags(pub u32);
118bitflags::bitflags! {
119 impl VTDecodeFrameFlags: u32 {
120#[doc(alias = "kVTDecodeFrame_EnableAsynchronousDecompression")] const Frame_EnableAsynchronousDecompression = 1<<0;
121#[doc(alias = "kVTDecodeFrame_DoNotOutputFrame")] const Frame_DoNotOutputFrame = 1<<1;
122#[doc(alias = "kVTDecodeFrame_1xRealTimePlayback")] const Frame_1xRealTimePlayback = 1<<2;
123#[doc(alias = "kVTDecodeFrame_EnableTemporalProcessing")] const Frame_EnableTemporalProcessing = 1<<3;
124 }
125}
126
127#[cfg(feature = "objc2")]
128unsafe impl Encode for VTDecodeFrameFlags {
129 const ENCODING: Encoding = u32::ENCODING;
130}
131
132#[cfg(feature = "objc2")]
133unsafe impl RefEncode for VTDecodeFrameFlags {
134 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
135}
136
137/// Informational status for decoding -- non-error flags
138///
139///
140/// The kVTDecodeInfo_Asynchronous bit may be set if the decode ran asynchronously.
141///
142/// The kVTDecodeInfo_FrameDropped bit may be set if the frame was dropped.
143///
144/// If the kVTDecodeInfo_ImageBufferModifiable bit is set, it is safe for the client to modify the imageBuffer.
145///
146/// The kVTDecodeInfo_SkippedLeadingFrameDropped may be set if a leading frame after a sync frame is dropped.
147/// This can happen when a seek to a sync frame is initiated and, due to frame reordering, there are leading
148/// frames following the sync frame that cannot be decoded due to missing references. Dropping these frames
149/// has no impact to playback since the non-decodeable frames will not be rendered.
150/// If kVTDecodeInfo_SkippedLeadingFrameDropped is set, kVTDecodeInfo_FrameDropped will also be set.
151///
152/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtdecodeinfoflags?language=objc)
153// NS_OPTIONS
154#[repr(transparent)]
155#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
156pub struct VTDecodeInfoFlags(pub u32);
157bitflags::bitflags! {
158 impl VTDecodeInfoFlags: u32 {
159 #[doc(alias = "kVTDecodeInfo_Asynchronous")]
160 const Asynchronous = 1<<0;
161 #[doc(alias = "kVTDecodeInfo_FrameDropped")]
162 const FrameDropped = 1<<1;
163 #[doc(alias = "kVTDecodeInfo_ImageBufferModifiable")]
164 const ImageBufferModifiable = 1<<2;
165 #[doc(alias = "kVTDecodeInfo_SkippedLeadingFrameDropped")]
166 const SkippedLeadingFrameDropped = 1<<3;
167 }
168}
169
170#[cfg(feature = "objc2")]
171unsafe impl Encode for VTDecodeInfoFlags {
172 const ENCODING: Encoding = u32::ENCODING;
173}
174
175#[cfg(feature = "objc2")]
176unsafe impl RefEncode for VTDecodeInfoFlags {
177 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
178}
179
180/// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtencodeinfoflags?language=objc)
181// NS_OPTIONS
182#[repr(transparent)]
183#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
184pub struct VTEncodeInfoFlags(pub u32);
185bitflags::bitflags! {
186 impl VTEncodeInfoFlags: u32 {
187 #[doc(alias = "kVTEncodeInfo_Asynchronous")]
188 const Asynchronous = 1<<0;
189 #[doc(alias = "kVTEncodeInfo_FrameDropped")]
190 const FrameDropped = 1<<1;
191 }
192}
193
194#[cfg(feature = "objc2")]
195unsafe impl Encode for VTEncodeInfoFlags {
196 const ENCODING: Encoding = u32::ENCODING;
197}
198
199#[cfg(feature = "objc2")]
200unsafe impl RefEncode for VTEncodeInfoFlags {
201 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
202}