objc2_core_media/generated/
CMFormatDescription.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::cell::UnsafeCell;
4use core::ffi::*;
5use core::marker::{PhantomData, PhantomPinned};
6use core::ptr::NonNull;
7#[cfg(feature = "objc2")]
8use objc2::__framework_prelude::*;
9#[cfg(feature = "objc2-core-audio-types")]
10use objc2_core_audio_types::*;
11use objc2_core_foundation::*;
12#[cfg(feature = "objc2-core-video")]
13use objc2_core_video::*;
14
15use crate::*;
16
17/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionerror_invalidparameter?language=objc)
18pub const kCMFormatDescriptionError_InvalidParameter: OSStatus = -12710;
19/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionerror_allocationfailed?language=objc)
20pub const kCMFormatDescriptionError_AllocationFailed: OSStatus = -12711;
21/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionerror_valuenotavailable?language=objc)
22pub const kCMFormatDescriptionError_ValueNotAvailable: OSStatus = -12718;
23
24/// A reference to a CMFormatDescription, a CF object describing media of a particular type (audio, video, muxed, etc).
25///
26/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmformatdescription?language=objc)
27#[doc(alias = "CMFormatDescriptionRef")]
28#[repr(C)]
29pub struct CMFormatDescription {
30    inner: [u8; 0],
31    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
32}
33
34cf_type!(
35    unsafe impl CMFormatDescription {}
36);
37#[cfg(feature = "objc2")]
38cf_objc2_type!(
39    unsafe impl RefEncode<"opaqueCMFormatDescription"> for CMFormatDescription {}
40);
41
42unsafe impl Send for CMFormatDescription {}
43
44unsafe impl Sync for CMFormatDescription {}
45
46/// The type of media described by a CMFormatDescription.
47///
48/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmmediatype?language=objc)
49pub type CMMediaType = FourCharCode;
50
51/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_video?language=objc)
52pub const kCMMediaType_Video: CMMediaType = 0x76696465;
53/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_audio?language=objc)
54pub const kCMMediaType_Audio: CMMediaType = 0x736f756e;
55/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_muxed?language=objc)
56pub const kCMMediaType_Muxed: CMMediaType = 0x6d757878;
57/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_text?language=objc)
58pub const kCMMediaType_Text: CMMediaType = 0x74657874;
59/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_closedcaption?language=objc)
60pub const kCMMediaType_ClosedCaption: CMMediaType = 0x636c6370;
61/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_subtitle?language=objc)
62pub const kCMMediaType_Subtitle: CMMediaType = 0x7362746c;
63/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_timecode?language=objc)
64pub const kCMMediaType_TimeCode: CMMediaType = 0x746d6364;
65/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_metadata?language=objc)
66pub const kCMMediaType_Metadata: CMMediaType = 0x6d657461;
67/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_taggedbuffergroup?language=objc)
68pub const kCMMediaType_TaggedBufferGroup: CMMediaType = 0x74626772;
69
70/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmediatype_auxiliarypicture?language=objc)
71pub const kCMMediaType_AuxiliaryPicture: CMMediaType = 0x61757876;
72
73impl CMFormatDescription {
74    /// Creates a generic CMFormatDescription object.
75    ///
76    /// Use this call to create any CMFormatDescription that is composed solely of extensions, and for which
77    /// CFEqual() of a the extensions dictionaries is a valid test for Format Description equality.  Note that
78    /// for some media types using this routine may result in creating a format description that is not fully
79    /// specified for the purpose of media processing. Whenever possible, use media-specific format description
80    /// creations routines such as CMVideoFormatDescriptionCreate, CMAudioFormatDescriptionCreate, etc.
81    ///
82    /// Returns: A new CMFormatDescription object.
83    ///
84    /// # Safety
85    ///
86    /// - `extensions` generics must be of the correct type.
87    /// - `format_description_out` must be a valid pointer.
88    #[doc(alias = "CMFormatDescriptionCreate")]
89    #[inline]
90    pub unsafe fn create(
91        allocator: Option<&CFAllocator>,
92        media_type: CMMediaType,
93        media_sub_type: FourCharCode,
94        extensions: Option<&CFDictionary>,
95        format_description_out: NonNull<*const CMFormatDescription>,
96    ) -> OSStatus {
97        extern "C-unwind" {
98            fn CMFormatDescriptionCreate(
99                allocator: Option<&CFAllocator>,
100                media_type: CMMediaType,
101                media_sub_type: FourCharCode,
102                extensions: Option<&CFDictionary>,
103                format_description_out: NonNull<*const CMFormatDescription>,
104            ) -> OSStatus;
105        }
106        unsafe {
107            CMFormatDescriptionCreate(
108                allocator,
109                media_type,
110                media_sub_type,
111                extensions,
112                format_description_out,
113            )
114        }
115    }
116}
117
118unsafe impl ConcreteType for CMFormatDescription {
119    /// Returns the CFTypeID of CMFormatDescription objects.
120    ///
121    /// You can check if a CFTypeRef object is actually a CMFormatDescription
122    /// by comparing CFGetTypeID(object) with CMFormatDescriptionGetTypeID().
123    #[doc(alias = "CMFormatDescriptionGetTypeID")]
124    #[inline]
125    fn type_id() -> CFTypeID {
126        extern "C-unwind" {
127            fn CMFormatDescriptionGetTypeID() -> CFTypeID;
128        }
129        unsafe { CMFormatDescriptionGetTypeID() }
130    }
131}
132
133impl CMFormatDescription {
134    /// Compares two CMFormatDescription objects for equality.
135    ///
136    /// This calls CFEqual on the provided CMFormatDescription objects.
137    /// In contrast to the CF call it is NULL safe.
138    #[doc(alias = "CMFormatDescriptionEqual")]
139    #[inline]
140    pub unsafe fn equal(
141        format_description: Option<&CMFormatDescription>,
142        other_format_description: Option<&CMFormatDescription>,
143    ) -> bool {
144        extern "C-unwind" {
145            fn CMFormatDescriptionEqual(
146                format_description: Option<&CMFormatDescription>,
147                other_format_description: Option<&CMFormatDescription>,
148            ) -> Boolean;
149        }
150        let ret = unsafe { CMFormatDescriptionEqual(format_description, other_format_description) };
151        ret != 0
152    }
153
154    /// Compares two CMFormatDescription objects for equality, ignoring differences in specified lists of format description extension keys and sample description extension keys.
155    ///
156    /// This function is NULL safe.
157    /// If any keys are passed, kCMFormatDescriptionExtension_VerbatimSampleDescription
158    /// and kCMFormatDescriptionExtension_VerbatimISOSampleEntry will also be automatically
159    /// ignored for the purpose of comparison.
160    ///
161    /// Parameter `formatDescriptionExtensionKeysToIgnore`: Either a single format description extension key (CFString)
162    /// or a CFArray of such keys.
163    ///
164    /// Parameter `sampleDescriptionExtensionAtomKeysToIgnore`: Either a single sample description extension atom key (four-character CFString)
165    /// or a CFArray of such keys.
166    /// See kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms.
167    ///
168    /// # Safety
169    ///
170    /// - `format_description_extension_keys_to_ignore` should be of the correct type.
171    /// - `sample_description_extension_atom_keys_to_ignore` should be of the correct type.
172    #[doc(alias = "CMFormatDescriptionEqualIgnoringExtensionKeys")]
173    #[inline]
174    pub unsafe fn equal_ignoring_extension_keys(
175        format_description: Option<&CMFormatDescription>,
176        other_format_description: Option<&CMFormatDescription>,
177        format_description_extension_keys_to_ignore: Option<&CFType>,
178        sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
179    ) -> bool {
180        extern "C-unwind" {
181            fn CMFormatDescriptionEqualIgnoringExtensionKeys(
182                format_description: Option<&CMFormatDescription>,
183                other_format_description: Option<&CMFormatDescription>,
184                format_description_extension_keys_to_ignore: Option<&CFType>,
185                sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
186            ) -> Boolean;
187        }
188        let ret = unsafe {
189            CMFormatDescriptionEqualIgnoringExtensionKeys(
190                format_description,
191                other_format_description,
192                format_description_extension_keys_to_ignore,
193                sample_description_extension_atom_keys_to_ignore,
194            )
195        };
196        ret != 0
197    }
198
199    /// Returns the media type of a CMFormatDescription.
200    ///
201    /// For example, returns kCMMediaType_Audio for a description of an audio stream.
202    ///
203    /// Returns: The media type of the CMFormatDescription.
204    #[doc(alias = "CMFormatDescriptionGetMediaType")]
205    #[inline]
206    pub unsafe fn media_type(&self) -> CMMediaType {
207        extern "C-unwind" {
208            fn CMFormatDescriptionGetMediaType(desc: &CMFormatDescription) -> CMMediaType;
209        }
210        unsafe { CMFormatDescriptionGetMediaType(self) }
211    }
212
213    /// Returns the media subtype of a CMFormatDescription.
214    ///
215    /// The media subtype is defined in a media-specific way.
216    /// For audio streams, the media subtype is the asbd.mFormatID.
217    /// For video streams, the media subtype is the video codec type.
218    /// For muxed streams, it is the format of the muxed stream.
219    /// For example, 'aac ' is returned for a description of an AAC audio
220    /// stream, 'avc1' is returned for a description of an H.264 video
221    /// stream, and 'mp2t' is returned for a description of an MPEG-2
222    /// transport (muxed) stream.  If a particular type of media stream
223    /// does not have subtypes, this API may return 0.
224    ///
225    /// Returns: The media subtype of the CMFormatDescription.
226    #[doc(alias = "CMFormatDescriptionGetMediaSubType")]
227    #[inline]
228    pub unsafe fn media_sub_type(&self) -> FourCharCode {
229        extern "C-unwind" {
230            fn CMFormatDescriptionGetMediaSubType(desc: &CMFormatDescription) -> FourCharCode;
231        }
232        unsafe { CMFormatDescriptionGetMediaSubType(self) }
233    }
234
235    /// Returns an immutable dictionary containing all the extensions of a CMFormatDescription.
236    ///
237    /// If there are no extensions, NULL is returned. Extensions dictionaries are valid property list
238    /// objects.  This means that dictionary keys are all CFStrings, and the values are all either
239    /// CFNumber, CFString, CFBoolean, CFArray, CFDictionary, CFDate, or CFData. The returned
240    /// dictionary is not retained by this call, so clients are required to retain it if they
241    /// need to keep it longer.
242    ///
243    /// Returns: An immutable dictionary containing all the extensions of the CMFormatDescription.  May be NULL.
244    #[doc(alias = "CMFormatDescriptionGetExtensions")]
245    #[inline]
246    pub unsafe fn extensions(&self) -> Option<CFRetained<CFDictionary>> {
247        extern "C-unwind" {
248            fn CMFormatDescriptionGetExtensions(
249                desc: &CMFormatDescription,
250            ) -> Option<NonNull<CFDictionary>>;
251        }
252        let ret = unsafe { CMFormatDescriptionGetExtensions(self) };
253        ret.map(|ret| unsafe { CFRetained::retain(ret) })
254    }
255}
256
257extern "C" {
258    /// kCMFormatDescriptionExtension_OriginalCompressionSettings
259    ///
260    /// This extension contains a media-type-specific dictionary of settings used to produce a compressed media buffer.
261    ///
262    /// This extension is valid for format descriptions of all media types, but the contents of the dictionary are defined
263    /// in a media-specific way.  The dictionary and its contents are valid property list objects. This means that
264    /// dictionary keys are all CFStrings, and the values are all either CFNumber, CFString, CFBoolean, CFArray,
265    /// CFDictionary, CFDate, or CFData.
266    ///
267    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_originalcompressionsettings?language=objc)
268    pub static kCMFormatDescriptionExtension_OriginalCompressionSettings: &'static CFString;
269}
270
271extern "C" {
272    /// kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms
273    ///
274    /// Sample description extension atoms that were not translated into other entries in the extensions dictionary.
275    ///
276    /// This key is used by sample description bridges to hold sample description
277    /// extension atoms that they do not recognize.
278    /// The extension is a CFDictionary mapping CFStrings of the four-char-code atom types
279    /// to either CFDatas containing the atom payload or (to represent multiple atoms of a
280    /// specific type) to CFArrays of CFData containing those payloads.
281    ///
282    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_sampledescriptionextensionatoms?language=objc)
283    pub static kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms: &'static CFString;
284}
285
286extern "C" {
287    /// kCMFormatDescriptionExtension_VerbatimSampleDescription
288    ///
289    /// Preserves the original SampleDescription data.
290    ///
291    /// This extension is used to ensure that roundtrips from sample descriptions
292    /// to CMFormatDescriptions back to sample descriptions preserve the exact original
293    /// sample descriptions.
294    /// IMPORTANT: If you make a modified clone of a CMFormatDescription, you must
295    /// delete this extension from the clone, or your modifications could be lost.
296    ///
297    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_verbatimsampledescription?language=objc)
298    pub static kCMFormatDescriptionExtension_VerbatimSampleDescription: &'static CFString;
299}
300
301extern "C" {
302    /// kCMFormatDescriptionExtension_VerbatimISOSampleEntry
303    ///
304    /// Preserves the original ISOSampleEntry data.
305    ///
306    /// This extension is used to ensure that roundtrips from ISO Sample Entry (ie. AudioSampleEntry or VisualSampleEntry)
307    /// to CMFormatDescriptions back to ISO Sample Entry preserve the exact original
308    /// sample descriptions.
309    /// IMPORTANT: If you make a modified clone of a CMFormatDescription, you must
310    /// delete this extension from the clone, or your modifications could be lost.
311    ///
312    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_verbatimisosampleentry?language=objc)
313    pub static kCMFormatDescriptionExtension_VerbatimISOSampleEntry: &'static CFString;
314}
315
316impl CMFormatDescription {
317    /// Returns the specified extension of a CMFormatDescription.
318    ///
319    /// If the named extension does not exist, NULL is returned. The extension is always a valid
320    /// property list object. This means that it will be either a CFNumber, CFString, CFBoolean,
321    /// CFArray, CFDictionary, CFDate, or CFData. If it is a CFDictionary, the keys will all be
322    /// CFStrings. The returned extension is not retained by this call, so it is only valid as
323    /// long as the CMFormatDescription is valid. Clients are required to retain it if they
324    /// need to keep it longer.
325    ///
326    /// Returns: The specified extension of the CMFormatDescription.  May be NULL.
327    #[doc(alias = "CMFormatDescriptionGetExtension")]
328    #[inline]
329    pub unsafe fn extension(&self, extension_key: &CFString) -> Option<CFRetained<CFPropertyList>> {
330        extern "C-unwind" {
331            fn CMFormatDescriptionGetExtension(
332                desc: &CMFormatDescription,
333                extension_key: &CFString,
334            ) -> Option<NonNull<CFPropertyList>>;
335        }
336        let ret = unsafe { CMFormatDescriptionGetExtension(self, extension_key) };
337        ret.map(|ret| unsafe { CFRetained::retain(ret) })
338    }
339}
340
341/// Four-character codes identifying the code type. Certain codec types are also audio formats.
342///
343/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmaudiocodectype?language=objc)
344pub type CMAudioCodecType = FourCharCode;
345
346/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudiocodectype_aac_lcprotected?language=objc)
347pub const kCMAudioCodecType_AAC_LCProtected: CMAudioCodecType = 0x70616163;
348/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudiocodectype_aac_audibleprotected?language=objc)
349pub const kCMAudioCodecType_AAC_AudibleProtected: CMAudioCodecType = 0x61616163;
350
351/// SYnonym type used for manipulating audio CMFormatDescriptions
352///
353/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmaudioformatdescription?language=objc)
354#[doc(alias = "CMAudioFormatDescriptionRef")]
355pub type CMAudioFormatDescription = CMFormatDescription;
356
357extern "C-unwind" {
358    /// Creates a format description for an audio media stream.
359    ///
360    /// The ASBD is required, the channel layout is optional, and the magic cookie is required
361    /// for some compression formats (and must be NULL for all others). The caller owns the
362    /// returned CMFormatDescription, and must release it when done with it.  The ASBD,
363    /// magic cookie, channel layout, and extensions are all copied (the extensions are
364    /// deep-copied).  The caller can deallocate them or re-use them after making this call.
365    ///
366    /// # Safety
367    ///
368    /// - `asbd` must be a valid pointer.
369    /// - `layout` must be a valid pointer or null.
370    /// - `magic_cookie` must be a valid pointer or null.
371    /// - `extensions` generics must be of the correct type.
372    /// - `format_description_out` must be a valid pointer.
373    #[cfg(feature = "objc2-core-audio-types")]
374    pub fn CMAudioFormatDescriptionCreate(
375        allocator: Option<&CFAllocator>,
376        asbd: NonNull<AudioStreamBasicDescription>,
377        layout_size: usize,
378        layout: *const AudioChannelLayout,
379        magic_cookie_size: usize,
380        magic_cookie: *const c_void,
381        extensions: Option<&CFDictionary>,
382        format_description_out: NonNull<*const CMAudioFormatDescription>,
383    ) -> OSStatus;
384}
385
386extern "C-unwind" {
387    /// Returns a read-only pointer to the AudioStreamBasicDescription inside an audio CMFormatDescription.
388    ///
389    /// See CoreAudioTypes.h for the definition of AudioStreamBasicDescription.
390    /// This API is specific to audio format descriptions, and will return NULL if
391    /// used with a non-audio format descriptions.
392    #[cfg(feature = "objc2-core-audio-types")]
393    pub fn CMAudioFormatDescriptionGetStreamBasicDescription(
394        desc: &CMAudioFormatDescription,
395    ) -> *const AudioStreamBasicDescription;
396}
397
398extern "C-unwind" {
399    /// Returns a read-only pointer to (and size of) the magic cookie inside an audio CMFormatDescription.
400    ///
401    /// The magic cookie is a completely opaque piece of data, written and read only by
402    /// the codec itself. A magic cookie is only present for codecs that require it;
403    /// this API will return NULL if one does not exist. This API is specific to audio
404    /// format descriptions, and will return NULL if called with a non-audio format
405    /// description.
406    ///
407    /// Returns: A read-only pointer to the magic cookie inside the audio format description.
408    ///
409    /// # Safety
410    ///
411    /// `size_out` must be a valid pointer or null.
412    pub fn CMAudioFormatDescriptionGetMagicCookie(
413        desc: &CMAudioFormatDescription,
414        size_out: *mut usize,
415    ) -> *const c_void;
416}
417
418extern "C-unwind" {
419    /// Returns a read-only pointer to (and size of) the AudioChannelLayout inside an audio CMFormatDescription.
420    ///
421    /// See CoreAudioTypes.h for the definition of AudioChannelLayout.
422    /// AudioChannelLayouts are optional; this API will return NULL if
423    /// one does not exist. This API is specific to audio format
424    /// descriptions, and will return NULL if called with a non-audio
425    /// format description.
426    ///
427    /// Returns: A read-only pointer to the AudioChannelLayout inside the audio format description.
428    ///
429    /// # Safety
430    ///
431    /// `size_out` must be a valid pointer or null.
432    #[cfg(feature = "objc2-core-audio-types")]
433    pub fn CMAudioFormatDescriptionGetChannelLayout(
434        desc: &CMAudioFormatDescription,
435        size_out: *mut usize,
436    ) -> *const AudioChannelLayout;
437}
438
439extern "C-unwind" {
440    /// Returns a read-only pointer to (and size of) the array of AudioFormatListItem structs inside an audio CMFormatDescription.
441    ///
442    /// This property is analogous to kAudioFormatProperty_FormatList (See AudioFormat.h) and follows
443    /// its conventions.  Namely, formats are returned in order from the most to least 'rich', with
444    /// channel count taking the highest precedence followed by sample rate.
445    /// This API is specific to audio format descriptions, and will return NULL if called with a non-audio
446    /// format description.
447    ///
448    /// Returns: A read-only pointer to the array of AudioFormatListItem structs inside the audio format description.
449    ///
450    /// # Safety
451    ///
452    /// `size_out` must be a valid pointer or null.
453    #[cfg(feature = "objc2-core-audio-types")]
454    pub fn CMAudioFormatDescriptionGetFormatList(
455        desc: &CMAudioFormatDescription,
456        size_out: *mut usize,
457    ) -> *const AudioFormatListItem;
458}
459
460extern "C-unwind" {
461    /// Returns a read-only pointer to the appropriate AudioFormatListItem inside an audio CMFormatDescription.
462    ///
463    /// This property performs validation on the formats represented by the audio in the description.  It
464    /// finds the first AudioFormatListItem for which the current system has a valid decoder.
465    /// This API is specific to audio format descriptions, and will return NULL if called with a non-audio
466    /// format description.  It may also return NULL if there is no suitable decoder available on the
467    /// current system for this audio format.
468    ///
469    /// Returns: A read-only pointer to the appropriate AudioFormatListItem inside the audio format description.
470    #[cfg(feature = "objc2-core-audio-types")]
471    pub fn CMAudioFormatDescriptionGetRichestDecodableFormat(
472        desc: &CMAudioFormatDescription,
473    ) -> *const AudioFormatListItem;
474}
475
476extern "C-unwind" {
477    /// Returns a read-only pointer to the appropriate AudioFormatListItem inside an audio CMFormatDescription.
478    ///
479    /// This property returns a pointer to the last AudioFormatListItem in the kAudioFormatProperty_FormatList
480    /// (see AudioFormat.h).  This API is specific to audio format descriptions, and will return NULL if called
481    /// with a non-audio format description.
482    ///
483    /// Returns: A read-only pointer to the appropriate AudioFormatListItem inside the audio format description.
484    #[cfg(feature = "objc2-core-audio-types")]
485    pub fn CMAudioFormatDescriptionGetMostCompatibleFormat(
486        desc: &CMAudioFormatDescription,
487    ) -> *const AudioFormatListItem;
488}
489
490extern "C-unwind" {
491    /// Creates a summary audio format description from an array of audio format descriptions.
492    ///
493    /// The summary format description will be canonical LPCM and deep enough in
494    /// sample rate, channel layout and channel count to sensibly contain the result of decoding
495    /// and mixing the constituent format descriptions.
496    ///
497    /// # Safety
498    ///
499    /// - `format_description_array` generic must be of the correct type.
500    /// - `format_description_out` must be a valid pointer.
501    pub fn CMAudioFormatDescriptionCreateSummary(
502        allocator: Option<&CFAllocator>,
503        format_description_array: &CFArray,
504        flags: u32,
505        format_description_out: NonNull<*const CMAudioFormatDescription>,
506    ) -> OSStatus;
507}
508
509/// Mask bits passed to (and returned from) CMAudioFormatDescriptionEqual,
510/// representing various parts of an audio format description.
511///
512/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmaudioformatdescriptionmask?language=objc)
513pub type CMAudioFormatDescriptionMask = u32;
514
515/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudioformatdescriptionmask_streambasicdescription?language=objc)
516pub const kCMAudioFormatDescriptionMask_StreamBasicDescription: CMAudioFormatDescriptionMask =
517    1 << 0;
518/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudioformatdescriptionmask_magiccookie?language=objc)
519pub const kCMAudioFormatDescriptionMask_MagicCookie: CMAudioFormatDescriptionMask = 1 << 1;
520/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudioformatdescriptionmask_channellayout?language=objc)
521pub const kCMAudioFormatDescriptionMask_ChannelLayout: CMAudioFormatDescriptionMask = 1 << 2;
522/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudioformatdescriptionmask_extensions?language=objc)
523pub const kCMAudioFormatDescriptionMask_Extensions: CMAudioFormatDescriptionMask = 1 << 3;
524/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmaudioformatdescriptionmask_all?language=objc)
525pub const kCMAudioFormatDescriptionMask_All: CMAudioFormatDescriptionMask =
526    kCMAudioFormatDescriptionMask_StreamBasicDescription
527        | kCMAudioFormatDescriptionMask_MagicCookie
528        | kCMAudioFormatDescriptionMask_ChannelLayout
529        | kCMAudioFormatDescriptionMask_Extensions;
530
531/// Evaluates equality for the specified parts of two audio format descriptions.
532///
533/// Bits in equalityMask specify the caller's interest in the equality of various parts of the descriptions.
534/// Bits set and returned in equalityMaskOut represent the subset of those parts that are equal.
535/// If there is any sort of error that prevents the comparison from occurring, false will be returned, and
536/// all bits in equalityMaskOut will be cleared. If you pass kCMAudioFormatDescriptionMask_All in equalityMask,
537/// and NULL for equalityMaskOut, this API is equivalent to CFEqual(desc1, desc2).
538///
539/// On releases up to macOS 12, iOS 15, tvOS 15 and watchOS 8, the kCMAudioFormatDescriptionMask_Extensions
540/// flag was ignored in equalityMask. So this API always treated two audio format descriptions as equal even
541/// when they had different extensions.
542///
543/// Starting with macOS 13, iOS 16, tvOS 16 and watchOS 9, kCMAudioFormatDescriptionMask_Extensions is correctly
544/// accounted for when determining equality of two audio format descriptions. This also affects CFEqual(desc1, desc2)
545/// as it will return false when two audio format descriptions have different extensions.
546///
547///
548/// Returns: The result of the comparison.  True if all parts in which the caller is interested are equal.
549/// False if any of the parts in which the caller is interested are not equal.
550///
551/// # Safety
552///
553/// `equality_mask_out` must be a valid pointer or null.
554#[inline]
555pub unsafe extern "C-unwind" fn CMAudioFormatDescriptionEqual(
556    format_description: &CMAudioFormatDescription,
557    other_format_description: &CMAudioFormatDescription,
558    equality_mask: CMAudioFormatDescriptionMask,
559    equality_mask_out: *mut CMAudioFormatDescriptionMask,
560) -> bool {
561    extern "C-unwind" {
562        fn CMAudioFormatDescriptionEqual(
563            format_description: &CMAudioFormatDescription,
564            other_format_description: &CMAudioFormatDescription,
565            equality_mask: CMAudioFormatDescriptionMask,
566            equality_mask_out: *mut CMAudioFormatDescriptionMask,
567        ) -> Boolean;
568    }
569    let ret = unsafe {
570        CMAudioFormatDescriptionEqual(
571            format_description,
572            other_format_description,
573            equality_mask,
574            equality_mask_out,
575        )
576    };
577    ret != 0
578}
579
580/// Synonym type used for manipulating video CMFormatDescriptions
581///
582/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmvideoformatdescription?language=objc)
583#[doc(alias = "CMVideoFormatDescriptionRef")]
584pub type CMVideoFormatDescription = CMFormatDescription;
585
586/// Four-character codes identifying the pixel format. Only some codec types are pixel formats.
587/// In general, CoreVideo CVPixelFormatType constants may be used too.
588///
589/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmpixelformattype?language=objc)
590pub type CMPixelFormatType = FourCharCode;
591
592/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_32argb?language=objc)
593pub const kCMPixelFormat_32ARGB: CMPixelFormatType = 32;
594/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_32bgra?language=objc)
595pub const kCMPixelFormat_32BGRA: CMPixelFormatType = 0x42475241;
596/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_24rgb?language=objc)
597pub const kCMPixelFormat_24RGB: CMPixelFormatType = 24;
598/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_16be555?language=objc)
599pub const kCMPixelFormat_16BE555: CMPixelFormatType = 16;
600/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_16be565?language=objc)
601pub const kCMPixelFormat_16BE565: CMPixelFormatType = 0x42353635;
602/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_16le555?language=objc)
603pub const kCMPixelFormat_16LE555: CMPixelFormatType = 0x4c353535;
604/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_16le565?language=objc)
605pub const kCMPixelFormat_16LE565: CMPixelFormatType = 0x4c353635;
606/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_16le5551?language=objc)
607pub const kCMPixelFormat_16LE5551: CMPixelFormatType = 0x35353531;
608/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_422ypcbcr8?language=objc)
609pub const kCMPixelFormat_422YpCbCr8: CMPixelFormatType = 0x32767579;
610/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_422ypcbcr8_yuvs?language=objc)
611pub const kCMPixelFormat_422YpCbCr8_yuvs: CMPixelFormatType = 0x79757673;
612/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_444ypcbcr8?language=objc)
613pub const kCMPixelFormat_444YpCbCr8: CMPixelFormatType = 0x76333038;
614/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_4444ypcbcra8?language=objc)
615pub const kCMPixelFormat_4444YpCbCrA8: CMPixelFormatType = 0x76343038;
616/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_422ypcbcr16?language=objc)
617pub const kCMPixelFormat_422YpCbCr16: CMPixelFormatType = 0x76323136;
618/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_422ypcbcr10?language=objc)
619pub const kCMPixelFormat_422YpCbCr10: CMPixelFormatType = 0x76323130;
620/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_444ypcbcr10?language=objc)
621pub const kCMPixelFormat_444YpCbCr10: CMPixelFormatType = 0x76343130;
622/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmpixelformat_8indexedgray_whiteiszero?language=objc)
623pub const kCMPixelFormat_8IndexedGray_WhiteIsZero: CMPixelFormatType = 0x00000028;
624
625/// Four-character codes identifying the video codec. Certain codec types are also pixel formats.
626/// Note: There is no kCMVideoCodecType_Raw -- use the appropriate pixel format type as the codec type.
627///
628///
629///
630///
631///
632///
633///
634///
635///
636///
637///
638///
639/// IMPORTANT NOTE: this constant is used to select the appropriate encoder, but is NOT used on the encoded content,
640/// which is backwards compatible and hence uses 'hvc1' as its codec type.
641///
642/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmvideocodectype?language=objc)
643pub type CMVideoCodecType = FourCharCode;
644
645/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_422ypcbcr8?language=objc)
646pub const kCMVideoCodecType_422YpCbCr8: CMVideoCodecType = kCMPixelFormat_422YpCbCr8;
647/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_animation?language=objc)
648pub const kCMVideoCodecType_Animation: CMVideoCodecType = 0x726c6520;
649/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_cinepak?language=objc)
650pub const kCMVideoCodecType_Cinepak: CMVideoCodecType = 0x63766964;
651/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_jpeg?language=objc)
652pub const kCMVideoCodecType_JPEG: CMVideoCodecType = 0x6a706567;
653/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_jpeg_opendml?language=objc)
654pub const kCMVideoCodecType_JPEG_OpenDML: CMVideoCodecType = 0x646d6231;
655/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_jpeg_xl?language=objc)
656pub const kCMVideoCodecType_JPEG_XL: CMVideoCodecType = 0x6a786c63;
657/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_sorensonvideo?language=objc)
658pub const kCMVideoCodecType_SorensonVideo: CMVideoCodecType = 0x53565131;
659/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_sorensonvideo3?language=objc)
660pub const kCMVideoCodecType_SorensonVideo3: CMVideoCodecType = 0x53565133;
661/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_h263?language=objc)
662pub const kCMVideoCodecType_H263: CMVideoCodecType = 0x68323633;
663/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_h264?language=objc)
664pub const kCMVideoCodecType_H264: CMVideoCodecType = 0x61766331;
665/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_hevc?language=objc)
666pub const kCMVideoCodecType_HEVC: CMVideoCodecType = 0x68766331;
667/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_hevcwithalpha?language=objc)
668pub const kCMVideoCodecType_HEVCWithAlpha: CMVideoCodecType = 0x6d757861;
669/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dolbyvisionhevc?language=objc)
670pub const kCMVideoCodecType_DolbyVisionHEVC: CMVideoCodecType = 0x64766831;
671/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_mpeg4video?language=objc)
672pub const kCMVideoCodecType_MPEG4Video: CMVideoCodecType = 0x6d703476;
673/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_mpeg2video?language=objc)
674pub const kCMVideoCodecType_MPEG2Video: CMVideoCodecType = 0x6d703276;
675/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_mpeg1video?language=objc)
676pub const kCMVideoCodecType_MPEG1Video: CMVideoCodecType = 0x6d703176;
677/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_vp9?language=objc)
678pub const kCMVideoCodecType_VP9: CMVideoCodecType = 0x76703039;
679/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcntsc?language=objc)
680pub const kCMVideoCodecType_DVCNTSC: CMVideoCodecType = 0x64766320;
681/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcpal?language=objc)
682pub const kCMVideoCodecType_DVCPAL: CMVideoCodecType = 0x64766370;
683/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcpropal?language=objc)
684pub const kCMVideoCodecType_DVCProPAL: CMVideoCodecType = 0x64767070;
685/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcpro50ntsc?language=objc)
686pub const kCMVideoCodecType_DVCPro50NTSC: CMVideoCodecType = 0x6476356e;
687/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcpro50pal?language=objc)
688pub const kCMVideoCodecType_DVCPro50PAL: CMVideoCodecType = 0x64763570;
689/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcprohd720p60?language=objc)
690pub const kCMVideoCodecType_DVCPROHD720p60: CMVideoCodecType = 0x64766870;
691/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcprohd720p50?language=objc)
692pub const kCMVideoCodecType_DVCPROHD720p50: CMVideoCodecType = 0x64766871;
693/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcprohd1080i60?language=objc)
694pub const kCMVideoCodecType_DVCPROHD1080i60: CMVideoCodecType = 0x64766836;
695/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcprohd1080i50?language=objc)
696pub const kCMVideoCodecType_DVCPROHD1080i50: CMVideoCodecType = 0x64766835;
697/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcprohd1080p30?language=objc)
698pub const kCMVideoCodecType_DVCPROHD1080p30: CMVideoCodecType = 0x64766833;
699/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_dvcprohd1080p25?language=objc)
700pub const kCMVideoCodecType_DVCPROHD1080p25: CMVideoCodecType = 0x64766832;
701/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleprores4444xq?language=objc)
702pub const kCMVideoCodecType_AppleProRes4444XQ: CMVideoCodecType = 0x61703478;
703/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleprores4444?language=objc)
704pub const kCMVideoCodecType_AppleProRes4444: CMVideoCodecType = 0x61703468;
705/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleprores422hq?language=objc)
706pub const kCMVideoCodecType_AppleProRes422HQ: CMVideoCodecType = 0x61706368;
707/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleprores422?language=objc)
708pub const kCMVideoCodecType_AppleProRes422: CMVideoCodecType = 0x6170636e;
709/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleprores422lt?language=objc)
710pub const kCMVideoCodecType_AppleProRes422LT: CMVideoCodecType = 0x61706373;
711/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleprores422proxy?language=objc)
712pub const kCMVideoCodecType_AppleProRes422Proxy: CMVideoCodecType = 0x6170636f;
713/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleproresraw?language=objc)
714pub const kCMVideoCodecType_AppleProResRAW: CMVideoCodecType = 0x6170726e;
715/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_appleproresrawhq?language=objc)
716pub const kCMVideoCodecType_AppleProResRAWHQ: CMVideoCodecType = 0x61707268;
717/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_disparityhevc?language=objc)
718pub const kCMVideoCodecType_DisparityHEVC: CMVideoCodecType = 0x64697368;
719/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_depthhevc?language=objc)
720pub const kCMVideoCodecType_DepthHEVC: CMVideoCodecType = 0x64657068;
721/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmvideocodectype_av1?language=objc)
722pub const kCMVideoCodecType_AV1: CMVideoCodecType = 0x61763031;
723
724/// Type used for video dimensions, units are pixels
725///
726/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmvideodimensions?language=objc)
727#[repr(C)]
728#[derive(Clone, Copy, Debug, PartialEq)]
729pub struct CMVideoDimensions {
730    pub width: i32,
731    pub height: i32,
732}
733
734#[cfg(feature = "objc2")]
735unsafe impl Encode for CMVideoDimensions {
736    const ENCODING: Encoding = Encoding::Struct("?", &[<i32>::ENCODING, <i32>::ENCODING]);
737}
738
739#[cfg(feature = "objc2")]
740unsafe impl RefEncode for CMVideoDimensions {
741    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
742}
743
744extern "C" {
745    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_formatname?language=objc)
746    pub static kCMFormatDescriptionExtension_FormatName: &'static CFString;
747}
748
749extern "C" {
750    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_depth?language=objc)
751    pub static kCMFormatDescriptionExtension_Depth: &'static CFString;
752}
753
754extern "C" {
755    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_cleanaperture?language=objc)
756    pub static kCMFormatDescriptionExtension_CleanAperture: &'static CFString;
757}
758
759extern "C" {
760    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanaperturewidth?language=objc)
761    pub static kCMFormatDescriptionKey_CleanApertureWidth: &'static CFString;
762}
763
764extern "C" {
765    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanapertureheight?language=objc)
766    pub static kCMFormatDescriptionKey_CleanApertureHeight: &'static CFString;
767}
768
769extern "C" {
770    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanaperturehorizontaloffset?language=objc)
771    pub static kCMFormatDescriptionKey_CleanApertureHorizontalOffset: &'static CFString;
772}
773
774extern "C" {
775    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanapertureverticaloffset?language=objc)
776    pub static kCMFormatDescriptionKey_CleanApertureVerticalOffset: &'static CFString;
777}
778
779extern "C" {
780    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanaperturewidthrational?language=objc)
781    pub static kCMFormatDescriptionKey_CleanApertureWidthRational: &'static CFString;
782}
783
784extern "C" {
785    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanapertureheightrational?language=objc)
786    pub static kCMFormatDescriptionKey_CleanApertureHeightRational: &'static CFString;
787}
788
789extern "C" {
790    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanaperturehorizontaloffsetrational?language=objc)
791    pub static kCMFormatDescriptionKey_CleanApertureHorizontalOffsetRational: &'static CFString;
792}
793
794extern "C" {
795    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_cleanapertureverticaloffsetrational?language=objc)
796    pub static kCMFormatDescriptionKey_CleanApertureVerticalOffsetRational: &'static CFString;
797}
798
799extern "C" {
800    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_fieldcount?language=objc)
801    pub static kCMFormatDescriptionExtension_FieldCount: &'static CFString;
802}
803
804extern "C" {
805    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_fielddetail?language=objc)
806    pub static kCMFormatDescriptionExtension_FieldDetail: &'static CFString;
807}
808
809extern "C" {
810    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionfielddetail_temporaltopfirst?language=objc)
811    pub static kCMFormatDescriptionFieldDetail_TemporalTopFirst: &'static CFString;
812}
813
814extern "C" {
815    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionfielddetail_temporalbottomfirst?language=objc)
816    pub static kCMFormatDescriptionFieldDetail_TemporalBottomFirst: &'static CFString;
817}
818
819extern "C" {
820    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionfielddetail_spatialfirstlineearly?language=objc)
821    pub static kCMFormatDescriptionFieldDetail_SpatialFirstLineEarly: &'static CFString;
822}
823
824extern "C" {
825    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionfielddetail_spatialfirstlinelate?language=objc)
826    pub static kCMFormatDescriptionFieldDetail_SpatialFirstLineLate: &'static CFString;
827}
828
829extern "C" {
830    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_pixelaspectratio?language=objc)
831    pub static kCMFormatDescriptionExtension_PixelAspectRatio: &'static CFString;
832}
833
834extern "C" {
835    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_pixelaspectratiohorizontalspacing?language=objc)
836    pub static kCMFormatDescriptionKey_PixelAspectRatioHorizontalSpacing: &'static CFString;
837}
838
839extern "C" {
840    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionkey_pixelaspectratioverticalspacing?language=objc)
841    pub static kCMFormatDescriptionKey_PixelAspectRatioVerticalSpacing: &'static CFString;
842}
843
844extern "C" {
845    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_colorprimaries?language=objc)
846    pub static kCMFormatDescriptionExtension_ColorPrimaries: &'static CFString;
847}
848
849extern "C" {
850    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_itu_r_709_2?language=objc)
851    pub static kCMFormatDescriptionColorPrimaries_ITU_R_709_2: &'static CFString;
852}
853
854extern "C" {
855    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_ebu_3213?language=objc)
856    pub static kCMFormatDescriptionColorPrimaries_EBU_3213: &'static CFString;
857}
858
859extern "C" {
860    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_smpte_c?language=objc)
861    pub static kCMFormatDescriptionColorPrimaries_SMPTE_C: &'static CFString;
862}
863
864extern "C" {
865    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_dci_p3?language=objc)
866    pub static kCMFormatDescriptionColorPrimaries_DCI_P3: &'static CFString;
867}
868
869extern "C" {
870    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_p3_d65?language=objc)
871    pub static kCMFormatDescriptionColorPrimaries_P3_D65: &'static CFString;
872}
873
874extern "C" {
875    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_itu_r_2020?language=objc)
876    pub static kCMFormatDescriptionColorPrimaries_ITU_R_2020: &'static CFString;
877}
878
879extern "C" {
880    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncolorprimaries_p22?language=objc)
881    pub static kCMFormatDescriptionColorPrimaries_P22: &'static CFString;
882}
883
884extern "C" {
885    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_transferfunction?language=objc)
886    pub static kCMFormatDescriptionExtension_TransferFunction: &'static CFString;
887}
888
889extern "C" {
890    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_itu_r_709_2?language=objc)
891    pub static kCMFormatDescriptionTransferFunction_ITU_R_709_2: &'static CFString;
892}
893
894extern "C" {
895    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_smpte_240m_1995?language=objc)
896    pub static kCMFormatDescriptionTransferFunction_SMPTE_240M_1995: &'static CFString;
897}
898
899extern "C" {
900    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_usegamma?language=objc)
901    pub static kCMFormatDescriptionTransferFunction_UseGamma: &'static CFString;
902}
903
904extern "C" {
905    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_itu_r_2020?language=objc)
906    pub static kCMFormatDescriptionTransferFunction_ITU_R_2020: &'static CFString;
907}
908
909extern "C" {
910    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_smpte_st_428_1?language=objc)
911    pub static kCMFormatDescriptionTransferFunction_SMPTE_ST_428_1: &'static CFString;
912}
913
914extern "C" {
915    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_smpte_st_2084_pq?language=objc)
916    pub static kCMFormatDescriptionTransferFunction_SMPTE_ST_2084_PQ: &'static CFString;
917}
918
919extern "C" {
920    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_itu_r_2100_hlg?language=objc)
921    pub static kCMFormatDescriptionTransferFunction_ITU_R_2100_HLG: &'static CFString;
922}
923
924extern "C" {
925    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_linear?language=objc)
926    pub static kCMFormatDescriptionTransferFunction_Linear: &'static CFString;
927}
928
929extern "C" {
930    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptiontransferfunction_srgb?language=objc)
931    pub static kCMFormatDescriptionTransferFunction_sRGB: &'static CFString;
932}
933
934extern "C" {
935    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_gammalevel?language=objc)
936    pub static kCMFormatDescriptionExtension_GammaLevel: &'static CFString;
937}
938
939extern "C" {
940    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_ycbcrmatrix?language=objc)
941    pub static kCMFormatDescriptionExtension_YCbCrMatrix: &'static CFString;
942}
943
944extern "C" {
945    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionycbcrmatrix_itu_r_709_2?language=objc)
946    pub static kCMFormatDescriptionYCbCrMatrix_ITU_R_709_2: &'static CFString;
947}
948
949extern "C" {
950    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionycbcrmatrix_itu_r_601_4?language=objc)
951    pub static kCMFormatDescriptionYCbCrMatrix_ITU_R_601_4: &'static CFString;
952}
953
954extern "C" {
955    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionycbcrmatrix_smpte_240m_1995?language=objc)
956    pub static kCMFormatDescriptionYCbCrMatrix_SMPTE_240M_1995: &'static CFString;
957}
958
959extern "C" {
960    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionycbcrmatrix_itu_r_2020?language=objc)
961    pub static kCMFormatDescriptionYCbCrMatrix_ITU_R_2020: &'static CFString;
962}
963
964extern "C" {
965    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_fullrangevideo?language=objc)
966    pub static kCMFormatDescriptionExtension_FullRangeVideo: &'static CFString;
967}
968
969extern "C" {
970    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_iccprofile?language=objc)
971    pub static kCMFormatDescriptionExtension_ICCProfile: &'static CFString;
972}
973
974extern "C" {
975    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_bytesperrow?language=objc)
976    pub static kCMFormatDescriptionExtension_BytesPerRow: &'static CFString;
977}
978
979extern "C" {
980    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_chromalocationtopfield?language=objc)
981    pub static kCMFormatDescriptionExtension_ChromaLocationTopField: &'static CFString;
982}
983
984extern "C" {
985    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_chromalocationbottomfield?language=objc)
986    pub static kCMFormatDescriptionExtension_ChromaLocationBottomField: &'static CFString;
987}
988
989extern "C" {
990    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_left?language=objc)
991    pub static kCMFormatDescriptionChromaLocation_Left: &'static CFString;
992}
993
994extern "C" {
995    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_center?language=objc)
996    pub static kCMFormatDescriptionChromaLocation_Center: &'static CFString;
997}
998
999extern "C" {
1000    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_topleft?language=objc)
1001    pub static kCMFormatDescriptionChromaLocation_TopLeft: &'static CFString;
1002}
1003
1004extern "C" {
1005    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_top?language=objc)
1006    pub static kCMFormatDescriptionChromaLocation_Top: &'static CFString;
1007}
1008
1009extern "C" {
1010    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_bottomleft?language=objc)
1011    pub static kCMFormatDescriptionChromaLocation_BottomLeft: &'static CFString;
1012}
1013
1014extern "C" {
1015    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_bottom?language=objc)
1016    pub static kCMFormatDescriptionChromaLocation_Bottom: &'static CFString;
1017}
1018
1019extern "C" {
1020    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionchromalocation_dv420?language=objc)
1021    pub static kCMFormatDescriptionChromaLocation_DV420: &'static CFString;
1022}
1023
1024extern "C" {
1025    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionconformstompeg2videoprofile?language=objc)
1026    pub static kCMFormatDescriptionConformsToMPEG2VideoProfile: &'static CFString;
1027}
1028
1029extern "C" {
1030    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_protectedcontentoriginalformat?language=objc)
1031    pub static kCMFormatDescriptionExtension_ProtectedContentOriginalFormat: &'static CFString;
1032}
1033
1034/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_720p30?language=objc)
1035pub const kCMMPEG2VideoProfile_HDV_720p30: i32 = 0x68647631;
1036/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_1080i60?language=objc)
1037pub const kCMMPEG2VideoProfile_HDV_1080i60: i32 = 0x68647632;
1038/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_1080i50?language=objc)
1039pub const kCMMPEG2VideoProfile_HDV_1080i50: i32 = 0x68647633;
1040/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_720p24?language=objc)
1041pub const kCMMPEG2VideoProfile_HDV_720p24: i32 = 0x68647634;
1042/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_720p25?language=objc)
1043pub const kCMMPEG2VideoProfile_HDV_720p25: i32 = 0x68647635;
1044/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_1080p24?language=objc)
1045pub const kCMMPEG2VideoProfile_HDV_1080p24: i32 = 0x68647636;
1046/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_1080p25?language=objc)
1047pub const kCMMPEG2VideoProfile_HDV_1080p25: i32 = 0x68647637;
1048/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_1080p30?language=objc)
1049pub const kCMMPEG2VideoProfile_HDV_1080p30: i32 = 0x68647638;
1050/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_720p60?language=objc)
1051pub const kCMMPEG2VideoProfile_HDV_720p60: i32 = 0x68647639;
1052/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_hdv_720p50?language=objc)
1053pub const kCMMPEG2VideoProfile_HDV_720p50: i32 = 0x68647661;
1054/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd_1080i60_vbr35?language=objc)
1055pub const kCMMPEG2VideoProfile_XDCAM_HD_1080i60_VBR35: i32 = 0x78647632;
1056/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd_1080i50_vbr35?language=objc)
1057pub const kCMMPEG2VideoProfile_XDCAM_HD_1080i50_VBR35: i32 = 0x78647633;
1058/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd_1080p24_vbr35?language=objc)
1059pub const kCMMPEG2VideoProfile_XDCAM_HD_1080p24_VBR35: i32 = 0x78647636;
1060/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd_1080p25_vbr35?language=objc)
1061pub const kCMMPEG2VideoProfile_XDCAM_HD_1080p25_VBR35: i32 = 0x78647637;
1062/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd_1080p30_vbr35?language=objc)
1063pub const kCMMPEG2VideoProfile_XDCAM_HD_1080p30_VBR35: i32 = 0x78647638;
1064/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_720p24_vbr35?language=objc)
1065pub const kCMMPEG2VideoProfile_XDCAM_EX_720p24_VBR35: i32 = 0x78647634;
1066/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_720p25_vbr35?language=objc)
1067pub const kCMMPEG2VideoProfile_XDCAM_EX_720p25_VBR35: i32 = 0x78647635;
1068/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_720p30_vbr35?language=objc)
1069pub const kCMMPEG2VideoProfile_XDCAM_EX_720p30_VBR35: i32 = 0x78647631;
1070/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_720p50_vbr35?language=objc)
1071pub const kCMMPEG2VideoProfile_XDCAM_EX_720p50_VBR35: i32 = 0x78647661;
1072/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_720p60_vbr35?language=objc)
1073pub const kCMMPEG2VideoProfile_XDCAM_EX_720p60_VBR35: i32 = 0x78647639;
1074/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_1080i60_vbr35?language=objc)
1075pub const kCMMPEG2VideoProfile_XDCAM_EX_1080i60_VBR35: i32 = 0x78647662;
1076/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_1080i50_vbr35?language=objc)
1077pub const kCMMPEG2VideoProfile_XDCAM_EX_1080i50_VBR35: i32 = 0x78647663;
1078/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_1080p24_vbr35?language=objc)
1079pub const kCMMPEG2VideoProfile_XDCAM_EX_1080p24_VBR35: i32 = 0x78647664;
1080/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_1080p25_vbr35?language=objc)
1081pub const kCMMPEG2VideoProfile_XDCAM_EX_1080p25_VBR35: i32 = 0x78647665;
1082/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_ex_1080p30_vbr35?language=objc)
1083pub const kCMMPEG2VideoProfile_XDCAM_EX_1080p30_VBR35: i32 = 0x78647666;
1084/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_720p50_cbr50?language=objc)
1085pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p50_CBR50: i32 = 0x78643561;
1086/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_720p60_cbr50?language=objc)
1087pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p60_CBR50: i32 = 0x78643539;
1088/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_1080i60_cbr50?language=objc)
1089pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080i60_CBR50: i32 = 0x78643562;
1090/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_1080i50_cbr50?language=objc)
1091pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080i50_CBR50: i32 = 0x78643563;
1092/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_1080p24_cbr50?language=objc)
1093pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080p24_CBR50: i32 = 0x78643564;
1094/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_1080p25_cbr50?language=objc)
1095pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080p25_CBR50: i32 = 0x78643565;
1096/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_1080p30_cbr50?language=objc)
1097pub const kCMMPEG2VideoProfile_XDCAM_HD422_1080p30_CBR50: i32 = 0x78643566;
1098/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd_540p?language=objc)
1099pub const kCMMPEG2VideoProfile_XDCAM_HD_540p: i32 = 0x78646864;
1100/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_540p?language=objc)
1101pub const kCMMPEG2VideoProfile_XDCAM_HD422_540p: i32 = 0x78646832;
1102/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_720p24_cbr50?language=objc)
1103pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p24_CBR50: i32 = 0x78643534;
1104/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_720p25_cbr50?language=objc)
1105pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p25_CBR50: i32 = 0x78643535;
1106/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xdcam_hd422_720p30_cbr50?language=objc)
1107pub const kCMMPEG2VideoProfile_XDCAM_HD422_720p30_CBR50: i32 = 0x78643531;
1108/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmpeg2videoprofile_xf?language=objc)
1109pub const kCMMPEG2VideoProfile_XF: i32 = 0x78667a31;
1110
1111extern "C" {
1112    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_temporalquality?language=objc)
1113    pub static kCMFormatDescriptionExtension_TemporalQuality: &'static CFString;
1114}
1115
1116extern "C" {
1117    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_spatialquality?language=objc)
1118    pub static kCMFormatDescriptionExtension_SpatialQuality: &'static CFString;
1119}
1120
1121extern "C" {
1122    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_verbatimimagedescription?language=objc)
1123    pub static kCMFormatDescriptionExtension_VerbatimImageDescription: &'static CFString;
1124}
1125
1126extern "C" {
1127    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_version?language=objc)
1128    pub static kCMFormatDescriptionExtension_Version: &'static CFString;
1129}
1130
1131extern "C" {
1132    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_revisionlevel?language=objc)
1133    pub static kCMFormatDescriptionExtension_RevisionLevel: &'static CFString;
1134}
1135
1136extern "C" {
1137    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_vendor?language=objc)
1138    pub static kCMFormatDescriptionExtension_Vendor: &'static CFString;
1139}
1140
1141extern "C" {
1142    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionvendor_apple?language=objc)
1143    pub static kCMFormatDescriptionVendor_Apple: &'static CFString;
1144}
1145
1146extern "C" {
1147    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_masteringdisplaycolorvolume?language=objc)
1148    pub static kCMFormatDescriptionExtension_MasteringDisplayColorVolume: &'static CFString;
1149}
1150
1151extern "C" {
1152    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_contentlightlevelinfo?language=objc)
1153    pub static kCMFormatDescriptionExtension_ContentLightLevelInfo: &'static CFString;
1154}
1155
1156extern "C" {
1157    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_contentcolorvolume?language=objc)
1158    pub static kCMFormatDescriptionExtension_ContentColorVolume: &'static CFString;
1159}
1160
1161extern "C" {
1162    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_alternativetransfercharacteristics?language=objc)
1163    pub static kCMFormatDescriptionExtension_AlternativeTransferCharacteristics: &'static CFString;
1164}
1165
1166extern "C" {
1167    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_auxiliarytypeinfo?language=objc)
1168    pub static kCMFormatDescriptionExtension_AuxiliaryTypeInfo: &'static CFString;
1169}
1170
1171extern "C" {
1172    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_alphachannelmode?language=objc)
1173    pub static kCMFormatDescriptionExtension_AlphaChannelMode: &'static CFString;
1174}
1175
1176extern "C" {
1177    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionalphachannelmode_straightalpha?language=objc)
1178    pub static kCMFormatDescriptionAlphaChannelMode_StraightAlpha: &'static CFString;
1179}
1180
1181extern "C" {
1182    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionalphachannelmode_premultipliedalpha?language=objc)
1183    pub static kCMFormatDescriptionAlphaChannelMode_PremultipliedAlpha: &'static CFString;
1184}
1185
1186extern "C" {
1187    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_containsalphachannel?language=objc)
1188    pub static kCMFormatDescriptionExtension_ContainsAlphaChannel: &'static CFString;
1189}
1190
1191extern "C" {
1192    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_bitspercomponent?language=objc)
1193    pub static kCMFormatDescriptionExtension_BitsPerComponent: &'static CFString;
1194}
1195
1196extern "C" {
1197    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_horizontalfieldofview?language=objc)
1198    pub static kCMFormatDescriptionExtension_HorizontalFieldOfView: &'static CFString;
1199}
1200
1201extern "C" {
1202    /// Indicates that the transfer function or gamma of the content is a log format and identifies the specific log curve.
1203    ///
1204    /// The value is a CFString holding fully specified reverse DNS identifier.
1205    /// Content captured in Apple Log will have this key set to kCMFormatDescriptionLogTransferFunction_AppleLog.
1206    ///
1207    /// Indicates the Apple Log identifier.
1208    ///
1209    /// You can download the Apple Log Profile White Paper from the Apple Developer Downloads website.
1210    ///
1211    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_logtransferfunction?language=objc)
1212    pub static kCMFormatDescriptionExtension_LogTransferFunction: &'static CFString;
1213}
1214
1215extern "C" {
1216    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionlogtransferfunction_applelog?language=objc)
1217    pub static kCMFormatDescriptionLogTransferFunction_AppleLog: &'static CFString;
1218}
1219
1220extern "C" {
1221    /// Indicates which of the two eyes should be used as the primary when rendering in 2D. It is usually perpendicular to the target image surface.
1222    ///
1223    /// Indicates the left eye is the hero eye.
1224    ///
1225    /// Indicates the right eye is the hero eye.
1226    ///
1227    /// The value is a CFString holding one of the kCMFormatDescriptionHeroEye_* constants.
1228    ///
1229    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_heroeye?language=objc)
1230    pub static kCMFormatDescriptionExtension_HeroEye: &'static CFString;
1231}
1232
1233extern "C" {
1234    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionheroeye_left?language=objc)
1235    pub static kCMFormatDescriptionHeroEye_Left: &'static CFString;
1236}
1237
1238extern "C" {
1239    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionheroeye_right?language=objc)
1240    pub static kCMFormatDescriptionHeroEye_Right: &'static CFString;
1241}
1242
1243extern "C" {
1244    /// Indicates the distance between centers of the lenses of the camera system.
1245    ///
1246    /// The value is a CFNumber holding an unsigned 32-bit integer that is interpreted in micrometers or thousandths of a millimeter (e.g., 63123 is 63.123 millimeters).
1247    /// This property is optional and should only be specified if the distance is known.
1248    ///
1249    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_stereocamerabaseline?language=objc)
1250    pub static kCMFormatDescriptionExtension_StereoCameraBaseline: &'static CFString;
1251}
1252
1253extern "C" {
1254    /// Indicates a relative shift of the left and right images, which changes the zero parallax plane.
1255    ///
1256    /// The value encoded in normalized image space is a CFNumber holding a signed 32-bit integer measured over the range of -10000 to 10000 mapping to the uniform range [-1.0...1.0]. The interval of 0.0 to 1.0 or 0 to 10000 maps onto the stereo eye view image width. The negative interval 0.0 to -1.0 or 0 to -10000 similarly map onto the stereo eye view image width.
1257    /// The default value of 0 is interpreted if this property is not set. If the property is not set, NULL may be set and retrieved. The NULL value should be interpreted as meaning 0.
1258    /// This property is optional and should only be specified if a disparity adjustment including 0 is known.
1259    ///
1260    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_horizontaldisparityadjustment?language=objc)
1261    pub static kCMFormatDescriptionExtension_HorizontalDisparityAdjustment: &'static CFString;
1262}
1263
1264extern "C" {
1265    /// Indicates the stereo left eye is present in video frames.
1266    ///
1267    /// The value is a CFBoolean holding presence of left eye view in the stream.
1268    ///
1269    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_hasleftstereoeyeview?language=objc)
1270    pub static kCMFormatDescriptionExtension_HasLeftStereoEyeView: &'static CFString;
1271}
1272
1273extern "C" {
1274    /// Indicates the stereo right eye is present in video frames.
1275    ///
1276    /// The value is a CFBoolean holding presence of right eye view in the stream.
1277    ///
1278    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_hasrightstereoeyeview?language=objc)
1279    pub static kCMFormatDescriptionExtension_HasRightStereoEyeView: &'static CFString;
1280}
1281
1282extern "C" {
1283    /// Indicates that one or more additional views may be present beyond stereo left and stereo right eyes (e.g,. a “centerline” view).
1284    ///
1285    /// The value is a CFBoolean holding presence of additional eye views in the stream.
1286    ///
1287    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_hasadditionalviews?language=objc)
1288    pub static kCMFormatDescriptionExtension_HasAdditionalViews: &'static CFString;
1289}
1290
1291extern "C" {
1292    /// Indicates the projection that should be applied to presented decoded video frames.
1293    ///
1294    /// Indicates rectilinear projection. Generally less than 90 degree field of view with no barrel distortion.
1295    ///
1296    /// Indicates equirectangular projection of a 360 degree sphere to a rectangular plane, where longitude and latitude of the sphere are mapped linearly to the x,y axes of the plane.
1297    ///
1298    /// Indicates half equirectangular projection of a 180 degree hemisphere to a rectangular plane, where longitude and latitude of the sphere are mapped linearly to the x,y axes of the plane
1299    ///
1300    /// Indicates a projection described mathematically by a model of camera lens calibration parameters. Parameters may be found in lens calibration metadata in kCMFormatDescriptionExtension_CameraCalibrationDataLensCollection with algorithm_kind being parametric lens
1301    ///
1302    /// Indicates a proprietary projection used for Apple Immersive Video.
1303    ///
1304    /// The value is a CFString holding one of the kCMFormatDescriptionProjectionKind_* constants.
1305    ///
1306    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_projectionkind?language=objc)
1307    pub static kCMFormatDescriptionExtension_ProjectionKind: &'static CFString;
1308}
1309
1310extern "C" {
1311    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionprojectionkind_rectilinear?language=objc)
1312    pub static kCMFormatDescriptionProjectionKind_Rectilinear: &'static CFString;
1313}
1314
1315extern "C" {
1316    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionprojectionkind_equirectangular?language=objc)
1317    pub static kCMFormatDescriptionProjectionKind_Equirectangular: &'static CFString;
1318}
1319
1320extern "C" {
1321    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionprojectionkind_halfequirectangular?language=objc)
1322    pub static kCMFormatDescriptionProjectionKind_HalfEquirectangular: &'static CFString;
1323}
1324
1325extern "C" {
1326    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionprojectionkind_parametricimmersive?language=objc)
1327    pub static kCMFormatDescriptionProjectionKind_ParametricImmersive: &'static CFString;
1328}
1329
1330extern "C" {
1331    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionprojectionkind_appleimmersivevideo?language=objc)
1332    pub static kCMFormatDescriptionProjectionKind_AppleImmersiveVideo: &'static CFString;
1333}
1334
1335extern "C" {
1336    /// Indicates the packing type of stereoscopic video frames.
1337    ///
1338    /// Indicates that frames are packed side-by-side.
1339    ///
1340    /// Indicates that frames are packed over under.
1341    ///
1342    /// The value is a CFString holding one of the kCMFormatDescriptionViewPackingKind_* constants.
1343    ///
1344    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_viewpackingkind?language=objc)
1345    pub static kCMFormatDescriptionExtension_ViewPackingKind: &'static CFString;
1346}
1347
1348extern "C" {
1349    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionviewpackingkind_sidebyside?language=objc)
1350    pub static kCMFormatDescriptionViewPackingKind_SideBySide: &'static CFString;
1351}
1352
1353extern "C" {
1354    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionviewpackingkind_overunder?language=objc)
1355    pub static kCMFormatDescriptionViewPackingKind_OverUnder: &'static CFString;
1356}
1357
1358extern "C" {
1359    /// Specifies intrinsic and extrinsic parameters for single or multiple lenses.
1360    ///
1361    /// The property value is an array of dictionaries describing the camera calibration data for each lens. The camera calibration data includes intrinsics and extrinics with other parameters.
1362    /// For a stereoscopic camera system, the left and right lens signaling can be done with the kCMFormatDescriptionCameraCalibration_LensRole key and its value.
1363    ///
1364    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_cameracalibrationdatalenscollection?language=objc)
1365    pub static kCMFormatDescriptionExtension_CameraCalibrationDataLensCollection: &'static CFString;
1366}
1367
1368extern "C" {
1369    /// The following keys are required in each kCMFormatDescriptionExtension_CameraCalibrationDataLensCollection dictionary.
1370    ///
1371    ///
1372    ///
1373    /// Specifies the camera calibration methodology.
1374    ///
1375    /// If the algorithm kind is ParametricLens, the camera lens collection requires camera intrinsic and extrinsic parameters.
1376    ///
1377    ///
1378    ///
1379    /// Specifies the kind of lens (e.g., color).
1380    ///
1381    ///
1382    ///
1383    /// Specifies a unique number associated with a lens.
1384    ///
1385    ///
1386    ///
1387    /// Specifies the particular use of the lens in the camera system (e.g., left or right for a stereo system).
1388    ///
1389    /// For a stereoscopic camera system, one lens should have the left role and another should have the right role.
1390    ///
1391    ///
1392    ///
1393    /// Specifies the first and second radial distortion coefficients(k1 and k2) used to correct the distortion that appeared as curved lines for straight lines and the first and second tangential distortion coefficients(p1 and p2) used to correct the distortion caused by a lens's improper alignment of physical elements.
1394    ///
1395    /// The values are in a CFArray of four CFNumbers in k1, k2, p1 and p2 order.
1396    ///
1397    ///
1398    ///
1399    /// Specifies a three element polynomial for mapping x axis UV parameters with an adjustment using the equation `x' = polynomialX[0] + polynomialX[1]*x + polynomialX[2]*x^3`.
1400    ///
1401    /// The values are in a CFArray of three CFNumbers(float) in the order polynomialX[0], polynomialX[1]
1402    /// &
1403    /// polynomialX[2].
1404    /// The polynomial transform origin is at the center of the frame. The default values of elements of polynomialX[] are [0.0, 1.0, 0.0].
1405    ///
1406    ///
1407    ///
1408    /// Specifies a three element polynomial for mapping y axis UV parameters with an adjustment using the equation `y' = polynomialY[0] + polynomialY[1]*y + polynomialY[2]*y^3`.
1409    ///
1410    /// The values are in a CFArray of three CFNumbers(float) in the order polynomialY[0], polynomialY[1]
1411    /// &
1412    /// polynomialY[2].
1413    /// The polynomial transform origin is at the center of the frame. The default values of elements of polynomialY[] are [0.0, 1.0, 0.0].
1414    ///
1415    ///
1416    ///
1417    /// Specifies the outer limit of the calibration validity in degrees of angle eccentric from the optical axis.
1418    ///
1419    /// The value is linked to radial distortion corrections with k1 and k2.
1420    ///
1421    ///
1422    ///
1423    /// Specifies the 3x3 camera intrinsic matrix for camera calibration.
1424    ///
1425    /// Camera intrinsic matrix is a CFData containing a matrix_float3x3, which is column-major. Each element is in IEEE754 native-endian 32-bit floating point. It has the following contents:
1426    /// fx    s    cx
1427    /// 0    fy    cy
1428    /// 0    0    1
1429    /// fx and fy are the focal length in pixels. For square pixels, they will have the same value.
1430    /// cx and cy are the coordinates of the principal point. The origin is the upper left of the frame.
1431    /// s is an optional skew factor.
1432    ///
1433    ///
1434    ///
1435    /// Specifies the offset of the point of perspective relative to the rectilinear projection.
1436    ///
1437    ///
1438    ///
1439    /// Specifies the image dimensions to which the camera’s intrinsic matrix values are relative.
1440    ///
1441    /// Values are width and height in a CFDictionary. Dictionary keys are compatible with CGSize dictionary, namely "Width" and "Height".
1442    ///
1443    ///
1444    ///
1445    /// Identifies how the origin of the camera system's extrinsics are determined.
1446    ///
1447    /// The 'blin' value indicates the center of transform is determined by the point mid way along the dimensions indicated by the StereoCameraSystemBaselineBox held in the StereoCameraSystemBox.
1448    /// Each left and right lens within a stereoscopic camera system is equidistant from this point, so the 'blin' value is halved when associated with the respective left and right lenses.
1449    ///
1450    ///
1451    ///
1452    /// Specifies a camera’s orientation to a world or scene coordinate system. The orientation value is a unit quaternion(ix, iy, and iz) instead of the classical 3x3 matrix.
1453    ///
1454    /// The values are in a CFArray of three CFNumbers in ix, iy, and iz order.
1455    ///
1456    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensalgorithmkind?language=objc)
1457    pub static kCMFormatDescriptionCameraCalibration_LensAlgorithmKind: &'static CFString;
1458}
1459
1460extern "C" {
1461    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibrationlensalgorithmkind_parametriclens?language=objc)
1462    pub static kCMFormatDescriptionCameraCalibrationLensAlgorithmKind_ParametricLens:
1463        &'static CFString;
1464}
1465
1466extern "C" {
1467    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensdomain?language=objc)
1468    pub static kCMFormatDescriptionCameraCalibration_LensDomain: &'static CFString;
1469}
1470
1471extern "C" {
1472    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibrationlensdomain_color?language=objc)
1473    pub static kCMFormatDescriptionCameraCalibrationLensDomain_Color: &'static CFString;
1474}
1475
1476extern "C" {
1477    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensidentifier?language=objc)
1478    pub static kCMFormatDescriptionCameraCalibration_LensIdentifier: &'static CFString;
1479}
1480
1481extern "C" {
1482    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensrole?language=objc)
1483    pub static kCMFormatDescriptionCameraCalibration_LensRole: &'static CFString;
1484}
1485
1486extern "C" {
1487    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibrationlensrole_mono?language=objc)
1488    pub static kCMFormatDescriptionCameraCalibrationLensRole_Mono: &'static CFString;
1489}
1490
1491extern "C" {
1492    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibrationlensrole_left?language=objc)
1493    pub static kCMFormatDescriptionCameraCalibrationLensRole_Left: &'static CFString;
1494}
1495
1496extern "C" {
1497    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibrationlensrole_right?language=objc)
1498    pub static kCMFormatDescriptionCameraCalibrationLensRole_Right: &'static CFString;
1499}
1500
1501extern "C" {
1502    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensdistortions?language=objc)
1503    pub static kCMFormatDescriptionCameraCalibration_LensDistortions: &'static CFString;
1504}
1505
1506extern "C" {
1507    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensframeadjustmentspolynomialx?language=objc)
1508    pub static kCMFormatDescriptionCameraCalibration_LensFrameAdjustmentsPolynomialX:
1509        &'static CFString;
1510}
1511
1512extern "C" {
1513    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_lensframeadjustmentspolynomialy?language=objc)
1514    pub static kCMFormatDescriptionCameraCalibration_LensFrameAdjustmentsPolynomialY:
1515        &'static CFString;
1516}
1517
1518extern "C" {
1519    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_radialanglelimit?language=objc)
1520    pub static kCMFormatDescriptionCameraCalibration_RadialAngleLimit: &'static CFString;
1521}
1522
1523extern "C" {
1524    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_intrinsicmatrix?language=objc)
1525    pub static kCMFormatDescriptionCameraCalibration_IntrinsicMatrix: &'static CFString;
1526}
1527
1528extern "C" {
1529    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_intrinsicmatrixprojectionoffset?language=objc)
1530    pub static kCMFormatDescriptionCameraCalibration_IntrinsicMatrixProjectionOffset:
1531        &'static CFString;
1532}
1533
1534extern "C" {
1535    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_intrinsicmatrixreferencedimensions?language=objc)
1536    pub static kCMFormatDescriptionCameraCalibration_IntrinsicMatrixReferenceDimensions:
1537        &'static CFString;
1538}
1539
1540extern "C" {
1541    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_extrinsicoriginsource?language=objc)
1542    pub static kCMFormatDescriptionCameraCalibration_ExtrinsicOriginSource: &'static CFString;
1543}
1544
1545extern "C" {
1546    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibrationextrinsicoriginsource_stereocamerasystembaseline?language=objc)
1547    pub static kCMFormatDescriptionCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline:
1548        &'static CFString;
1549}
1550
1551extern "C" {
1552    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptioncameracalibration_extrinsicorientationquaternion?language=objc)
1553    pub static kCMFormatDescriptionCameraCalibration_ExtrinsicOrientationQuaternion:
1554        &'static CFString;
1555}
1556
1557extern "C" {
1558    /// Indicates that the image description contains projected media data converted from an external format
1559    ///
1560    /// This format description extension is included if boxes containing external stereoscopic or spherical projection information were parsed.
1561    ///
1562    /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_convertedfromexternalsphericaltags?language=objc)
1563    pub static kCMFormatDescriptionExtension_ConvertedFromExternalSphericalTags: &'static CFString;
1564}
1565
1566extern "C-unwind" {
1567    /// Creates a format description for a video media stream.
1568    ///
1569    /// The caller owns the returned CMFormatDescription, and must release it when done with it. All input parameters
1570    /// are copied (the extensions are deep-copied).  The caller can deallocate them or re-use them after making this call.
1571    ///
1572    /// # Safety
1573    ///
1574    /// - `extensions` generics must be of the correct type.
1575    /// - `format_description_out` must be a valid pointer.
1576    pub fn CMVideoFormatDescriptionCreate(
1577        allocator: Option<&CFAllocator>,
1578        codec_type: CMVideoCodecType,
1579        width: i32,
1580        height: i32,
1581        extensions: Option<&CFDictionary>,
1582        format_description_out: NonNull<*const CMVideoFormatDescription>,
1583    ) -> OSStatus;
1584}
1585
1586extern "C-unwind" {
1587    /// Creates a format description for a video media stream contained in CVImageBuffers of the type provided.
1588    ///
1589    /// This convenience function is equivalent to:
1590    ///
1591    /// CMVideoFormatDescriptionCreate( allocator,
1592    /// ( CVPixelBufferGetTypeID() == CFGetTypeID( imageBuffer ) ? CVPixelBufferGetPixelFormatType( imageBuffer ) : 0,
1593    /// width of image,
1594    /// height of image,
1595    /// extensions );
1596    ///
1597    /// where extensions is a CFDictionary of attachments to image buffer with keys specified by
1598    /// CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers, and also
1599    /// kCMFormatDescriptionExtension_BytesPerRow if applicable.
1600    ///
1601    /// # Safety
1602    ///
1603    /// `format_description_out` must be a valid pointer.
1604    #[cfg(feature = "objc2-core-video")]
1605    pub fn CMVideoFormatDescriptionCreateForImageBuffer(
1606        allocator: Option<&CFAllocator>,
1607        image_buffer: &CVImageBuffer,
1608        format_description_out: NonNull<*const CMVideoFormatDescription>,
1609    ) -> OSStatus;
1610}
1611
1612extern "C-unwind" {
1613    /// Creates a format description for a video media stream described by H.264 parameter set NAL units.
1614    ///
1615    /// This function parses the dimensions provided by the parameter sets and creates a format description suitable for a raw H.264 stream.
1616    /// The parameter sets' data can come from raw NAL units and must have any emulation prevention bytes needed.
1617    /// The supported NAL unit types to be included in the format description are 7 (sequence parameter set), 8 (picture parameter set) and 13 (sequence parameter set extension). At least one sequence parameter set and one picture parameter set must be provided.
1618    ///
1619    /// # Safety
1620    ///
1621    /// - `parameter_set_pointers` must be a valid pointer.
1622    /// - `parameter_set_sizes` must be a valid pointer.
1623    /// - `format_description_out` must be a valid pointer.
1624    pub fn CMVideoFormatDescriptionCreateFromH264ParameterSets(
1625        allocator: Option<&CFAllocator>,
1626        parameter_set_count: usize,
1627        parameter_set_pointers: NonNull<NonNull<u8>>,
1628        parameter_set_sizes: NonNull<usize>,
1629        nal_unit_header_length: c_int,
1630        format_description_out: NonNull<*const CMFormatDescription>,
1631    ) -> OSStatus;
1632}
1633
1634extern "C-unwind" {
1635    /// Creates a format description for a video media stream described by HEVC (H.265) parameter set NAL units.
1636    ///
1637    /// This function parses the dimensions provided by the parameter sets and creates a format description suitable for a raw H.265 stream.
1638    /// The parameter sets' data can come from raw NAL units and must have any emulation prevention bytes needed.
1639    /// The supported NAL unit types to be included in the format description are 32 (video parameter set), 33 (sequence parameter set), 34 (picture parameter set), 39 (prefix SEI) and 40 (suffix SEI). At least one of each parameter set must be provided.
1640    ///
1641    /// # Safety
1642    ///
1643    /// - `parameter_set_pointers` must be a valid pointer.
1644    /// - `parameter_set_sizes` must be a valid pointer.
1645    /// - `extensions` generics must be of the correct type.
1646    /// - `format_description_out` must be a valid pointer.
1647    pub fn CMVideoFormatDescriptionCreateFromHEVCParameterSets(
1648        allocator: Option<&CFAllocator>,
1649        parameter_set_count: usize,
1650        parameter_set_pointers: NonNull<NonNull<u8>>,
1651        parameter_set_sizes: NonNull<usize>,
1652        nal_unit_header_length: c_int,
1653        extensions: Option<&CFDictionary>,
1654        format_description_out: NonNull<*const CMFormatDescription>,
1655    ) -> OSStatus;
1656}
1657
1658extern "C-unwind" {
1659    /// Returns a parameter set contained in a H.264 format description.
1660    ///
1661    /// This function parses the AVC decoder configuration record contained in a H.264 video format description and returns the NAL unit at the given index from it.  These NAL units are typically parameter sets (e.g. SPS, PPS), but may contain others as specified by ISO/IEC 14496-15 (e.g. user-data SEI).
1662    /// Both parameterSetPointerOut and parameterSetSizeOut may be NULL, parameterSetCountOut will return the total number of parameter set NAL units contained in the AVC decoder configuration record.
1663    /// The parameter set NAL units returned will already have any emulation prevention bytes needed.
1664    /// The pointer returned in parameterSetPointerOut points to internal memory of videoDesc, and may only be accessed as long as a retain on videoDesc is held.
1665    ///
1666    /// # Safety
1667    ///
1668    /// - `parameter_set_pointer_out` must be a valid pointer or null.
1669    /// - `parameter_set_size_out` must be a valid pointer or null.
1670    /// - `parameter_set_count_out` must be a valid pointer or null.
1671    /// - `nal_unit_header_length_out` must be a valid pointer or null.
1672    pub fn CMVideoFormatDescriptionGetH264ParameterSetAtIndex(
1673        video_desc: &CMFormatDescription,
1674        parameter_set_index: usize,
1675        parameter_set_pointer_out: *mut *const u8,
1676        parameter_set_size_out: *mut usize,
1677        parameter_set_count_out: *mut usize,
1678        nal_unit_header_length_out: *mut c_int,
1679    ) -> OSStatus;
1680}
1681
1682extern "C-unwind" {
1683    /// Returns a parameter set contained in a HEVC (H.265) format description.
1684    ///
1685    /// This function parses the HEVC decoder configuration record contained in a H.265 video format description and returns the NAL unit at the given index from it.  These NAL units are typically parameter sets (e.g. VPS, SPS, PPS), but may contain others as specified by ISO/IEC 14496-15 (e.g. user-data SEI).
1686    /// Both parameterSetPointerOut and parameterSetSizeOut may be NULL, parameterSetCountOut will return the total number of parameter set NAL units contained in the HEVC decoder configuration record.
1687    /// The parameter set NAL units returned will already have any emulation prevention bytes needed.
1688    /// The pointer returned in parameterSetPointerOut points to internal memory of videoDesc, and may only be accessed as long as a retain on videoDesc is held.
1689    ///
1690    /// # Safety
1691    ///
1692    /// - `parameter_set_pointer_out` must be a valid pointer or null.
1693    /// - `parameter_set_size_out` must be a valid pointer or null.
1694    /// - `parameter_set_count_out` must be a valid pointer or null.
1695    /// - `nal_unit_header_length_out` must be a valid pointer or null.
1696    pub fn CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
1697        video_desc: &CMFormatDescription,
1698        parameter_set_index: usize,
1699        parameter_set_pointer_out: *mut *const u8,
1700        parameter_set_size_out: *mut usize,
1701        parameter_set_count_out: *mut usize,
1702        nal_unit_header_length_out: *mut c_int,
1703    ) -> OSStatus;
1704}
1705
1706extern "C-unwind" {
1707    /// Returns the dimensions (in encoded pixels)
1708    ///
1709    /// This does not take into account pixel aspect ratio or clean aperture tags.
1710    pub fn CMVideoFormatDescriptionGetDimensions(
1711        video_desc: &CMVideoFormatDescription,
1712    ) -> CMVideoDimensions;
1713}
1714
1715/// Returns the dimensions, adjusted to take pixel aspect ratio and/or clean aperture into account.
1716///
1717/// Pixel aspect ratio is used to adjust the width, leaving the height alone.
1718#[inline]
1719pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionGetPresentationDimensions(
1720    video_desc: &CMVideoFormatDescription,
1721    use_pixel_aspect_ratio: bool,
1722    use_clean_aperture: bool,
1723) -> CGSize {
1724    extern "C-unwind" {
1725        fn CMVideoFormatDescriptionGetPresentationDimensions(
1726            video_desc: &CMVideoFormatDescription,
1727            use_pixel_aspect_ratio: Boolean,
1728            use_clean_aperture: Boolean,
1729        ) -> CGSize;
1730    }
1731    unsafe {
1732        CMVideoFormatDescriptionGetPresentationDimensions(
1733            video_desc,
1734            use_pixel_aspect_ratio as _,
1735            use_clean_aperture as _,
1736        )
1737    }
1738}
1739
1740/// Returns the clean aperture.
1741///
1742/// The clean aperture is a rectangle that defines the portion of the encoded pixel dimensions
1743/// that represents image data valid for display.
1744#[inline]
1745pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionGetCleanAperture(
1746    video_desc: &CMVideoFormatDescription,
1747    origin_is_at_top_left: bool,
1748) -> CGRect {
1749    extern "C-unwind" {
1750        fn CMVideoFormatDescriptionGetCleanAperture(
1751            video_desc: &CMVideoFormatDescription,
1752            origin_is_at_top_left: Boolean,
1753        ) -> CGRect;
1754    }
1755    unsafe { CMVideoFormatDescriptionGetCleanAperture(video_desc, origin_is_at_top_left as _) }
1756}
1757
1758/// Returns an array of the keys that are used both as CMVideoFormatDescription extensions
1759/// and CVImageBuffer attachments and attributes.
1760///
1761/// When specifying a CMFormatDescription for a CMSampleBuffer, the format description must
1762/// be consistent with formatting information attached to the CVImageBuffer. The width, height,
1763/// and codecType must match (for CVPixelBuffers the codec type is given by
1764/// CVPixelBufferGetPixelFormatType(pixelBuffer); for other CVImageBuffers, the codecType must be 0).
1765/// The format description extensions must match the image buffer attachments for all the keys in the
1766/// list returned by this function (if absent in either they must be absent in both).
1767///
1768/// Currently, the list is:
1769///
1770/// kCMFormatDescriptionExtension_CleanAperture
1771/// kCMFormatDescriptionExtension_FieldCount
1772/// kCMFormatDescriptionExtension_FieldDetail
1773/// kCMFormatDescriptionExtension_PixelAspectRatio
1774/// kCMFormatDescriptionExtension_ColorPrimaries
1775/// kCMFormatDescriptionExtension_TransferFunction
1776/// kCMFormatDescriptionExtension_GammaLevel
1777/// kCMFormatDescriptionExtension_YCbCrMatrix
1778/// kCMFormatDescriptionExtension_ICCProfile
1779/// kCMFormatDescriptionExtension_ChromaLocationTopField
1780/// kCMFormatDescriptionExtension_ChromaLocationBottomField
1781/// kCMFormatDescriptionExtension_MasteringDisplayColorVolume
1782/// kCMFormatDescriptionExtension_ContentLightLevelInfo
1783#[inline]
1784pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers(
1785) -> CFRetained<CFArray> {
1786    extern "C-unwind" {
1787        fn CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers(
1788        ) -> Option<NonNull<CFArray>>;
1789    }
1790    let ret = unsafe { CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers() };
1791    let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
1792    unsafe { CFRetained::retain(ret) }
1793}
1794
1795/// Checks to see if a given format description matches an image buffer.
1796///
1797/// This function uses the keys returned by CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers
1798/// to compares the extensions of the given format description to the attachments of the
1799/// given image buffer (if an attachment is absent in either it must be absent in both).
1800/// It also checks kCMFormatDescriptionExtension_BytesPerRow against CVPixelBufferGetBytesPerRow, if applicable.
1801#[cfg(feature = "objc2-core-video")]
1802#[inline]
1803pub unsafe extern "C-unwind" fn CMVideoFormatDescriptionMatchesImageBuffer(
1804    desc: &CMVideoFormatDescription,
1805    image_buffer: &CVImageBuffer,
1806) -> bool {
1807    extern "C-unwind" {
1808        fn CMVideoFormatDescriptionMatchesImageBuffer(
1809            desc: &CMVideoFormatDescription,
1810            image_buffer: &CVImageBuffer,
1811        ) -> Boolean;
1812    }
1813    let ret = unsafe { CMVideoFormatDescriptionMatchesImageBuffer(desc, image_buffer) };
1814    ret != 0
1815}
1816
1817extern "C-unwind" {
1818    /// Copies the multi-image encoding properties as an array of CMTagCollections.
1819    ///
1820    /// Parameter `formatDescription`: CMVideoFormatDescription being interrogated.
1821    ///
1822    /// Parameter `tagCollectionsOut`: Returned TagCollections with CMTags such as kCMTagCategory_VideoLayerID and kCMTagCategory_StereoViewType.
1823    ///
1824    /// On return, the caller owns the returned CFArrayRef and must release it when done with it.
1825    /// This function copies the VideoLayerIDs and LeftAndRightViewIDs from hvcC and 3D Reference Displays Info SEI in the formatDescription.
1826    /// The returned values can be used to enable the multi-image decoding with kVTDecompressionPropertyKey_RequestedMVHEVCVideoLayerIDs.
1827    /// It also gives the eye mapping information for the pixel buffers of the decoded CMTaggedBufferGroups.
1828    ///
1829    /// Returns: Array of CMTagCollections. The result will be NULL if the CMVideoFormatDescription does not contain multi-image encoding parameters, or if there is some other error.
1830    ///
1831    /// # Safety
1832    ///
1833    /// `tag_collections_out` must be a valid pointer or null.
1834    pub fn CMVideoFormatDescriptionCopyTagCollectionArray(
1835        format_description: &CMVideoFormatDescription,
1836        tag_collections_out: *mut *const CFArray,
1837    ) -> OSStatus;
1838}
1839
1840/// Synonym type used for manipulating CMTaggedBufferGroup media CMFormatDescriptions
1841///
1842/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtaggedbuffergroupformatdescription?language=objc)
1843#[doc(alias = "CMTaggedBufferGroupFormatDescriptionRef")]
1844pub type CMTaggedBufferGroupFormatDescription = CMFormatDescription;
1845
1846/// The subtypes of CMTaggedBufferGroup media type.
1847///
1848/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtaggedbuffergroupformattype?language=objc)
1849pub type CMTaggedBufferGroupFormatType = FourCharCode;
1850
1851/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtaggedbuffergroupformattype_taggedbuffergroup?language=objc)
1852pub const kCMTaggedBufferGroupFormatType_TaggedBufferGroup: CMTaggedBufferGroupFormatType =
1853    0x74626772;
1854
1855/// Synonym type used for manipulating muxed media CMFormatDescriptions
1856///
1857/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmmuxedformatdescription?language=objc)
1858#[doc(alias = "CMMuxedFormatDescriptionRef")]
1859pub type CMMuxedFormatDescription = CMFormatDescription;
1860
1861/// Muxed media format/subtype.
1862///
1863///
1864///
1865///
1866///
1867///
1868/// Contains interleaved sample buffers from multiple media types. The receiver should query the media type of each CMSampleBuffer’s format description to discover if it’s video or audio, and process it accordingly.
1869///
1870/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmmuxedstreamtype?language=objc)
1871pub type CMMuxedStreamType = FourCharCode;
1872
1873/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmuxedstreamtype_mpeg1system?language=objc)
1874pub const kCMMuxedStreamType_MPEG1System: CMMuxedStreamType = 0x6d703173;
1875/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmuxedstreamtype_mpeg2transport?language=objc)
1876pub const kCMMuxedStreamType_MPEG2Transport: CMMuxedStreamType = 0x6d703274;
1877/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmuxedstreamtype_mpeg2program?language=objc)
1878pub const kCMMuxedStreamType_MPEG2Program: CMMuxedStreamType = 0x6d703270;
1879/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmuxedstreamtype_dv?language=objc)
1880pub const kCMMuxedStreamType_DV: CMMuxedStreamType = 0x64762020;
1881/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmuxedstreamtype_embeddeddevicescreenrecording?language=objc)
1882pub const kCMMuxedStreamType_EmbeddedDeviceScreenRecording: CMMuxedStreamType = 0x69737220;
1883
1884extern "C-unwind" {
1885    /// Creates a format description for a muxed media stream.
1886    ///
1887    /// A muxed format description does not know what the formats are of the substreams within the muxed stream.
1888    /// That information will only be discoverable by the demuxer software (or other software which understands
1889    /// the details of the muxed bitstream) which will need to produce separate format descriptions for each of
1890    /// its output streams. The caller owns the returned CMFormatDescription, and must release it when done
1891    /// with it. All input parameters are copied (the extensions are deep-copied).  The caller can deallocate
1892    /// them or re-use them after making this call.
1893    ///
1894    /// # Safety
1895    ///
1896    /// - `extensions` generics must be of the correct type.
1897    /// - `format_description_out` must be a valid pointer.
1898    pub fn CMMuxedFormatDescriptionCreate(
1899        allocator: Option<&CFAllocator>,
1900        mux_type: CMMuxedStreamType,
1901        extensions: Option<&CFDictionary>,
1902        format_description_out: NonNull<*const CMMuxedFormatDescription>,
1903    ) -> OSStatus;
1904}
1905
1906/// Synonym type used for manipulating closed-caption media CMFormatDescriptions
1907///
1908/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmclosedcaptionformatdescription?language=objc)
1909#[doc(alias = "CMClosedCaptionFormatDescriptionRef")]
1910pub type CMClosedCaptionFormatDescription = CMFormatDescription;
1911
1912/// Closed-caption media format/subtype.
1913/// Note:  use CMFormatDescriptionCreate to create a CMClosedCaptionFormatDescriptionRef.
1914///
1915/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmclosedcaptionformattype?language=objc)
1916pub type CMClosedCaptionFormatType = FourCharCode;
1917
1918/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmclosedcaptionformattype_cea608?language=objc)
1919pub const kCMClosedCaptionFormatType_CEA608: CMClosedCaptionFormatType = 0x63363038;
1920/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmclosedcaptionformattype_cea708?language=objc)
1921pub const kCMClosedCaptionFormatType_CEA708: CMClosedCaptionFormatType = 0x63373038;
1922/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmclosedcaptionformattype_atsc?language=objc)
1923pub const kCMClosedCaptionFormatType_ATSC: CMClosedCaptionFormatType = 0x61746363;
1924
1925/// Synonym type used for manipulating Text media CMFormatDescriptions
1926///
1927/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtextformatdescription?language=objc)
1928#[doc(alias = "CMTextFormatDescriptionRef")]
1929pub type CMTextFormatDescription = CMFormatDescription;
1930
1931/// Text media format/subtype.
1932///
1933/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtextformattype?language=objc)
1934pub type CMTextFormatType = FourCharCode;
1935
1936/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformattype_qttext?language=objc)
1937pub const kCMTextFormatType_QTText: CMTextFormatType = 0x74657874;
1938/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformattype_3gtext?language=objc)
1939pub const kCMTextFormatType_3GText: CMTextFormatType = 0x74783367;
1940
1941/// Display mode flags for text media.
1942///
1943/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtextdisplayflags?language=objc)
1944pub type CMTextDisplayFlags = u32;
1945
1946/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrollin?language=objc)
1947pub const kCMTextDisplayFlag_scrollIn: CMTextDisplayFlags = 0x00000020;
1948/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrollout?language=objc)
1949pub const kCMTextDisplayFlag_scrollOut: CMTextDisplayFlags = 0x00000040;
1950/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrolldirectionmask?language=objc)
1951pub const kCMTextDisplayFlag_scrollDirectionMask: CMTextDisplayFlags = 0x00000180;
1952/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrolldirection_bottomtotop?language=objc)
1953pub const kCMTextDisplayFlag_scrollDirection_bottomToTop: CMTextDisplayFlags = 0x00000000;
1954/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrolldirection_righttoleft?language=objc)
1955pub const kCMTextDisplayFlag_scrollDirection_rightToLeft: CMTextDisplayFlags = 0x00000080;
1956/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrolldirection_toptobottom?language=objc)
1957pub const kCMTextDisplayFlag_scrollDirection_topToBottom: CMTextDisplayFlags = 0x00000100;
1958/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_scrolldirection_lefttoright?language=objc)
1959pub const kCMTextDisplayFlag_scrollDirection_leftToRight: CMTextDisplayFlags = 0x00000180;
1960/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_continuouskaraoke?language=objc)
1961pub const kCMTextDisplayFlag_continuousKaraoke: CMTextDisplayFlags = 0x00000800;
1962/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_writetextvertically?language=objc)
1963pub const kCMTextDisplayFlag_writeTextVertically: CMTextDisplayFlags = 0x00020000;
1964/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_filltextregion?language=objc)
1965pub const kCMTextDisplayFlag_fillTextRegion: CMTextDisplayFlags = 0x00040000;
1966/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_obeysubtitleformatting?language=objc)
1967pub const kCMTextDisplayFlag_obeySubtitleFormatting: CMTextDisplayFlags = 0x20000000;
1968/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_forcedsubtitlespresent?language=objc)
1969pub const kCMTextDisplayFlag_forcedSubtitlesPresent: CMTextDisplayFlags = 0x40000000;
1970/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextdisplayflag_allsubtitlesforced?language=objc)
1971pub const kCMTextDisplayFlag_allSubtitlesForced: CMTextDisplayFlags = 0x80000000;
1972
1973/// Justification modes for text media. Used when specifying either horizontal or vertical justification.
1974///
1975/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtextjustificationvalue?language=objc)
1976pub type CMTextJustificationValue = i8;
1977
1978/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextjustification_left_top?language=objc)
1979pub const kCMTextJustification_left_top: CMTextJustificationValue = 0;
1980/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextjustification_centered?language=objc)
1981pub const kCMTextJustification_centered: CMTextJustificationValue = 1;
1982/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextjustification_bottom_right?language=objc)
1983pub const kCMTextJustification_bottom_right: CMTextJustificationValue = -1;
1984
1985extern "C" {
1986    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_displayflags?language=objc)
1987    pub static kCMTextFormatDescriptionExtension_DisplayFlags: &'static CFString;
1988}
1989
1990extern "C" {
1991    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_backgroundcolor?language=objc)
1992    pub static kCMTextFormatDescriptionExtension_BackgroundColor: &'static CFString;
1993}
1994
1995extern "C" {
1996    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptioncolor_red?language=objc)
1997    pub static kCMTextFormatDescriptionColor_Red: &'static CFString;
1998}
1999
2000extern "C" {
2001    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptioncolor_green?language=objc)
2002    pub static kCMTextFormatDescriptionColor_Green: &'static CFString;
2003}
2004
2005extern "C" {
2006    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptioncolor_blue?language=objc)
2007    pub static kCMTextFormatDescriptionColor_Blue: &'static CFString;
2008}
2009
2010extern "C" {
2011    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptioncolor_alpha?language=objc)
2012    pub static kCMTextFormatDescriptionColor_Alpha: &'static CFString;
2013}
2014
2015extern "C" {
2016    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_defaulttextbox?language=objc)
2017    pub static kCMTextFormatDescriptionExtension_DefaultTextBox: &'static CFString;
2018}
2019
2020extern "C" {
2021    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionrect_top?language=objc)
2022    pub static kCMTextFormatDescriptionRect_Top: &'static CFString;
2023}
2024
2025extern "C" {
2026    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionrect_left?language=objc)
2027    pub static kCMTextFormatDescriptionRect_Left: &'static CFString;
2028}
2029
2030extern "C" {
2031    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionrect_bottom?language=objc)
2032    pub static kCMTextFormatDescriptionRect_Bottom: &'static CFString;
2033}
2034
2035extern "C" {
2036    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionrect_right?language=objc)
2037    pub static kCMTextFormatDescriptionRect_Right: &'static CFString;
2038}
2039
2040extern "C" {
2041    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_defaultstyle?language=objc)
2042    pub static kCMTextFormatDescriptionExtension_DefaultStyle: &'static CFString;
2043}
2044
2045extern "C" {
2046    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_startchar?language=objc)
2047    pub static kCMTextFormatDescriptionStyle_StartChar: &'static CFString;
2048}
2049
2050extern "C" {
2051    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_font?language=objc)
2052    pub static kCMTextFormatDescriptionStyle_Font: &'static CFString;
2053}
2054
2055extern "C" {
2056    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_fontface?language=objc)
2057    pub static kCMTextFormatDescriptionStyle_FontFace: &'static CFString;
2058}
2059
2060extern "C" {
2061    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_foregroundcolor?language=objc)
2062    pub static kCMTextFormatDescriptionStyle_ForegroundColor: &'static CFString;
2063}
2064
2065extern "C" {
2066    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_fontsize?language=objc)
2067    pub static kCMTextFormatDescriptionStyle_FontSize: &'static CFString;
2068}
2069
2070extern "C" {
2071    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_horizontaljustification?language=objc)
2072    pub static kCMTextFormatDescriptionExtension_HorizontalJustification: &'static CFString;
2073}
2074
2075extern "C" {
2076    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_verticaljustification?language=objc)
2077    pub static kCMTextFormatDescriptionExtension_VerticalJustification: &'static CFString;
2078}
2079
2080extern "C" {
2081    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_endchar?language=objc)
2082    pub static kCMTextFormatDescriptionStyle_EndChar: &'static CFString;
2083}
2084
2085extern "C" {
2086    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_fonttable?language=objc)
2087    pub static kCMTextFormatDescriptionExtension_FontTable: &'static CFString;
2088}
2089
2090extern "C" {
2091    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_textjustification?language=objc)
2092    pub static kCMTextFormatDescriptionExtension_TextJustification: &'static CFString;
2093}
2094
2095extern "C" {
2096    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_height?language=objc)
2097    pub static kCMTextFormatDescriptionStyle_Height: &'static CFString;
2098}
2099
2100extern "C" {
2101    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionstyle_ascent?language=objc)
2102    pub static kCMTextFormatDescriptionStyle_Ascent: &'static CFString;
2103}
2104
2105extern "C" {
2106    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtextformatdescriptionextension_defaultfontname?language=objc)
2107    pub static kCMTextFormatDescriptionExtension_DefaultFontName: &'static CFString;
2108}
2109
2110extern "C" {
2111    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextension_ambientviewingenvironment?language=objc)
2112    pub static kCMFormatDescriptionExtension_AmbientViewingEnvironment: &'static CFString;
2113}
2114
2115extern "C-unwind" {
2116    /// Returns the displayFlags.
2117    ///
2118    /// These are the flags that control how the text appears. The function can return kCMFormatDescriptionError_ValueNotAvailable for formats without display flags.
2119    ///
2120    /// # Safety
2121    ///
2122    /// `display_flags_out` must be a valid pointer.
2123    pub fn CMTextFormatDescriptionGetDisplayFlags(
2124        desc: &CMFormatDescription,
2125        display_flags_out: NonNull<CMTextDisplayFlags>,
2126    ) -> OSStatus;
2127}
2128
2129extern "C-unwind" {
2130    /// Returns horizontal and vertical justification.
2131    ///
2132    /// Values are kCMTextJustification_* constants. The function returns kCMFormatDescriptionError_ValueNotAvailable for format descriptions that do not carry text justification.
2133    ///
2134    /// # Safety
2135    ///
2136    /// - `horizonta_justificationl_out` must be a valid pointer or null.
2137    /// - `vertical_justification_out` must be a valid pointer or null.
2138    pub fn CMTextFormatDescriptionGetJustification(
2139        desc: &CMFormatDescription,
2140        horizonta_justificationl_out: *mut CMTextJustificationValue,
2141        vertical_justification_out: *mut CMTextJustificationValue,
2142    ) -> OSStatus;
2143}
2144
2145/// Returns the default text box.
2146///
2147/// Within a text track, text is rendered within a text box.  There is a default text box set, which can be over-ridden by a sample. The function can return kCMFormatDescriptionError_ValueNotAvailable for format descriptions that do not carry a default text box.
2148///
2149/// # Safety
2150///
2151/// `default_text_box_out` must be a valid pointer.
2152#[inline]
2153pub unsafe extern "C-unwind" fn CMTextFormatDescriptionGetDefaultTextBox(
2154    desc: &CMFormatDescription,
2155    origin_is_at_top_left: bool,
2156    height_of_text_track: CGFloat,
2157    default_text_box_out: NonNull<CGRect>,
2158) -> OSStatus {
2159    extern "C-unwind" {
2160        fn CMTextFormatDescriptionGetDefaultTextBox(
2161            desc: &CMFormatDescription,
2162            origin_is_at_top_left: Boolean,
2163            height_of_text_track: CGFloat,
2164            default_text_box_out: NonNull<CGRect>,
2165        ) -> OSStatus;
2166    }
2167    unsafe {
2168        CMTextFormatDescriptionGetDefaultTextBox(
2169            desc,
2170            origin_is_at_top_left as _,
2171            height_of_text_track,
2172            default_text_box_out,
2173        )
2174    }
2175}
2176
2177extern "C-unwind" {
2178    /// Returns the font name for a local font ID.
2179    ///
2180    /// Some format descriptions carry a mapping from local font IDs to font names. The function returns kCMFormatDescriptionError_ValueNotAvailable for format descriptions that do not carry such a font mapping table.
2181    ///
2182    /// # Safety
2183    ///
2184    /// `font_name_out` must be a valid pointer.
2185    pub fn CMTextFormatDescriptionGetFontName(
2186        desc: &CMFormatDescription,
2187        local_font_id: u16,
2188        font_name_out: NonNull<*const CFString>,
2189    ) -> OSStatus;
2190}
2191
2192/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmsubtitleformattype?language=objc)
2193pub type CMSubtitleFormatType = FourCharCode;
2194
2195/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmsubtitleformattype_3gtext?language=objc)
2196pub const kCMSubtitleFormatType_3GText: CMSubtitleFormatType = 0x74783367;
2197/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmsubtitleformattype_webvtt?language=objc)
2198pub const kCMSubtitleFormatType_WebVTT: CMSubtitleFormatType = 0x77767474;
2199
2200/// SYnonym type used for manipulating TimeCode media CMFormatDescriptions
2201///
2202/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtimecodeformatdescription?language=objc)
2203#[doc(alias = "CMTimeCodeFormatDescriptionRef")]
2204pub type CMTimeCodeFormatDescription = CMFormatDescription;
2205
2206/// The types of TimeCode.
2207///
2208/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmtimecodeformattype?language=objc)
2209pub type CMTimeCodeFormatType = FourCharCode;
2210
2211/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformattype_timecode32?language=objc)
2212pub const kCMTimeCodeFormatType_TimeCode32: CMTimeCodeFormatType = 0x746d6364;
2213/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformattype_timecode64?language=objc)
2214pub const kCMTimeCodeFormatType_TimeCode64: CMTimeCodeFormatType = 0x74633634;
2215/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformattype_counter32?language=objc)
2216pub const kCMTimeCodeFormatType_Counter32: CMTimeCodeFormatType = 0x636e3332;
2217/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformattype_counter64?language=objc)
2218pub const kCMTimeCodeFormatType_Counter64: CMTimeCodeFormatType = 0x636e3634;
2219
2220/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeflag_dropframe?language=objc)
2221pub const kCMTimeCodeFlag_DropFrame: u32 = 1 << 0;
2222/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeflag_24hourmax?language=objc)
2223pub const kCMTimeCodeFlag_24HourMax: u32 = 1 << 1;
2224/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeflag_negtimesok?language=objc)
2225pub const kCMTimeCodeFlag_NegTimesOK: u32 = 1 << 2;
2226
2227extern "C-unwind" {
2228    /// Creates a format description for a timecode media.
2229    ///
2230    /// The caller owns the returned CMFormatDescription, and must release it when done with it. All input parameters
2231    /// are copied (the extensions are deep-copied).  The caller can deallocate them or re-use them after making this call.
2232    ///
2233    /// # Safety
2234    ///
2235    /// - `extensions` generics must be of the correct type.
2236    /// - `format_description_out` must be a valid pointer.
2237    #[cfg(feature = "CMTime")]
2238    pub fn CMTimeCodeFormatDescriptionCreate(
2239        allocator: Option<&CFAllocator>,
2240        time_code_format_type: CMTimeCodeFormatType,
2241        frame_duration: CMTime,
2242        frame_quanta: u32,
2243        flags: u32,
2244        extensions: Option<&CFDictionary>,
2245        format_description_out: NonNull<*const CMTimeCodeFormatDescription>,
2246    ) -> OSStatus;
2247}
2248
2249#[cfg(feature = "CMTime")]
2250impl CMTime {
2251    /// Returns the duration of each frame (eg. 100/2997)
2252    #[doc(alias = "CMTimeCodeFormatDescriptionGetFrameDuration")]
2253    #[cfg(feature = "CMTime")]
2254    #[inline]
2255    pub unsafe fn code_format_description_get_frame_duration(
2256        time_code_format_description: &CMTimeCodeFormatDescription,
2257    ) -> CMTime {
2258        extern "C-unwind" {
2259            fn CMTimeCodeFormatDescriptionGetFrameDuration(
2260                time_code_format_description: &CMTimeCodeFormatDescription,
2261            ) -> CMTime;
2262        }
2263        unsafe { CMTimeCodeFormatDescriptionGetFrameDuration(time_code_format_description) }
2264    }
2265}
2266
2267extern "C-unwind" {
2268    /// Returns the frames/sec for timecode (eg. 30) OR frames/tick for counter mode
2269    pub fn CMTimeCodeFormatDescriptionGetFrameQuanta(
2270        time_code_format_description: &CMTimeCodeFormatDescription,
2271    ) -> u32;
2272}
2273
2274extern "C-unwind" {
2275    /// Returns the flags for kCMTimeCodeFlag_DropFrame, kCMTimeCodeFlag_24HourMax, kCMTimeCodeFlag_NegTimesOK
2276    pub fn CMTimeCodeFormatDescriptionGetTimeCodeFlags(desc: &CMTimeCodeFormatDescription) -> u32;
2277}
2278
2279extern "C" {
2280    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformatdescriptionextension_sourcereferencename?language=objc)
2281    pub static kCMTimeCodeFormatDescriptionExtension_SourceReferenceName: &'static CFString;
2282}
2283
2284extern "C" {
2285    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformatdescriptionkey_value?language=objc)
2286    pub static kCMTimeCodeFormatDescriptionKey_Value: &'static CFString;
2287}
2288
2289extern "C" {
2290    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmtimecodeformatdescriptionkey_langcode?language=objc)
2291    pub static kCMTimeCodeFormatDescriptionKey_LangCode: &'static CFString;
2292}
2293
2294/// SYnonym type used for manipulating Metadata media CMFormatDescriptions
2295///
2296/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmmetadataformatdescription?language=objc)
2297#[doc(alias = "CMMetadataFormatDescriptionRef")]
2298pub type CMMetadataFormatDescription = CMFormatDescription;
2299
2300/// The subtypes of Metadata media type.
2301///
2302/// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/cmmetadataformattype?language=objc)
2303pub type CMMetadataFormatType = FourCharCode;
2304
2305/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformattype_icy?language=objc)
2306pub const kCMMetadataFormatType_ICY: CMMetadataFormatType = 0x69637920;
2307/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformattype_id3?language=objc)
2308pub const kCMMetadataFormatType_ID3: CMMetadataFormatType = 0x69643320;
2309/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformattype_boxed?language=objc)
2310pub const kCMMetadataFormatType_Boxed: CMMetadataFormatType = 0x6d656278;
2311/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformattype_emsg?language=objc)
2312pub const kCMMetadataFormatType_EMSG: CMMetadataFormatType = 0x656d7367;
2313
2314extern "C" {
2315    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmformatdescriptionextensionkey_metadatakeytable?language=objc)
2316    pub static kCMFormatDescriptionExtensionKey_MetadataKeyTable: &'static CFString;
2317}
2318
2319extern "C" {
2320    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_namespace?language=objc)
2321    pub static kCMMetadataFormatDescriptionKey_Namespace: &'static CFString;
2322}
2323
2324extern "C" {
2325    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_value?language=objc)
2326    pub static kCMMetadataFormatDescriptionKey_Value: &'static CFString;
2327}
2328
2329extern "C" {
2330    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_localid?language=objc)
2331    pub static kCMMetadataFormatDescriptionKey_LocalID: &'static CFString;
2332}
2333
2334extern "C" {
2335    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_datatype?language=objc)
2336    pub static kCMMetadataFormatDescriptionKey_DataType: &'static CFString;
2337}
2338
2339extern "C" {
2340    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_datatypenamespace?language=objc)
2341    pub static kCMMetadataFormatDescriptionKey_DataTypeNamespace: &'static CFString;
2342}
2343
2344extern "C" {
2345    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_conformingdatatypes?language=objc)
2346    pub static kCMMetadataFormatDescriptionKey_ConformingDataTypes: &'static CFString;
2347}
2348
2349extern "C" {
2350    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_languagetag?language=objc)
2351    pub static kCMMetadataFormatDescriptionKey_LanguageTag: &'static CFString;
2352}
2353
2354extern "C" {
2355    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_structuraldependency?language=objc)
2356    pub static kCMMetadataFormatDescriptionKey_StructuralDependency: &'static CFString;
2357}
2358
2359extern "C" {
2360    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionkey_setupdata?language=objc)
2361    pub static kCMMetadataFormatDescriptionKey_SetupData: &'static CFString;
2362}
2363
2364extern "C" {
2365    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescription_structuraldependencykey_dependencyisinvalidflag?language=objc)
2366    pub static kCMMetadataFormatDescription_StructuralDependencyKey_DependencyIsInvalidFlag:
2367        &'static CFString;
2368}
2369
2370extern "C" {
2371    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionmetadataspecificationkey_identifier?language=objc)
2372    pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_Identifier: &'static CFString;
2373}
2374
2375extern "C" {
2376    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionmetadataspecificationkey_datatype?language=objc)
2377    pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_DataType: &'static CFString;
2378}
2379
2380extern "C" {
2381    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionmetadataspecificationkey_extendedlanguagetag?language=objc)
2382    pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_ExtendedLanguageTag:
2383        &'static CFString;
2384}
2385
2386extern "C" {
2387    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionmetadataspecificationkey_structuraldependency?language=objc)
2388    pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_StructuralDependency:
2389        &'static CFString;
2390}
2391
2392extern "C" {
2393    /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataformatdescriptionmetadataspecificationkey_setupdata?language=objc)
2394    pub static kCMMetadataFormatDescriptionMetadataSpecificationKey_SetupData: &'static CFString;
2395}
2396
2397extern "C-unwind" {
2398    /// # Safety
2399    ///
2400    /// - `keys` generic must be of the correct type.
2401    /// - `format_description_out` must be a valid pointer.
2402    pub fn CMMetadataFormatDescriptionCreateWithKeys(
2403        allocator: Option<&CFAllocator>,
2404        metadata_type: CMMetadataFormatType,
2405        keys: Option<&CFArray>,
2406        format_description_out: NonNull<*const CMMetadataFormatDescription>,
2407    ) -> OSStatus;
2408}
2409
2410extern "C-unwind" {
2411    /// # Safety
2412    ///
2413    /// - `metadata_specifications` generic must be of the correct type.
2414    /// - `format_description_out` must be a valid pointer.
2415    pub fn CMMetadataFormatDescriptionCreateWithMetadataSpecifications(
2416        allocator: Option<&CFAllocator>,
2417        metadata_type: CMMetadataFormatType,
2418        metadata_specifications: &CFArray,
2419        format_description_out: NonNull<*const CMMetadataFormatDescription>,
2420    ) -> OSStatus;
2421}
2422
2423extern "C-unwind" {
2424    /// # Safety
2425    ///
2426    /// - `metadata_specifications` generic must be of the correct type.
2427    /// - `format_description_out` must be a valid pointer.
2428    pub fn CMMetadataFormatDescriptionCreateWithMetadataFormatDescriptionAndMetadataSpecifications(
2429        allocator: Option<&CFAllocator>,
2430        source_description: &CMMetadataFormatDescription,
2431        metadata_specifications: &CFArray,
2432        format_description_out: NonNull<*const CMMetadataFormatDescription>,
2433    ) -> OSStatus;
2434}
2435
2436extern "C-unwind" {
2437    /// # Safety
2438    ///
2439    /// `format_description_out` must be a valid pointer.
2440    pub fn CMMetadataFormatDescriptionCreateByMergingMetadataFormatDescriptions(
2441        allocator: Option<&CFAllocator>,
2442        source_description: &CMMetadataFormatDescription,
2443        other_source_description: &CMMetadataFormatDescription,
2444        format_description_out: NonNull<*const CMMetadataFormatDescription>,
2445    ) -> OSStatus;
2446}
2447
2448#[inline]
2449pub unsafe extern "C-unwind" fn CMMetadataFormatDescriptionGetKeyWithLocalID(
2450    desc: &CMMetadataFormatDescription,
2451    local_key_id: OSType,
2452) -> Option<CFRetained<CFDictionary>> {
2453    extern "C-unwind" {
2454        fn CMMetadataFormatDescriptionGetKeyWithLocalID(
2455            desc: &CMMetadataFormatDescription,
2456            local_key_id: OSType,
2457        ) -> Option<NonNull<CFDictionary>>;
2458    }
2459    let ret = unsafe { CMMetadataFormatDescriptionGetKeyWithLocalID(desc, local_key_id) };
2460    ret.map(|ret| unsafe { CFRetained::retain(ret) })
2461}
2462
2463#[inline]
2464pub unsafe extern "C-unwind" fn CMMetadataFormatDescriptionGetIdentifiers(
2465    desc: &CMMetadataFormatDescription,
2466) -> Option<CFRetained<CFArray>> {
2467    extern "C-unwind" {
2468        fn CMMetadataFormatDescriptionGetIdentifiers(
2469            desc: &CMMetadataFormatDescription,
2470        ) -> Option<NonNull<CFArray>>;
2471    }
2472    let ret = unsafe { CMMetadataFormatDescriptionGetIdentifiers(desc) };
2473    ret.map(|ret| unsafe { CFRetained::retain(ret) })
2474}
2475
2476extern "C-unwind" {
2477    #[deprecated = "renamed to `CMFormatDescription::create`"]
2478    pub fn CMFormatDescriptionCreate(
2479        allocator: Option<&CFAllocator>,
2480        media_type: CMMediaType,
2481        media_sub_type: FourCharCode,
2482        extensions: Option<&CFDictionary>,
2483        format_description_out: NonNull<*const CMFormatDescription>,
2484    ) -> OSStatus;
2485}
2486
2487#[deprecated = "renamed to `CMFormatDescription::equal`"]
2488#[inline]
2489pub unsafe extern "C-unwind" fn CMFormatDescriptionEqual(
2490    format_description: Option<&CMFormatDescription>,
2491    other_format_description: Option<&CMFormatDescription>,
2492) -> bool {
2493    extern "C-unwind" {
2494        fn CMFormatDescriptionEqual(
2495            format_description: Option<&CMFormatDescription>,
2496            other_format_description: Option<&CMFormatDescription>,
2497        ) -> Boolean;
2498    }
2499    let ret = unsafe { CMFormatDescriptionEqual(format_description, other_format_description) };
2500    ret != 0
2501}
2502
2503#[deprecated = "renamed to `CMFormatDescription::equal_ignoring_extension_keys`"]
2504#[inline]
2505pub unsafe extern "C-unwind" fn CMFormatDescriptionEqualIgnoringExtensionKeys(
2506    format_description: Option<&CMFormatDescription>,
2507    other_format_description: Option<&CMFormatDescription>,
2508    format_description_extension_keys_to_ignore: Option<&CFType>,
2509    sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
2510) -> bool {
2511    extern "C-unwind" {
2512        fn CMFormatDescriptionEqualIgnoringExtensionKeys(
2513            format_description: Option<&CMFormatDescription>,
2514            other_format_description: Option<&CMFormatDescription>,
2515            format_description_extension_keys_to_ignore: Option<&CFType>,
2516            sample_description_extension_atom_keys_to_ignore: Option<&CFType>,
2517        ) -> Boolean;
2518    }
2519    let ret = unsafe {
2520        CMFormatDescriptionEqualIgnoringExtensionKeys(
2521            format_description,
2522            other_format_description,
2523            format_description_extension_keys_to_ignore,
2524            sample_description_extension_atom_keys_to_ignore,
2525        )
2526    };
2527    ret != 0
2528}
2529
2530extern "C-unwind" {
2531    #[deprecated = "renamed to `CMFormatDescription::media_type`"]
2532    pub fn CMFormatDescriptionGetMediaType(desc: &CMFormatDescription) -> CMMediaType;
2533}
2534
2535extern "C-unwind" {
2536    #[deprecated = "renamed to `CMFormatDescription::media_sub_type`"]
2537    pub fn CMFormatDescriptionGetMediaSubType(desc: &CMFormatDescription) -> FourCharCode;
2538}
2539
2540#[deprecated = "renamed to `CMFormatDescription::extensions`"]
2541#[inline]
2542pub unsafe extern "C-unwind" fn CMFormatDescriptionGetExtensions(
2543    desc: &CMFormatDescription,
2544) -> Option<CFRetained<CFDictionary>> {
2545    extern "C-unwind" {
2546        fn CMFormatDescriptionGetExtensions(
2547            desc: &CMFormatDescription,
2548        ) -> Option<NonNull<CFDictionary>>;
2549    }
2550    let ret = unsafe { CMFormatDescriptionGetExtensions(desc) };
2551    ret.map(|ret| unsafe { CFRetained::retain(ret) })
2552}
2553
2554#[deprecated = "renamed to `CMFormatDescription::extension`"]
2555#[inline]
2556pub unsafe extern "C-unwind" fn CMFormatDescriptionGetExtension(
2557    desc: &CMFormatDescription,
2558    extension_key: &CFString,
2559) -> Option<CFRetained<CFPropertyList>> {
2560    extern "C-unwind" {
2561        fn CMFormatDescriptionGetExtension(
2562            desc: &CMFormatDescription,
2563            extension_key: &CFString,
2564        ) -> Option<NonNull<CFPropertyList>>;
2565    }
2566    let ret = unsafe { CMFormatDescriptionGetExtension(desc, extension_key) };
2567    ret.map(|ret| unsafe { CFRetained::retain(ret) })
2568}
2569
2570extern "C-unwind" {
2571    #[cfg(feature = "CMTime")]
2572    #[deprecated = "renamed to `CMTime::code_format_description_get_frame_duration`"]
2573    pub fn CMTimeCodeFormatDescriptionGetFrameDuration(
2574        time_code_format_description: &CMTimeCodeFormatDescription,
2575    ) -> CMTime;
2576}