objc2_core_media/generated/CMMetadata.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2_core_foundation::*;
5
6use crate::*;
7
8/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_allocationfailed?language=objc)
9pub const kCMMetadataIdentifierError_AllocationFailed: OSStatus = -16300;
10/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_requiredparametermissing?language=objc)
11pub const kCMMetadataIdentifierError_RequiredParameterMissing: OSStatus = -16301;
12/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_badkey?language=objc)
13pub const kCMMetadataIdentifierError_BadKey: OSStatus = -16302;
14/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_badkeylength?language=objc)
15pub const kCMMetadataIdentifierError_BadKeyLength: OSStatus = -16303;
16/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_badkeytype?language=objc)
17pub const kCMMetadataIdentifierError_BadKeyType: OSStatus = -16304;
18/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_badnumberkey?language=objc)
19pub const kCMMetadataIdentifierError_BadNumberKey: OSStatus = -16305;
20/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_badkeyspace?language=objc)
21pub const kCMMetadataIdentifierError_BadKeySpace: OSStatus = -16306;
22/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_badidentifier?language=objc)
23pub const kCMMetadataIdentifierError_BadIdentifier: OSStatus = -16307;
24/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifiererror_nokeyvalueavailable?language=objc)
25pub const kCMMetadataIdentifierError_NoKeyValueAvailable: OSStatus = -16308;
26
27/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatyperegistryerror_allocationfailed?language=objc)
28pub const kCMMetadataDataTypeRegistryError_AllocationFailed: OSStatus = -16310;
29/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatyperegistryerror_requiredparametermissing?language=objc)
30pub const kCMMetadataDataTypeRegistryError_RequiredParameterMissing: OSStatus = -16311;
31/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatyperegistryerror_baddatatypeidentifier?language=objc)
32pub const kCMMetadataDataTypeRegistryError_BadDataTypeIdentifier: OSStatus = -16312;
33/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatyperegistryerror_datatypealreadyregistered?language=objc)
34pub const kCMMetadataDataTypeRegistryError_DataTypeAlreadyRegistered: OSStatus = -16313;
35/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatyperegistryerror_requiresconformingbasetype?language=objc)
36pub const kCMMetadataDataTypeRegistryError_RequiresConformingBaseType: OSStatus = -16314;
37/// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatyperegistryerror_multipleconformingbasetypes?language=objc)
38pub const kCMMetadataDataTypeRegistryError_MultipleConformingBaseTypes: OSStatus = -16315;
39
40extern "C" {
41 /// Metadata keyspace for QuickTime User Data keys.
42 ///
43 /// Metadata keyspace for MPEG-4 User Data keys.
44 ///
45 /// Metadata keyspace for QuickTime Metadata keys.
46 ///
47 /// Metadata keyspace for iTunes keys.
48 ///
49 /// Metadata keyspace for ID3 keys.
50 ///
51 /// Metadata keyspace for ShoutCast keys.
52 ///
53 /// Metadata keyspace for HLS DateRange tags.
54 ///
55 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_quicktimeuserdata?language=objc)
56 pub static kCMMetadataKeySpace_QuickTimeUserData: &'static CFString;
57}
58
59extern "C" {
60 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_isouserdata?language=objc)
61 pub static kCMMetadataKeySpace_ISOUserData: &'static CFString;
62}
63
64extern "C" {
65 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_quicktimemetadata?language=objc)
66 pub static kCMMetadataKeySpace_QuickTimeMetadata: &'static CFString;
67}
68
69extern "C" {
70 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_itunes?language=objc)
71 pub static kCMMetadataKeySpace_iTunes: &'static CFString;
72}
73
74extern "C" {
75 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_id3?language=objc)
76 pub static kCMMetadataKeySpace_ID3: &'static CFString;
77}
78
79extern "C" {
80 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_icy?language=objc)
81 pub static kCMMetadataKeySpace_Icy: &'static CFString;
82}
83
84extern "C" {
85 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatakeyspace_hlsdaterange?language=objc)
86 pub static kCMMetadataKeySpace_HLSDateRange: &'static CFString;
87}
88
89extern "C" {
90 /// Location information in ISO-6709 format.
91 ///
92 /// Direction the observer is facing.
93 ///
94 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatalocation_iso6709?language=objc)
95 pub static kCMMetadataIdentifier_QuickTimeMetadataLocation_ISO6709: &'static CFString;
96}
97
98extern "C" {
99 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatadirection_facing?language=objc)
100 pub static kCMMetadataIdentifier_QuickTimeMetadataDirection_Facing: &'static CFString;
101}
102
103extern "C" {
104 /// An affine transform that can be used in place of a track matrix for
105 /// displaying a video track, to better reflect the current orientation
106 /// of a video camera with respect to a scene. For example, if the camera
107 /// is rotated after a recording has started, the presence of this metadata
108 /// will allow a player to adjust its rendering at the time the rotation occurred.
109 ///
110 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatapreferredaffinetransform?language=objc)
111 pub static kCMMetadataIdentifier_QuickTimeMetadataPreferredAffineTransform: &'static CFString;
112}
113
114extern "C" {
115 /// Video orientation as defined by TIFF/EXIF, which is enumerated by CGImagePropertyOrientation
116 /// (see
117 /// <ImageIO
118 /// /CGImageProperties.h>).
119 ///
120 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatavideoorientation?language=objc)
121 pub static kCMMetadataIdentifier_QuickTimeMetadataVideoOrientation: &'static CFString;
122}
123
124extern "C" {
125 /// A perspective transform that can be used to adjust a Live Photo still image to match the Live Photo movie.
126 /// Expected data type is kCMMetadataBaseDataType_PerspectiveTransformF64.
127 ///
128 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatalivephotostillimagetransform?language=objc)
129 pub static kCMMetadataIdentifier_QuickTimeMetadataLivePhotoStillImageTransform:
130 &'static CFString;
131}
132
133extern "C" {
134 /// The dimensions of the image used to generate kCMMetadataIdentifier_QuickTimeMetadataLivePhotoStillImageTransform.
135 /// Expected data type is kCMMetadataBaseDataType_DimensionsF32.
136 ///
137 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatalivephotostillimagetransformreferencedimensions?language=objc)
138 pub static kCMMetadataIdentifier_QuickTimeMetadataLivePhotoStillImageTransformReferenceDimensions:
139 &'static CFString;
140}
141
142extern "C" {
143 /// A segment identifier, used to support movies where pause/resume has been used.
144 /// Expected data type is kCMMetadataDataType_QuickTimeMetadataUUID.
145 ///
146 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatasegmentidentifier?language=objc)
147 pub static kCMMetadataIdentifier_QuickTimeMetadataSegmentIdentifier: &'static CFString;
148}
149
150extern "C" {
151 /// Scene illuminance measured in units of Lux.
152 /// Expected data type is kCMMetadataDataType_QuickTimeMetadataMilliLux.
153 ///
154 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatasceneilluminance?language=objc)
155 pub static kCMMetadataIdentifier_QuickTimeMetadataSceneIlluminance: &'static CFString;
156}
157
158extern "C" {
159 /// Data associated with a Spatial Audio capture that contains an analysis of a First Order Ambisonics audio stream which is used for playback.
160 ///
161 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadataspatialaudiomix?language=objc)
162 pub static kCMMetadataIdentifier_QuickTimeMetadataSpatialAudioMix: &'static CFString;
163}
164
165extern "C" {
166 /// Display mask rectangle for monoscopic video
167 /// Expected data type is kCMMetadataBaseDataType_RasterRectangleValue.
168 ///
169 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatadisplaymaskrectanglemono?language=objc)
170 pub static kCMMetadataIdentifier_QuickTimeMetadataDisplayMaskRectangleMono: &'static CFString;
171}
172
173extern "C" {
174 /// Display mask rectangle for stereoscopic video's left eye view
175 /// Expected data type is kCMMetadataBaseDataType_RasterRectangleValue or kCMMetadataBaseDataType_ExtendedRasterRectangleValue.
176 ///
177 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatadisplaymaskrectanglestereoleft?language=objc)
178 pub static kCMMetadataIdentifier_QuickTimeMetadataDisplayMaskRectangleStereoLeft:
179 &'static CFString;
180}
181
182extern "C" {
183 /// Display mask rectangle for stereoscopic video's right eye view
184 /// Expected data type is kCMMetadataBaseDataType_RasterRectangleValue or kCMMetadataBaseDataType_ExtendedRasterRectangleValue.
185 ///
186 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatadisplaymaskrectanglestereoright?language=objc)
187 pub static kCMMetadataIdentifier_QuickTimeMetadataDisplayMaskRectangleStereoRight:
188 &'static CFString;
189}
190
191extern "C" {
192 /// Presentation data associated with Apple Immersive Video's video frames. Data is a JSON-encoding of ImmersiveMediaSupport framework's PresentationDescriptor object.
193 /// Expected data type is kCMMetadataBaseDataType_RawData.
194 ///
195 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadataidentifier_quicktimemetadatapresentationimmersivemedia?language=objc)
196 pub static kCMMetadataIdentifier_QuickTimeMetadataPresentationImmersiveMedia: &'static CFString;
197}
198
199extern "C-unwind" {
200 /// Creates a URL-like string identifier that represents a key/keyspace tuple.
201 ///
202 /// Metadata entities are identified by a key whose interpretation
203 /// is defined by its keyspace. When writing metadata to a QuickTime
204 /// Movie, this tuple is part of the track's format description.
205 ///
206 /// The following constants make up the current list of supported keyspaces,
207 /// which are documented elsewhere in this file:
208 /// <ul>
209 /// kCMMetadataKeySpace_QuickTimeUserData
210 /// <li>
211 /// kCMMetadataKeySpace_ISOUserData
212 /// <li>
213 /// kCMMetadataKeySpace_iTunes
214 /// <li>
215 /// kCMMetadataKeySpace_ID3
216 /// <li>
217 /// kCMMetadataKeySpace_QuickTimeMetadata
218 /// <li>
219 /// kCMMetadataKeySpace_Icy
220 /// </ul>
221 /// Some keyspaces use OSTypes (a.k.a. FourCharCodes) to define their
222 /// keys, and as such their keys are four bytes in length. The keyspaces
223 /// that fall into this category are: kCMMetadataKeySpace_QuickTimeUserData,
224 /// kCMMetadataKeySpace_ISOUserData, kCMMetadataKeySpace_iTunes, and
225 /// kCMMetadataKeySpace_ID3.
226 ///
227 /// The keyspace kCMMetadataKeySpace_QuickTimeMetadata defines its
228 /// key values to be expressed as reverse-DNS strings, which allows
229 /// third parties to define their own keys in a well established way
230 /// that avoids collisions.
231 ///
232 /// As a matter of convenience, known keyspaces allow for a key
233 /// to be passed in using a variety of CFTypes. Note that what
234 /// is returned by CMMetadataCreateKeyFromIdentifier depends upon the
235 /// keyspace, and may be a different CFType than what is passed
236 /// to this routine (see the discussion below for what CFTypes are
237 /// returned for known keyspaces). To get a key represented as
238 /// CFData, call CMMetadataCreateKeyFromIdentifierAsCFData.
239 ///
240 /// For OSType keyspaces, a key may be passed as a CFNumber,
241 /// a CFString, or a CFData. A key passed as a CFNumber will have
242 /// its value retrieved as kCFNumberSInt32Type comprising the four
243 /// bytes of the key’s numeric value in big-endian byte order.
244 /// A key passed as a CFString must be a valid ASCII string of four
245 /// characters. A key passed as a CFData must be comprised of the
246 /// four bytes of the key’s numeric value in big-endian byte order.
247 ///
248 /// All other keyspaces allow the key to be passed as a CFString
249 /// or CFData. In both cases, the key will be interpreted as an
250 /// ASCII string for the purposes of identifier encoding.
251 ///
252 /// # Safety
253 ///
254 /// - `key` should be of the correct type.
255 /// - `identifier_out` must be a valid pointer.
256 pub fn CMMetadataCreateIdentifierForKeyAndKeySpace(
257 allocator: Option<&CFAllocator>,
258 key: &CFType,
259 key_space: &CFString,
260 identifier_out: NonNull<*const CFString>,
261 ) -> OSStatus;
262}
263
264extern "C-unwind" {
265 /// Creates a copy of the key encoded in the identifier as a CFType.
266 ///
267 /// The returned CFType is based on the keyspace encoded in the identifier.
268 ///
269 /// For OSType keyspaces, the key will be returned as a CFNumber,
270 /// where a big endian interpretation of its kCFNumberSInt32Type value
271 /// represents the four bytes of the key's numeric value.
272 ///
273 /// For the keyspaces kCMMetadataKeySpace_QuickTimeMetadata and
274 /// kCMMetadataKeySpace_Icy, the key will be returned as a CFString.
275 ///
276 /// All other keyspaces will have the function return the key as a CFData.
277 ///
278 /// # Safety
279 ///
280 /// `key_out` must be a valid pointer.
281 pub fn CMMetadataCreateKeyFromIdentifier(
282 allocator: Option<&CFAllocator>,
283 identifier: &CFString,
284 key_out: NonNull<*const CFType>,
285 ) -> OSStatus;
286}
287
288extern "C-unwind" {
289 /// Creates a copy of the key value that was encoded in the identifier as CFData.
290 /// The bytes in the CFData correpsond to how they are serialized in the file.
291 ///
292 /// # Safety
293 ///
294 /// `key_out` must be a valid pointer.
295 pub fn CMMetadataCreateKeyFromIdentifierAsCFData(
296 allocator: Option<&CFAllocator>,
297 identifier: &CFString,
298 key_out: NonNull<*const CFData>,
299 ) -> OSStatus;
300}
301
302extern "C-unwind" {
303 /// Creates a copy of the key value that was encoded in the identifier as CFData.
304 ///
305 /// # Safety
306 ///
307 /// `key_space_out` must be a valid pointer.
308 pub fn CMMetadataCreateKeySpaceFromIdentifier(
309 allocator: Option<&CFAllocator>,
310 identifier: &CFString,
311 key_space_out: NonNull<*const CFString>,
312 ) -> OSStatus;
313}
314
315extern "C" {
316 /// A sequence of bytes whose interpretation based upon an agreement between
317 /// the reader and the writer.
318 ///
319 /// UTF-8 string.
320 ///
321 /// UTF-16 string.
322 ///
323 /// GIF image.
324 ///
325 /// JPEG image.
326 ///
327 /// PNG image.
328 ///
329 /// BMP image.
330 ///
331 /// 32-bit big endian floating point number.
332 ///
333 /// 64-bit big endian floating point number.
334 ///
335 /// 8-bit signed integer.
336 ///
337 /// 16-bit big endian signed integer.
338 ///
339 /// 32-bit big endian signed integer.
340 ///
341 /// 64-bit big endian signed integer.
342 ///
343 /// 8-bit unsigned integer.
344 ///
345 /// 16-bit big endian unsigned integer.
346 ///
347 /// 32-bit big endian unsigned integer.
348 ///
349 /// 64-bit big endian unsigned integer.
350 ///
351 /// Consists of two 32-bit big endian floating point values, the x and y values, respectively.
352 ///
353 /// Consists of a 32-bit big endian floating point x value followed by a 32-bit floating point y value.
354 ///
355 /// Consists of four 32-bit big endian floating point values, the origin's x, origin's y, width and height values, respectively.
356 /// May also be interpreted as a 32-bit floating point origin followed by a 32-bit floating point dimension.
357 ///
358 /// A 3x3 matrix of 64-bit big endian floating point numbers stored in row-major order that specify an affine transform.
359 ///
360 /// Three or more pairs of 32-bit floating point numbers (x and y values) that define the verticies of a polygon.
361 ///
362 /// Two or more pairs of 32-bit floating point numbers (x and y values) that define a multi-segmented line.
363 ///
364 /// UTF-8 encoded JSON data.
365 ///
366 /// A 3x3 matrix of 64-bit big endian floating point numbers stored in row-major order that specify a perspective transform.
367 ///
368 /// Consists of six 16-bit big endian unsigned integer values of RasterRectangleValue in the following order: raster width, raster height, left, width, top, height.
369 /// Rectangle origin and dimension are normalized to raster rectangle coordinates to be pixel accurate but still retain the relative semantics when scaled.
370 ///
371 /// Consists of at least six 16-bit big endian unsigned integer values for RasterRectangleValue in the same order as kCMMetadataBaseDataType_RasterRectangleValue and then two 4-bit values for the number of left and right edge adjustment points. If edge adustment points are 2 or more, points would be pairs of 16-bit big endian unsigned integers alternating between x and y with left edge points first and right edge points afterwards.
372 /// Rectangle origin and dimension are normalized to raster rectangle coordinates to be pixel accurate but still retain the relative semantics when scaled.
373 ///
374 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_rawdata?language=objc)
375 pub static kCMMetadataBaseDataType_RawData: &'static CFString;
376}
377
378extern "C" {
379 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_utf8?language=objc)
380 pub static kCMMetadataBaseDataType_UTF8: &'static CFString;
381}
382
383extern "C" {
384 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_utf16?language=objc)
385 pub static kCMMetadataBaseDataType_UTF16: &'static CFString;
386}
387
388extern "C" {
389 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_gif?language=objc)
390 pub static kCMMetadataBaseDataType_GIF: &'static CFString;
391}
392
393extern "C" {
394 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_jpeg?language=objc)
395 pub static kCMMetadataBaseDataType_JPEG: &'static CFString;
396}
397
398extern "C" {
399 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_png?language=objc)
400 pub static kCMMetadataBaseDataType_PNG: &'static CFString;
401}
402
403extern "C" {
404 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_bmp?language=objc)
405 pub static kCMMetadataBaseDataType_BMP: &'static CFString;
406}
407
408extern "C" {
409 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_float32?language=objc)
410 pub static kCMMetadataBaseDataType_Float32: &'static CFString;
411}
412
413extern "C" {
414 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_float64?language=objc)
415 pub static kCMMetadataBaseDataType_Float64: &'static CFString;
416}
417
418extern "C" {
419 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_sint8?language=objc)
420 pub static kCMMetadataBaseDataType_SInt8: &'static CFString;
421}
422
423extern "C" {
424 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_sint16?language=objc)
425 pub static kCMMetadataBaseDataType_SInt16: &'static CFString;
426}
427
428extern "C" {
429 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_sint32?language=objc)
430 pub static kCMMetadataBaseDataType_SInt32: &'static CFString;
431}
432
433extern "C" {
434 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_sint64?language=objc)
435 pub static kCMMetadataBaseDataType_SInt64: &'static CFString;
436}
437
438extern "C" {
439 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_uint8?language=objc)
440 pub static kCMMetadataBaseDataType_UInt8: &'static CFString;
441}
442
443extern "C" {
444 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_uint16?language=objc)
445 pub static kCMMetadataBaseDataType_UInt16: &'static CFString;
446}
447
448extern "C" {
449 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_uint32?language=objc)
450 pub static kCMMetadataBaseDataType_UInt32: &'static CFString;
451}
452
453extern "C" {
454 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_uint64?language=objc)
455 pub static kCMMetadataBaseDataType_UInt64: &'static CFString;
456}
457
458extern "C" {
459 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_pointf32?language=objc)
460 pub static kCMMetadataBaseDataType_PointF32: &'static CFString;
461}
462
463extern "C" {
464 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_dimensionsf32?language=objc)
465 pub static kCMMetadataBaseDataType_DimensionsF32: &'static CFString;
466}
467
468extern "C" {
469 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_rectf32?language=objc)
470 pub static kCMMetadataBaseDataType_RectF32: &'static CFString;
471}
472
473extern "C" {
474 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_affinetransformf64?language=objc)
475 pub static kCMMetadataBaseDataType_AffineTransformF64: &'static CFString;
476}
477
478extern "C" {
479 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_polygonf32?language=objc)
480 pub static kCMMetadataBaseDataType_PolygonF32: &'static CFString;
481}
482
483extern "C" {
484 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_polylinef32?language=objc)
485 pub static kCMMetadataBaseDataType_PolylineF32: &'static CFString;
486}
487
488extern "C" {
489 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_json?language=objc)
490 pub static kCMMetadataBaseDataType_JSON: &'static CFString;
491}
492
493extern "C" {
494 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_perspectivetransformf64?language=objc)
495 pub static kCMMetadataBaseDataType_PerspectiveTransformF64: &'static CFString;
496}
497
498extern "C" {
499 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_rasterrectanglevalue?language=objc)
500 pub static kCMMetadataBaseDataType_RasterRectangleValue: &'static CFString;
501}
502
503extern "C" {
504 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatabasedatatype_extendedrasterrectanglevalue?language=objc)
505 pub static kCMMetadataBaseDataType_ExtendedRasterRectangleValue: &'static CFString;
506}
507
508extern "C" {
509 /// A string supplying location information in ISO-6709 format. Conforms to
510 /// kCMMetadataBaseDataType_UTF8.
511 ///
512 /// A string supplying degrees offset from magnetic North. Conforms to
513 /// kCMMetadataBaseDataType_UTF8.
514 ///
515 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatype_quicktimemetadatalocation_iso6709?language=objc)
516 pub static kCMMetadataDataType_QuickTimeMetadataLocation_ISO6709: &'static CFString;
517}
518
519extern "C" {
520 /// [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatype_quicktimemetadatadirection?language=objc)
521 pub static kCMMetadataDataType_QuickTimeMetadataDirection: &'static CFString;
522}
523
524extern "C" {
525 /// A string supplying a universally unique identifier. Conforms to
526 /// kCMMetadataBaseDataType_UTF8.
527 ///
528 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatype_quicktimemetadatauuid?language=objc)
529 pub static kCMMetadataDataType_QuickTimeMetadataUUID: &'static CFString;
530}
531
532extern "C" {
533 /// 1/1000 of a Lux. An unsigned value between 0 - 100,000,000. Conforms to
534 /// kCMMetadataBaseDataType_UInt32.
535 ///
536 /// See also [Apple's documentation](https://developer.apple.com/documentation/coremedia/kcmmetadatadatatype_quicktimemetadatamillilux?language=objc)
537 pub static kCMMetadataDataType_QuickTimeMetadataMilliLux: &'static CFString;
538}
539
540extern "C-unwind" {
541 /// Register a data type with the data type registry.
542 ///
543 /// This routine is called by clients to register a data type with
544 /// the data type registry. The list of conforming data type identifiers
545 /// must include a base data type. If the data type has already
546 /// been registered, then it is not considered an error to re-register it
547 /// as long as the list of conforming data type identifiers has the same
548 /// entries as the original; otherwise an error will be returned.
549 ///
550 /// # Safety
551 ///
552 /// `conforming_data_types` generic must be of the correct type.
553 pub fn CMMetadataDataTypeRegistryRegisterDataType(
554 data_type: &CFString,
555 description: &CFString,
556 conforming_data_types: &CFArray,
557 ) -> OSStatus;
558}
559
560/// Tests a data type identifier to see if it has been registered.
561#[inline]
562pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryDataTypeIsRegistered(
563 data_type: &CFString,
564) -> bool {
565 extern "C-unwind" {
566 fn CMMetadataDataTypeRegistryDataTypeIsRegistered(data_type: &CFString) -> Boolean;
567 }
568 let ret = unsafe { CMMetadataDataTypeRegistryDataTypeIsRegistered(data_type) };
569 ret != 0
570}
571
572/// Returns the data type's description (if any was provided when it was registered).
573#[inline]
574pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryGetDataTypeDescription(
575 data_type: &CFString,
576) -> CFRetained<CFString> {
577 extern "C-unwind" {
578 fn CMMetadataDataTypeRegistryGetDataTypeDescription(
579 data_type: &CFString,
580 ) -> Option<NonNull<CFString>>;
581 }
582 let ret = unsafe { CMMetadataDataTypeRegistryGetDataTypeDescription(data_type) };
583 let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
584 unsafe { CFRetained::retain(ret) }
585}
586
587/// Returns the data type's conforming data types (if any were
588/// provided when it was registered).
589///
590/// Returns: List of conforming data types registered for the given data type.
591/// NULL is returned if the data type has not been registered.
592#[inline]
593pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryGetConformingDataTypes(
594 data_type: &CFString,
595) -> CFRetained<CFArray> {
596 extern "C-unwind" {
597 fn CMMetadataDataTypeRegistryGetConformingDataTypes(
598 data_type: &CFString,
599 ) -> Option<NonNull<CFArray>>;
600 }
601 let ret = unsafe { CMMetadataDataTypeRegistryGetConformingDataTypes(data_type) };
602 let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
603 unsafe { CFRetained::retain(ret) }
604}
605
606/// Checks to see if a data type conforms to another data type.
607///
608/// A given data type will conform to a second data type if any of
609/// the following are true:
610/// <ul>
611/// 1. The data type identifiers are the same.
612/// <li>
613/// 2. The first data type identifier's conformance list contains the second data type identifier.
614/// <li>
615/// 3. A recursive search of the conforming data types for each element in the first
616/// <li>
617/// data type's conformance list yields the second data type identifer.
618/// </ul>
619///
620/// Returns: True if the first data type conforms to the second data type.
621#[inline]
622pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryDataTypeConformsToDataType(
623 data_type: &CFString,
624 conforms_to_data_type: &CFString,
625) -> bool {
626 extern "C-unwind" {
627 fn CMMetadataDataTypeRegistryDataTypeConformsToDataType(
628 data_type: &CFString,
629 conforms_to_data_type: &CFString,
630 ) -> Boolean;
631 }
632 let ret = unsafe {
633 CMMetadataDataTypeRegistryDataTypeConformsToDataType(data_type, conforms_to_data_type)
634 };
635 ret != 0
636}
637
638/// Returns an array of base data type identifiers.
639///
640/// There are a set of base data types that seed the data type
641/// registry. All valid data types will have their conformance search
642/// end with a base data type.
643#[inline]
644pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryGetBaseDataTypes(
645) -> Option<CFRetained<CFArray>> {
646 extern "C-unwind" {
647 fn CMMetadataDataTypeRegistryGetBaseDataTypes() -> Option<NonNull<CFArray>>;
648 }
649 let ret = unsafe { CMMetadataDataTypeRegistryGetBaseDataTypes() };
650 ret.map(|ret| unsafe { CFRetained::retain(ret) })
651}
652
653/// Tests a data type identifier to see if it represents a base data type.
654///
655/// This is simply a convenience method to test to see if a given
656/// data type identifier is in the array returned by
657/// CMMetadataDataTypeRegistryGetBaseDataTypes.
658#[inline]
659pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryDataTypeIsBaseDataType(
660 data_type: &CFString,
661) -> bool {
662 extern "C-unwind" {
663 fn CMMetadataDataTypeRegistryDataTypeIsBaseDataType(data_type: &CFString) -> Boolean;
664 }
665 let ret = unsafe { CMMetadataDataTypeRegistryDataTypeIsBaseDataType(data_type) };
666 ret != 0
667}
668
669/// Returns the base data type identifier that the given data type
670/// conforms to.
671///
672/// There are a set of base data types that seed the data type
673/// registry. All valid data types will have their conformance search
674/// end with a base data type.
675#[inline]
676pub unsafe extern "C-unwind" fn CMMetadataDataTypeRegistryGetBaseDataTypeForConformingDataType(
677 data_type: &CFString,
678) -> CFRetained<CFString> {
679 extern "C-unwind" {
680 fn CMMetadataDataTypeRegistryGetBaseDataTypeForConformingDataType(
681 data_type: &CFString,
682 ) -> Option<NonNull<CFString>>;
683 }
684 let ret = unsafe { CMMetadataDataTypeRegistryGetBaseDataTypeForConformingDataType(data_type) };
685 let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
686 unsafe { CFRetained::retain(ret) }
687}