objc2_av_foundation/generated/
AVAsset.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-media")]
9use objc2_core_media::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avasset?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct AVAsset;
19);
20
21#[cfg(feature = "AVAsynchronousKeyValueLoading")]
22unsafe impl AVAsynchronousKeyValueLoading for AVAsset {}
23
24unsafe impl NSCopying for AVAsset {}
25
26unsafe impl CopyingHelper for AVAsset {
27    type Result = Self;
28}
29
30unsafe impl NSObjectProtocol for AVAsset {}
31
32impl AVAsset {
33    extern_methods!(
34        /// Returns an instance of AVAsset for inspection of a media resource.
35        ///
36        /// Parameter `URL`: An instance of NSURL that references a media resource.
37        ///
38        /// Returns: An instance of AVAsset.
39        ///
40        /// Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.
41        #[unsafe(method(assetWithURL:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn assetWithURL(url: &NSURL) -> Retained<Self>;
44
45        #[cfg(feature = "objc2-core-media")]
46        #[unsafe(method(duration))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn duration(&self) -> CMTime;
49
50        #[unsafe(method(preferredRate))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn preferredRate(&self) -> c_float;
53
54        #[unsafe(method(preferredVolume))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn preferredVolume(&self) -> c_float;
57
58        #[cfg(feature = "objc2-core-foundation")]
59        #[unsafe(method(preferredTransform))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn preferredTransform(&self) -> CGAffineTransform;
62
63        #[cfg(feature = "objc2-core-foundation")]
64        #[deprecated = "Use the naturalSize and preferredTransform, as appropriate, of the receiver's video tracks. See -tracksWithMediaType:"]
65        #[unsafe(method(naturalSize))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn naturalSize(&self) -> CGSize;
68
69        #[cfg(feature = "objc2-core-media")]
70        /// Indicates how close to the latest content in a live stream playback can be sustained.
71        ///
72        /// For non-live assets this value is kCMTimeInvalid.
73        #[unsafe(method(minimumTimeOffsetFromLive))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn minimumTimeOffsetFromLive(&self) -> CMTime;
76    );
77}
78
79/// Methods declared on superclass `NSObject`.
80impl AVAsset {
81    extern_methods!(
82        #[unsafe(method(init))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new() -> Retained<Self>;
89    );
90}
91
92/// AVAssetAsynchronousLoading.
93impl AVAsset {
94    extern_methods!(
95        #[unsafe(method(providesPreciseDurationAndTiming))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn providesPreciseDurationAndTiming(&self) -> bool;
98
99        /// Cancels the loading of all values for all observers.
100        ///
101        /// Deallocation or finalization of an instance of AVAsset will implicitly cancel loading if any loading requests are still outstanding.
102        #[unsafe(method(cancelLoading))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn cancelLoading(&self);
105    );
106}
107
108/// These constants can be passed in to AVURLAssetReferenceRestrictionsKey to control the resolution of references to external media data.
109///
110///
111/// Indicates that all types of references should be followed.
112///
113/// Indicates that references from a remote asset (e.g. referenced via http URL) to local media data (e.g. stored in a local file) should not be followed.
114///
115/// Indicates that references from a local asset to remote media data should not be followed.
116///
117/// Indicates that references from a remote asset to remote media data stored at a different site should not be followed.
118///
119/// Indicates that references from a local asset to local media data stored outside the asset's container file should not be followed.
120///
121/// Indicates that only references to media data stored within the asset's container file should be allowed.
122///
123/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetreferencerestrictions?language=objc)
124// NS_OPTIONS
125#[repr(transparent)]
126#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
127pub struct AVAssetReferenceRestrictions(pub NSUInteger);
128bitflags::bitflags! {
129    impl AVAssetReferenceRestrictions: NSUInteger {
130        #[doc(alias = "AVAssetReferenceRestrictionForbidNone")]
131        const ForbidNone = 0;
132        #[doc(alias = "AVAssetReferenceRestrictionForbidRemoteReferenceToLocal")]
133        const ForbidRemoteReferenceToLocal = 1<<0;
134        #[doc(alias = "AVAssetReferenceRestrictionForbidLocalReferenceToRemote")]
135        const ForbidLocalReferenceToRemote = 1<<1;
136        #[doc(alias = "AVAssetReferenceRestrictionForbidCrossSiteReference")]
137        const ForbidCrossSiteReference = 1<<2;
138        #[doc(alias = "AVAssetReferenceRestrictionForbidLocalReferenceToLocal")]
139        const ForbidLocalReferenceToLocal = 1<<3;
140        #[doc(alias = "AVAssetReferenceRestrictionForbidAll")]
141        const ForbidAll = 0xFFFF;
142        #[doc(alias = "AVAssetReferenceRestrictionDefaultPolicy")]
143        const DefaultPolicy = AVAssetReferenceRestrictions::ForbidLocalReferenceToRemote.0;
144    }
145}
146
147unsafe impl Encode for AVAssetReferenceRestrictions {
148    const ENCODING: Encoding = NSUInteger::ENCODING;
149}
150
151unsafe impl RefEncode for AVAssetReferenceRestrictions {
152    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
153}
154
155/// AVAssetReferenceRestrictions.
156impl AVAsset {
157    extern_methods!(
158        /// Indicates the reference restrictions being used by the receiver.
159        ///
160        /// For AVURLAsset, this property reflects the value passed in for AVURLAssetReferenceRestrictionsKey, if any. See AVURLAssetReferenceRestrictionsKey below for a full discussion of reference restrictions. The default value for this property is AVAssetReferenceRestrictionForbidLocalReferenceToRemote.
161        #[unsafe(method(referenceRestrictions))]
162        #[unsafe(method_family = none)]
163        pub unsafe fn referenceRestrictions(&self) -> AVAssetReferenceRestrictions;
164    );
165}
166
167/// AVAssetTrackInspection.
168impl AVAsset {
169    extern_methods!(
170        #[cfg(feature = "AVAssetTrack")]
171        /// Provides the array of AVAssetTracks contained by the asset
172        #[unsafe(method(tracks))]
173        #[unsafe(method_family = none)]
174        pub unsafe fn tracks(&self) -> Retained<NSArray<AVAssetTrack>>;
175
176        #[cfg(all(feature = "AVAssetTrack", feature = "objc2-core-media"))]
177        /// Provides an instance of AVAssetTrack that represents the track of the specified trackID.
178        ///
179        /// Parameter `trackID`: The trackID of the requested AVAssetTrack.
180        ///
181        /// Returns: An instance of AVAssetTrack; may be nil if no track of the specified trackID is available.
182        ///
183        /// Becomes callable without blocking when the key
184        /// "
185        /// tracks" has been loaded
186        #[deprecated = "Use loadTrackWithTrackID:completionHandler: instead"]
187        #[unsafe(method(trackWithTrackID:))]
188        #[unsafe(method_family = none)]
189        pub unsafe fn trackWithTrackID(
190            &self,
191            track_id: CMPersistentTrackID,
192        ) -> Option<Retained<AVAssetTrack>>;
193
194        #[cfg(all(
195            feature = "AVAssetTrack",
196            feature = "block2",
197            feature = "objc2-core-media"
198        ))]
199        /// Loads an instance of AVAssetTrack that represents the track of the specified trackID.
200        ///
201        /// Parameter `trackID`: The trackID of the requested AVAssetTrack.
202        ///
203        /// Parameter `completionHandler`: A block that is called when the loading is finished, with either the loaded track (which may be nil if no track of the specified trackID is available) or an error.
204        #[unsafe(method(loadTrackWithTrackID:completionHandler:))]
205        #[unsafe(method_family = none)]
206        pub unsafe fn loadTrackWithTrackID_completionHandler(
207            &self,
208            track_id: CMPersistentTrackID,
209            completion_handler: &block2::Block<dyn Fn(*mut AVAssetTrack, *mut NSError)>,
210        );
211
212        #[cfg(all(feature = "AVAssetTrack", feature = "AVMediaFormat"))]
213        /// Provides an array of AVAssetTracks of the asset that present media of the specified media type.
214        ///
215        /// Parameter `mediaType`: The media type according to which AVAsset filters its AVAssetTracks. (Media types are defined in AVMediaFormat.h.)
216        ///
217        /// Returns: An NSArray of AVAssetTracks; may be empty if no tracks of the specified media type are available.
218        ///
219        /// Becomes callable without blocking when the key
220        /// "
221        /// tracks" has been loaded
222        #[deprecated = "Use loadTracksWithMediaType:completionHandler: instead"]
223        #[unsafe(method(tracksWithMediaType:))]
224        #[unsafe(method_family = none)]
225        pub unsafe fn tracksWithMediaType(
226            &self,
227            media_type: &AVMediaType,
228        ) -> Retained<NSArray<AVAssetTrack>>;
229
230        #[cfg(all(
231            feature = "AVAssetTrack",
232            feature = "AVMediaFormat",
233            feature = "block2"
234        ))]
235        /// Loads an array of AVAssetTracks of the asset that present media of the specified media type.
236        ///
237        /// Parameter `mediaType`: The media type according to which AVAsset filters its AVAssetTracks. (Media types are defined in AVMediaFormat.h.)
238        ///
239        /// Parameter `completionHandler`: A block that is called when the loading is finished, with either the loaded tracks (which may be empty if no tracks of the specified media type are available) or an error.
240        #[unsafe(method(loadTracksWithMediaType:completionHandler:))]
241        #[unsafe(method_family = none)]
242        pub unsafe fn loadTracksWithMediaType_completionHandler(
243            &self,
244            media_type: &AVMediaType,
245            completion_handler: &block2::Block<dyn Fn(*mut NSArray<AVAssetTrack>, *mut NSError)>,
246        );
247
248        #[cfg(all(feature = "AVAssetTrack", feature = "AVMediaFormat"))]
249        /// Provides an array of AVAssetTracks of the asset that present media with the specified characteristic.
250        ///
251        /// Parameter `mediaCharacteristic`: The media characteristic according to which AVAsset filters its AVAssetTracks. (Media characteristics are defined in AVMediaFormat.h.)
252        ///
253        /// Returns: An NSArray of AVAssetTracks; may be empty if no tracks with the specified characteristic are available.
254        ///
255        /// Becomes callable without blocking when the key
256        /// "
257        /// tracks" has been loaded
258        #[deprecated = "Use loadTracksWithMediaCharacteristic:completionHandler: instead"]
259        #[unsafe(method(tracksWithMediaCharacteristic:))]
260        #[unsafe(method_family = none)]
261        pub unsafe fn tracksWithMediaCharacteristic(
262            &self,
263            media_characteristic: &AVMediaCharacteristic,
264        ) -> Retained<NSArray<AVAssetTrack>>;
265
266        #[cfg(all(
267            feature = "AVAssetTrack",
268            feature = "AVMediaFormat",
269            feature = "block2"
270        ))]
271        /// Loads an array of AVAssetTracks of the asset that present media with the specified characteristic.
272        ///
273        /// Parameter `mediaCharacteristic`: The media characteristic according to which AVAsset filters its AVAssetTracks. (Media characteristics are defined in AVMediaFormat.h.)
274        ///
275        /// Parameter `completionHandler`: A block that is called when the loading is finished, with either the loaded tracks (which may be empty if no tracks with the specified characteristic are available) or an error.
276        #[unsafe(method(loadTracksWithMediaCharacteristic:completionHandler:))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn loadTracksWithMediaCharacteristic_completionHandler(
279            &self,
280            media_characteristic: &AVMediaCharacteristic,
281            completion_handler: &block2::Block<dyn Fn(*mut NSArray<AVAssetTrack>, *mut NSError)>,
282        );
283
284        #[cfg(feature = "AVAssetTrackGroup")]
285        /// All track groups in the receiver.
286        ///
287        ///
288        /// The value of this property is an NSArray of AVAssetTrackGroups, each representing a different grouping of tracks in the receiver.
289        #[unsafe(method(trackGroups))]
290        #[unsafe(method_family = none)]
291        pub unsafe fn trackGroups(&self) -> Retained<NSArray<AVAssetTrackGroup>>;
292    );
293}
294
295/// AVAssetMetadataReading.
296impl AVAsset {
297    extern_methods!(
298        #[cfg(feature = "AVMetadataItem")]
299        #[unsafe(method(creationDate))]
300        #[unsafe(method_family = none)]
301        pub unsafe fn creationDate(&self) -> Option<Retained<AVMetadataItem>>;
302
303        #[unsafe(method(lyrics))]
304        #[unsafe(method_family = none)]
305        pub unsafe fn lyrics(&self) -> Option<Retained<NSString>>;
306
307        #[cfg(feature = "AVMetadataItem")]
308        #[unsafe(method(commonMetadata))]
309        #[unsafe(method_family = none)]
310        pub unsafe fn commonMetadata(&self) -> Retained<NSArray<AVMetadataItem>>;
311
312        #[cfg(feature = "AVMetadataItem")]
313        #[unsafe(method(metadata))]
314        #[unsafe(method_family = none)]
315        pub unsafe fn metadata(&self) -> Retained<NSArray<AVMetadataItem>>;
316
317        #[cfg(feature = "AVMetadataFormat")]
318        #[unsafe(method(availableMetadataFormats))]
319        #[unsafe(method_family = none)]
320        pub unsafe fn availableMetadataFormats(&self) -> Retained<NSArray<AVMetadataFormat>>;
321
322        #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataItem"))]
323        /// Provides an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format; can subsequently be filtered according to language via +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:], according to locale via +[AVMetadataItem metadataItemsFromArray:withLocale:], or according to key via +[AVMetadataItem metadataItemsFromArray:withKey:keySpace:].
324        ///
325        /// Parameter `format`: The metadata format for which items are requested.
326        ///
327        /// Returns: An NSArray containing AVMetadataItems; may be empty if there is no metadata of the specified format.
328        ///
329        /// Becomes callable without blocking when the key
330        /// "
331        /// availableMetadataFormats" has been loaded
332        #[deprecated = "Use loadMetadataForFormat:completionHandler: instead"]
333        #[unsafe(method(metadataForFormat:))]
334        #[unsafe(method_family = none)]
335        pub unsafe fn metadataForFormat(
336            &self,
337            format: &AVMetadataFormat,
338        ) -> Retained<NSArray<AVMetadataItem>>;
339
340        #[cfg(all(
341            feature = "AVMetadataFormat",
342            feature = "AVMetadataItem",
343            feature = "block2"
344        ))]
345        /// Loads an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format; can subsequently be filtered according to language via +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:], according to locale via +[AVMetadataItem metadataItemsFromArray:withLocale:], or according to key via +[AVMetadataItem metadataItemsFromArray:withKey:keySpace:].
346        ///
347        /// Parameter `format`: The metadata format for which items are requested.
348        ///
349        /// Parameter `completionHandler`: A block that is invoked when loading is complete, vending the array of metadata items (which may be empty if there is no metadata of the specified format) or an error.
350        #[unsafe(method(loadMetadataForFormat:completionHandler:))]
351        #[unsafe(method_family = none)]
352        pub unsafe fn loadMetadataForFormat_completionHandler(
353            &self,
354            format: &AVMetadataFormat,
355            completion_handler: &block2::Block<dyn Fn(*mut NSArray<AVMetadataItem>, *mut NSError)>,
356        );
357    );
358}
359
360/// AVAssetChapterInspection.
361impl AVAsset {
362    extern_methods!(
363        #[unsafe(method(availableChapterLocales))]
364        #[unsafe(method_family = none)]
365        pub unsafe fn availableChapterLocales(&self) -> Retained<NSArray<NSLocale>>;
366
367        #[cfg(all(feature = "AVMetadataFormat", feature = "AVTimedMetadataGroup"))]
368        /// Provides an array of chapters.
369        ///
370        /// Parameter `locale`: Locale of the metadata items carrying chapter titles to be returned (supports the IETF BCP 47 specification).
371        ///
372        /// Parameter `commonKeys`: Array of common keys of AVMetadataItem to be included; can be nil.
373        /// AVMetadataCommonKeyArtwork is the only supported key for now.
374        ///
375        /// Returns: An NSArray of AVTimedMetadataGroup.
376        ///
377        /// This method returns an array of AVTimedMetadataGroup objects. Each object in the array always contains an AVMetadataItem representing the chapter title; the timeRange property of the AVTimedMetadataGroup object is equal to the time range of the chapter title item.
378        ///
379        /// An AVMetadataItem with the specified common key will be added to an existing AVTimedMetadataGroup object if the time range (timestamp and duration) of the metadata item and the metadata group overlaps. The locale of items not carrying chapter titles need not match the specified locale parameter.
380        ///
381        /// Further filtering of the metadata items in AVTimedMetadataGroups according to language can be accomplished using +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:]; filtering of the metadata items according to locale can be accomplished using +[AVMetadataItem metadataItemsFromArray:withLocale:].
382        #[deprecated = "Use loadChapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:completionHandler: instead"]
383        #[unsafe(method(chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:))]
384        #[unsafe(method_family = none)]
385        pub unsafe fn chapterMetadataGroupsWithTitleLocale_containingItemsWithCommonKeys(
386            &self,
387            locale: &NSLocale,
388            common_keys: Option<&NSArray<AVMetadataKey>>,
389        ) -> Retained<NSArray<AVTimedMetadataGroup>>;
390
391        #[cfg(all(
392            feature = "AVMetadataFormat",
393            feature = "AVTimedMetadataGroup",
394            feature = "block2"
395        ))]
396        /// Loads an array of chapters.
397        ///
398        /// Parameter `locale`: Locale of the metadata items carrying chapter titles to be returned (supports the IETF BCP 47 specification).
399        ///
400        /// Parameter `commonKeys`: Array of common keys of AVMetadataItem to be included; if no common keys are required, send an empty list.
401        /// AVMetadataCommonKeyArtwork is the only supported key for now.
402        ///
403        /// Parameter `completionHandler`: A block that is invoked when loading is complete, vending the array of timed metadata groups or an error.
404        ///
405        /// This method vends an array of AVTimedMetadataGroup objects. Each object in the array always contains an AVMetadataItem representing the chapter title; the timeRange property of the AVTimedMetadataGroup object is equal to the time range of the chapter title item.
406        ///
407        /// An AVMetadataItem with the specified common key will be added to an existing AVTimedMetadataGroup object if the time range (timestamp and duration) of the metadata item and the metadata group overlaps. The locale of items not carrying chapter titles need not match the specified locale parameter.
408        ///
409        /// Further filtering of the metadata items in AVTimedMetadataGroups according to language can be accomplished using +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:]; filtering of the metadata items according to locale can be accomplished using +[AVMetadataItem metadataItemsFromArray:withLocale:].
410        #[unsafe(method(loadChapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:completionHandler:))]
411        #[unsafe(method_family = none)]
412        pub unsafe fn loadChapterMetadataGroupsWithTitleLocale_containingItemsWithCommonKeys_completionHandler(
413            &self,
414            locale: &NSLocale,
415            common_keys: &NSArray<AVMetadataKey>,
416            completion_handler: &block2::Block<
417                dyn Fn(*mut NSArray<AVTimedMetadataGroup>, *mut NSError),
418            >,
419        );
420
421        #[cfg(feature = "AVTimedMetadataGroup")]
422        /// Tests, in order of preference, for a match between language identifiers in the specified array of preferred languages and the available chapter locales, and returns the array of chapters corresponding to the first match that's found.
423        ///
424        /// Parameter `preferredLanguages`: An array of language identifiers in order of preference, each of which is an IETF BCP 47 (RFC 4646) language identifier. Use +[NSLocale preferredLanguages] to obtain the user's list of preferred languages.
425        ///
426        /// Returns: An NSArray of AVTimedMetadataGroup.
427        ///
428        /// Safe to call without blocking when the AVAsset key availableChapterLocales has status AVKeyValueStatusLoaded.
429        ///
430        /// Returns an array of AVTimedMetadataGroup objects. Each object in the array always contains an AVMetadataItem representing the chapter title; the timeRange property of the AVTimedMetadataGroup object is equal to the time range of the chapter title item.
431        ///
432        /// All of the available chapter metadata is included in the metadata groups, including items with the common key AVMetadataCommonKeyArtwork, if such items are present. Items not carrying chapter titles will be added to an existing AVTimedMetadataGroup object if the time range (timestamp and duration) of the metadata item and that of the metadata group overlaps. The locale of such items need not match the locale of the chapter titles.
433        ///
434        /// Further filtering of the metadata items in AVTimedMetadataGroups according to language can be accomplished using +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:]; filtering of the metadata items according to locale can be accomplished using +[AVMetadataItem metadataItemsFromArray:withLocale:].
435        /// .
436        #[deprecated = "Use loadChapterMetadataGroupsBestMatchingPreferredLanguages:completionHandler: instead"]
437        #[unsafe(method(chapterMetadataGroupsBestMatchingPreferredLanguages:))]
438        #[unsafe(method_family = none)]
439        pub unsafe fn chapterMetadataGroupsBestMatchingPreferredLanguages(
440            &self,
441            preferred_languages: &NSArray<NSString>,
442        ) -> Retained<NSArray<AVTimedMetadataGroup>>;
443
444        #[cfg(all(feature = "AVTimedMetadataGroup", feature = "block2"))]
445        /// Tests, in order of preference, for a match between language identifiers in the specified array of preferred languages and the available chapter locales, and loads the array of chapters corresponding to the first match that's found.
446        ///
447        /// Parameter `preferredLanguages`: An array of language identifiers in order of preference, each of which is an IETF BCP 47 (RFC 4646) language identifier. Use +[NSLocale preferredLanguages] to obtain the user's list of preferred languages.
448        ///
449        /// Parameter `completionHandler`: A block that is invoked when loading is complete, vending the array of timed metadata groups or an error.
450        ///
451        /// Returns an array of AVTimedMetadataGroup objects. Each object in the array always contains an AVMetadataItem representing the chapter title; the timeRange property of the AVTimedMetadataGroup object is equal to the time range of the chapter title item.
452        ///
453        /// All of the available chapter metadata is included in the metadata groups, including items with the common key AVMetadataCommonKeyArtwork, if such items are present. Items not carrying chapter titles will be added to an existing AVTimedMetadataGroup object if the time range (timestamp and duration) of the metadata item and that of the metadata group overlaps. The locale of such items need not match the locale of the chapter titles.
454        ///
455        /// Further filtering of the metadata items in AVTimedMetadataGroups according to language can be accomplished using +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:]; filtering of the metadata items according to locale can be accomplished using +[AVMetadataItem metadataItemsFromArray:withLocale:].
456        #[unsafe(method(loadChapterMetadataGroupsBestMatchingPreferredLanguages:completionHandler:))]
457        #[unsafe(method_family = none)]
458        pub unsafe fn loadChapterMetadataGroupsBestMatchingPreferredLanguages_completionHandler(
459            &self,
460            preferred_languages: &NSArray<NSString>,
461            completion_handler: &block2::Block<
462                dyn Fn(*mut NSArray<AVTimedMetadataGroup>, *mut NSError),
463            >,
464        );
465    );
466}
467
468/// AVAssetMediaSelection.
469impl AVAsset {
470    extern_methods!(
471        #[cfg(feature = "AVMediaFormat")]
472        #[unsafe(method(availableMediaCharacteristicsWithMediaSelectionOptions))]
473        #[unsafe(method_family = none)]
474        pub unsafe fn availableMediaCharacteristicsWithMediaSelectionOptions(
475            &self,
476        ) -> Retained<NSArray<AVMediaCharacteristic>>;
477
478        #[cfg(all(feature = "AVMediaFormat", feature = "AVMediaSelectionGroup"))]
479        /// Provides an instance of AVMediaSelectionGroup that contains one or more options with the specified media characteristic.
480        ///
481        /// Parameter `mediaCharacteristic`: A media characteristic for which you wish to obtain the available media selection options. AVMediaCharacteristicAudible, AVMediaCharacteristicLegible, and AVMediaCharacteristicVisual are currently supported.
482        ///
483        /// Pass AVMediaCharacteristicAudible to obtain the group of available options for audio media in various languages and for various purposes, such as descriptive audio.
484        /// Pass AVMediaCharacteristicLegible to obtain the group of available options for subtitles in various languages and for various purposes.
485        /// Pass AVMediaCharacteristicVisual to obtain the group of available options for video media.
486        ///
487        /// Returns: An instance of AVMediaSelectionGroup. May be nil.
488        ///
489        /// Becomes callable without blocking when the key
490        /// "
491        /// availableMediaCharacteristicsWithMediaSelectionOptions" has been loaded.
492        ///
493        /// If the asset has no AVMediaSelectionGroup containing options with the specified media characteristic, the return value will be nil.
494        ///
495        /// Filtering of the options in the returned AVMediaSelectionGroup according to playability, locale, and additional media characteristics can be accomplished using the category AVMediaSelectionOptionFiltering defined on AVMediaSelectionGroup.
496        #[deprecated = "Use loadMediaSelectionGroupForMediaCharacteristic:completionHandler: instead"]
497        #[unsafe(method(mediaSelectionGroupForMediaCharacteristic:))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn mediaSelectionGroupForMediaCharacteristic(
500            &self,
501            media_characteristic: &AVMediaCharacteristic,
502        ) -> Option<Retained<AVMediaSelectionGroup>>;
503
504        #[cfg(all(
505            feature = "AVMediaFormat",
506            feature = "AVMediaSelectionGroup",
507            feature = "block2"
508        ))]
509        /// Loads an instance of AVMediaSelectionGroup that contains one or more options with the specified media characteristic.
510        ///
511        /// Parameter `mediaCharacteristic`: A media characteristic for which you wish to obtain the available media selection options. AVMediaCharacteristicAudible, AVMediaCharacteristicLegible, and AVMediaCharacteristicVisual are currently supported.
512        ///
513        /// Pass AVMediaCharacteristicAudible to obtain the group of available options for audio media in various languages and for various purposes, such as descriptive audio.
514        /// Pass AVMediaCharacteristicLegible to obtain the group of available options for subtitles in various languages and for various purposes.
515        /// Pass AVMediaCharacteristicVisual to obtain the group of available options for video media.
516        ///
517        /// Parameter `completionHandler`: A block that is invoked when loading is complete, vending an instance of AVMediaSelectionGroup (which may be nil) or an error.
518        ///
519        /// If the asset has no AVMediaSelectionGroup containing options with the specified media characteristic, the return value will be nil.
520        ///
521        /// Filtering of the options in the returned AVMediaSelectionGroup according to playability, locale, and additional media characteristics can be accomplished using the category AVMediaSelectionOptionFiltering defined on AVMediaSelectionGroup.
522        #[unsafe(method(loadMediaSelectionGroupForMediaCharacteristic:completionHandler:))]
523        #[unsafe(method_family = none)]
524        pub unsafe fn loadMediaSelectionGroupForMediaCharacteristic_completionHandler(
525            &self,
526            media_characteristic: &AVMediaCharacteristic,
527            completion_handler: &block2::Block<dyn Fn(*mut AVMediaSelectionGroup, *mut NSError)>,
528        );
529
530        #[cfg(feature = "AVMediaSelection")]
531        /// Provides an instance of AVMediaSelection with default selections for each of the receiver's media selection groups.
532        #[unsafe(method(preferredMediaSelection))]
533        #[unsafe(method_family = none)]
534        pub unsafe fn preferredMediaSelection(&self) -> Retained<AVMediaSelection>;
535
536        #[cfg(feature = "AVMediaSelection")]
537        /// Provides an array of all permutations of AVMediaSelection for this asset.
538        #[unsafe(method(allMediaSelections))]
539        #[unsafe(method_family = none)]
540        pub unsafe fn allMediaSelections(&self) -> Retained<NSArray<AVMediaSelection>>;
541    );
542}
543
544/// AVAssetProtectedContent.
545impl AVAsset {
546    extern_methods!(
547        /// Indicates whether or not the asset has protected content.
548        ///
549        /// Assets containing protected content may not be playable without successful authorization, even if the value of the "playable" property is YES.  See the properties in the AVAssetUsability category for details on how such an asset may be used.  On macOS, clients can use the interfaces in AVPlayerItemProtectedContentAdditions.h to request authorization to play the asset.
550        #[unsafe(method(hasProtectedContent))]
551        #[unsafe(method_family = none)]
552        pub unsafe fn hasProtectedContent(&self) -> bool;
553    );
554}
555
556/// AVAssetFragments.
557impl AVAsset {
558    extern_methods!(
559        /// Indicates whether the asset is capable of being extended by fragments.
560        ///
561        /// For QuickTime movie files and MPEG-4 files, the value of canContainFragments is YES if an 'mvex' box is present in the 'moov' box. For those types, the 'mvex' box signals the possible presence of later 'moof' boxes.
562        #[unsafe(method(canContainFragments))]
563        #[unsafe(method_family = none)]
564        pub unsafe fn canContainFragments(&self) -> bool;
565
566        /// Indicates whether the asset is extended by at least one fragment.
567        ///
568        /// For QuickTime movie files and MPEG-4 files, the value of this property is YES if canContainFragments is YES and at least one 'moof' box is present after the 'moov' box.
569        #[unsafe(method(containsFragments))]
570        #[unsafe(method_family = none)]
571        pub unsafe fn containsFragments(&self) -> bool;
572
573        #[cfg(feature = "objc2-core-media")]
574        /// Indicates the total duration of fragments that either exist now or may be appended in the future in order to extend the duration of the asset.
575        ///
576        /// For QuickTime movie files and MPEG-4 files, the value of this property is obtained from the 'mehd' box of the 'mvex' box, if present. If no total fragment duration hint is available, the value of this property is kCMTimeInvalid.
577        #[unsafe(method(overallDurationHint))]
578        #[unsafe(method_family = none)]
579        pub unsafe fn overallDurationHint(&self) -> CMTime;
580    );
581}
582
583/// AVAssetUsability.
584impl AVAsset {
585    extern_methods!(
586        /// Indicates whether an AVPlayer can play the contents of the asset in a manner that meets user expectations.
587        ///
588        /// A client can attempt playback when playable is NO, this however may lead to a substandard playback experience.
589        #[unsafe(method(isPlayable))]
590        #[unsafe(method_family = none)]
591        pub unsafe fn isPlayable(&self) -> bool;
592
593        #[unsafe(method(isExportable))]
594        #[unsafe(method_family = none)]
595        pub unsafe fn isExportable(&self) -> bool;
596
597        #[unsafe(method(isReadable))]
598        #[unsafe(method_family = none)]
599        pub unsafe fn isReadable(&self) -> bool;
600
601        #[unsafe(method(isComposable))]
602        #[unsafe(method_family = none)]
603        pub unsafe fn isComposable(&self) -> bool;
604
605        #[unsafe(method(isCompatibleWithSavedPhotosAlbum))]
606        #[unsafe(method_family = none)]
607        pub unsafe fn isCompatibleWithSavedPhotosAlbum(&self) -> bool;
608
609        /// Indicates whether the asset is compatible with AirPlay Video.
610        ///
611        /// YES if an AVPlayerItem initialized with the receiver can be played by an external device via AirPlay Video.
612        #[unsafe(method(isCompatibleWithAirPlayVideo))]
613        #[unsafe(method_family = none)]
614        pub unsafe fn isCompatibleWithAirPlayVideo(&self) -> bool;
615    );
616}
617
618extern "C" {
619    /// Indicates whether the asset should be prepared to indicate a precise duration and provide precise random access by time.
620    /// The value for this key is a boolean NSNumber.
621    ///
622    /// If nil is passed as the value of the options parameter to -[AVURLAsset initWithURL:options:], or if a dictionary that lacks a value for the key AVURLAssetPreferPreciseDurationAndTimingKey is passed instead, a default value of NO is assumed. If the asset is intended to be played only, because AVPlayer will support approximate random access by time when full precision isn't available, the default value of NO will suffice.
623    /// Pass YES if longer loading times are acceptable in cases in which precise timing is required. If the asset is intended to be inserted into an AVMutableComposition, precise random access is typically desirable and the value of YES is recommended.
624    /// Note that such precision may require additional parsing of the resource in advance of operations that make use of any portion of it, depending on the specifics of its container format. Many container formats provide sufficient summary information for precise timing and do not require additional parsing to prepare for it; QuickTime movie files and MPEG-4 files are examples of such formats. Other formats do not provide sufficient summary information, and precise random access for them is possible only after a preliminary examination of a file's contents.
625    /// If you pass YES for an asset that you intend to play via an instance of AVPlayerItem and you are prepared for playback to commence before the value of -[AVPlayerItem duration] becomes available, you can omit the key
626    /// "
627    /// duration" from the array of AVAsset keys you pass to -[AVPlayerItem initWithAsset:automaticallyLoadedAssetKeys:] in order to prevent AVPlayerItem from automatically loading the value of duration while the item becomes ready to play.
628    /// If precise duration and timing is not possible for the timed media resource referenced by the asset's URL, AVAsset.providesPreciseDurationAndTiming will be NO even if precise timing is requested via the use of this key.
629    ///
630    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetpreferprecisedurationandtimingkey?language=objc)
631    pub static AVURLAssetPreferPreciseDurationAndTimingKey: &'static NSString;
632}
633
634extern "C" {
635    /// Indicates the MIME type that should be used to identify the format of the media resource.
636    ///
637    /// When a value for this key is provided, only the specified MIME type is considered in determining how to handle or parse the media resource. Any other information that may be available, such as the URL path extension or a server-provided MIME type, is ignored.
638    ///
639    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetoverridemimetypekey?language=objc)
640    pub static AVURLAssetOverrideMIMETypeKey: &'static NSString;
641}
642
643extern "C" {
644    /// Indicates the restrictions used by the asset when resolving references to external media data. The value of this key is an NSNumber wrapping an AVAssetReferenceRestrictions enum value or the logical combination of multiple such values.
645    ///
646    /// Some assets can contain references to media data stored outside the asset's container file, for example in another file. This key can be used to specify a policy to use when these references are encountered. If an asset contains one or more references of a type that is forbidden by the reference restrictions, loading of asset properties will fail. In addition, such an asset cannot be used with other AVFoundation modules, such as AVPlayerItem or AVAssetExportSession.
647    ///
648    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetreferencerestrictionskey?language=objc)
649    pub static AVURLAssetReferenceRestrictionsKey: &'static NSString;
650}
651
652extern "C" {
653    /// HTTP cookies that the AVURLAsset may send with HTTP requests
654    /// Standard cross-site policy still applies: cookies will only be sent to domains to which they apply.
655    ///
656    /// By default, an AVURLAsset will only have access to cookies in the client's default cookie storage
657    /// that apply to the AVURLAsset's URL.  You can supplement the cookies available to the asset
658    /// via use of this initialization option
659    ///
660    /// HTTP cookies do not apply to non-HTTP(S) URLS.
661    /// In HLS, many HTTP requests (e.g., media, crypt key, variant index) might be issued to different paths or hosts.
662    /// In both of these cases, HTTP requests will be missing any cookies that do not apply to the AVURLAsset's URL.
663    /// This init option allows the AVURLAsset to use additional HTTP cookies for those HTTP(S) requests.
664    ///
665    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassethttpcookieskey?language=objc)
666    pub static AVURLAssetHTTPCookiesKey: &'static NSString;
667}
668
669extern "C" {
670    /// Indicates whether network requests on behalf of this asset are allowed to use the cellular interface.
671    ///
672    /// Default is YES.
673    ///
674    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetallowscellularaccesskey?language=objc)
675    pub static AVURLAssetAllowsCellularAccessKey: &'static NSString;
676}
677
678extern "C" {
679    /// Indicates whether network requests on behalf of this asset are allowed to use the expensive interface (e.g. cellular, tethered, constrained).
680    ///
681    /// Default is YES.
682    ///
683    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetallowsexpensivenetworkaccesskey?language=objc)
684    pub static AVURLAssetAllowsExpensiveNetworkAccessKey: &'static NSString;
685}
686
687extern "C" {
688    /// Indicates whether network requests on behalf of this asset are allowed to use the constrained interface (e.g. interfaces marked as being in data saver mode).
689    ///
690    /// Default is YES.
691    ///
692    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetallowsconstrainednetworkaccesskey?language=objc)
693    pub static AVURLAssetAllowsConstrainedNetworkAccessKey: &'static NSString;
694}
695
696extern "C" {
697    /// Indicates whether alias data references in the asset should be parsed and resolved.
698    ///
699    /// Default is NO. Although the majority of QuickTime movie files contain all of the media data they require, some contain references to media stored in other files. While AVFoundation and CoreMedia typically employ a URL reference for this purpose, older implementations such as QuickTime 7 have commonly employed a Macintosh alias instead, as documented in the QuickTime File Format specification. If your application must work with legacy QuickTime movie files containing alias-based references to media data stored in other files, the use of this AVURLAsset initialization option is appropriate.
700    ///
701    /// If you provide a value for AVURLAssetReferenceRestrictionsKey, restrictions will be observed for resolved alias references just as they are for URL references.
702    ///
703    /// For more details about alias resolution, consult documentation of the bookmark-related interfaces of NSURL.
704    ///
705    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetshouldsupportaliasdatareferenceskey?language=objc)
706    pub static AVURLAssetShouldSupportAliasDataReferencesKey: &'static NSString;
707}
708
709extern "C" {
710    /// Specifies the attribution of the URLs requested by this asset.
711    ///
712    /// Value is an NSNumber whose value is an NSURLRequestAttribution (see NSURLRequest.h).
713    /// Default value is NSURLRequestAttributionDeveloper.
714    /// All NSURLRequests issed on behalf of this AVURLAsset will be attributed with this value and follow the App Privacy Policy accordingly.
715    ///
716    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlasseturlrequestattributionkey?language=objc)
717    pub static AVURLAssetURLRequestAttributionKey: &'static NSString;
718}
719
720extern "C" {
721    /// Specifies the value of the User-Agent header to add to HTTP requests made by this asset.
722    ///
723    /// Value is an NSString
724    /// Default value is the systems's default User-Agent.
725    ///
726    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassethttpuseragentkey?language=objc)
727    pub static AVURLAssetHTTPUserAgentKey: &'static NSString;
728}
729
730extern "C" {
731    /// Specifies a UUID to append as the value of the query parameter "_HLS_primary_id" to selected HTTP requests issued on behalf of the asset. Supported for HLS assets only.
732    ///
733    /// Value is an NSUUID. Its UUID string value will be used as the query parameter.
734    /// If you create AVURLAssets for the templateItems of AVPlayerInterstitialEvents and you want the instances of AVURLAsset that you create to be used during interstitial playback rather than equivalent AVURLAssets with the same URL, you must provide a value for this key that's equal to the httpSessionIdentifier of the primary AVPlayerItem's asset. See AVPlayerInterstitialEventController.h. This is especially useful if you require the use of a custom AVAssetResourceLoader delegate for interstitial assets.
735    ///
736    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlassetprimarysessionidentifierkey?language=objc)
737    pub static AVURLAssetPrimarySessionIdentifierKey: &'static NSString;
738}
739
740extern_class!(
741    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avurlasset?language=objc)
742    #[unsafe(super(AVAsset, NSObject))]
743    #[derive(Debug, PartialEq, Eq, Hash)]
744    pub struct AVURLAsset;
745);
746
747unsafe impl Send for AVURLAsset {}
748
749unsafe impl Sync for AVURLAsset {}
750
751#[cfg(feature = "AVAsynchronousKeyValueLoading")]
752unsafe impl AVAsynchronousKeyValueLoading for AVURLAsset {}
753
754unsafe impl NSCopying for AVURLAsset {}
755
756unsafe impl CopyingHelper for AVURLAsset {
757    type Result = Self;
758}
759
760unsafe impl NSObjectProtocol for AVURLAsset {}
761
762impl AVURLAsset {
763    extern_methods!(
764        #[unsafe(method(init))]
765        #[unsafe(method_family = init)]
766        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
767
768        #[unsafe(method(new))]
769        #[unsafe(method_family = new)]
770        pub unsafe fn new() -> Retained<Self>;
771
772        #[cfg(feature = "AVMediaFormat")]
773        /// Provides the file types the AVURLAsset class understands.
774        ///
775        /// Returns: An NSArray of UTIs identifying the file types the AVURLAsset class understands.
776        #[unsafe(method(audiovisualTypes))]
777        #[unsafe(method_family = none)]
778        pub unsafe fn audiovisualTypes() -> Retained<NSArray<AVFileType>>;
779
780        /// Provides the MIME types the AVURLAsset class understands.
781        ///
782        /// Returns: An NSArray of NSStrings containing MIME types the AVURLAsset class understands.
783        #[unsafe(method(audiovisualMIMETypes))]
784        #[unsafe(method_family = none)]
785        pub unsafe fn audiovisualMIMETypes() -> Retained<NSArray<NSString>>;
786
787        /// Returns YES if asset is playable with the codec(s) and container type specified in extendedMIMEType. Returns NO otherwise.
788        ///
789        /// Parameter `extendedMIMEType`:
790        /// Returns: YES or NO.
791        ///
792        /// On releases prior to macOS 14, iOS 17, tvOS 17, and watchOS 10, regardless of the specified MIME type this method interprets all codecs parameters according to the ISO family syntax defined by RFC 6381 and evaluates playability according to whether the indicated codecs are supported when carried in container formats that conform to the ISO BMFF specification, such as the MPEG-4 file format.
793        /// On releases starting with macOS 14, iOS 17, tvOS 17, and watchOS 10, this method interprets codecs parameters according to the syntax and namespace determined by the specified MIME type and evaluates playability according to whether the indicated codecs are supported when carried in the container format indicated by that MIME type. Codecs parameters for each of the following MIME types are supported: video/mp4 (per RFC 6381, ISO/IEC 14496-15 Annex E, et al), video/quicktime (RFC 6381 et al), video/mp2t (ISO/IEC 13818-1), audio/vnd.wave (RFC 2361), audio/aiff (using the CoreAudio AudioFormatID namespace), audio/x-caf (also using the CoreAudio AudioFormatID namespace), and audio/mpeg (e.g. codecs="mp3"). MIME types supported as alternatives for the same container formats, e.g audio/mp4, are equivalently treated. If the indicated MIME type defines no supported syntax and namespace for codecs parameters, when any codecs parameter is present this method returns NO.
794        #[unsafe(method(isPlayableExtendedMIMEType:))]
795        #[unsafe(method_family = none)]
796        pub unsafe fn isPlayableExtendedMIMEType(extended_mime_type: &NSString) -> bool;
797
798        /// Returns an instance of AVURLAsset for inspection of a media resource.
799        ///
800        /// Parameter `URL`: An instance of NSURL that references a media resource.
801        ///
802        /// Parameter `options`: An instance of NSDictionary that contains keys for specifying options for the initialization of the AVURLAsset. See AVURLAssetPreferPreciseDurationAndTimingKey and AVURLAssetReferenceRestrictionsKey above.
803        ///
804        /// Returns: An instance of AVURLAsset.
805        #[unsafe(method(URLAssetWithURL:options:))]
806        #[unsafe(method_family = none)]
807        pub unsafe fn URLAssetWithURL_options(
808            url: &NSURL,
809            options: Option<&NSDictionary<NSString, AnyObject>>,
810        ) -> Retained<Self>;
811
812        /// Initializes an instance of AVURLAsset for inspection of a media resource.
813        ///
814        /// Parameter `URL`: An instance of NSURL that references a media resource.
815        ///
816        /// Parameter `options`: An instance of NSDictionary that contains keys for specifying options for the initialization of the AVURLAsset. See AVURLAssetPreferPreciseDurationAndTimingKey and AVURLAssetReferenceRestrictionsKey above.
817        ///
818        /// Returns: An instance of AVURLAsset.
819        #[unsafe(method(initWithURL:options:))]
820        #[unsafe(method_family = init)]
821        pub unsafe fn initWithURL_options(
822            this: Allocated<Self>,
823            url: &NSURL,
824            options: Option<&NSDictionary<NSString, AnyObject>>,
825        ) -> Retained<Self>;
826
827        /// Indicates the URL with which the instance of AVURLAsset was initialized.
828        #[unsafe(method(URL))]
829        #[unsafe(method_family = none)]
830        pub unsafe fn URL(&self) -> Retained<NSURL>;
831
832        /// Provides the identifier that's automatically included in any HTTP request issued on behalf of this asset in the HTTP header field "X-Playback-Session-Id".
833        ///
834        /// The value is an NSUUID from which the UUID string can be obtained.
835        /// Note that copies of an AVURLAsset vend an equivalent httpSessionIdentifier.
836        #[unsafe(method(httpSessionIdentifier))]
837        #[unsafe(method_family = none)]
838        pub unsafe fn httpSessionIdentifier(&self) -> Retained<NSUUID>;
839    );
840}
841
842/// Methods declared on superclass `AVAsset`.
843impl AVURLAsset {
844    extern_methods!(
845        /// Returns an instance of AVAsset for inspection of a media resource.
846        ///
847        /// Parameter `URL`: An instance of NSURL that references a media resource.
848        ///
849        /// Returns: An instance of AVAsset.
850        ///
851        /// Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.
852        #[unsafe(method(assetWithURL:))]
853        #[unsafe(method_family = none)]
854        pub unsafe fn assetWithURL(url: &NSURL) -> Retained<Self>;
855    );
856}
857
858/// AVURLAssetURLHandling.
859impl AVURLAsset {
860    extern_methods!(
861        #[cfg(feature = "AVAssetResourceLoader")]
862        /// Provides access to an instance of AVAssetResourceLoader, which offers limited control over the handling of URLs that may be loaded in the course of performing operations on the asset, such as playback.
863        /// The loading of file URLs cannot be mediated via use of AVAssetResourceLoader.
864        /// Note that copies of an AVAsset will vend the same instance of AVAssetResourceLoader.
865        #[unsafe(method(resourceLoader))]
866        #[unsafe(method_family = none)]
867        pub unsafe fn resourceLoader(&self) -> Retained<AVAssetResourceLoader>;
868    );
869}
870
871/// AVURLAssetCache.
872impl AVURLAsset {
873    extern_methods!(
874        #[cfg(feature = "AVAssetCache")]
875        /// Provides access to an instance of AVAssetCache to use for inspection of locally cached media data. Will be nil if an asset has not been configured to store or access media data from disk.
876        #[unsafe(method(assetCache))]
877        #[unsafe(method_family = none)]
878        pub unsafe fn assetCache(&self) -> Option<Retained<AVAssetCache>>;
879    );
880}
881
882/// AVAssetCompositionUtility.
883impl AVURLAsset {
884    extern_methods!(
885        #[cfg(all(feature = "AVAssetTrack", feature = "AVCompositionTrack"))]
886        /// Provides a reference to an AVAssetTrack of the target from which any timeRange
887        /// can be inserted into a mutable composition track (via -[AVMutableCompositionTrack insertTimeRange:ofTrack:atTime:error:]).
888        ///
889        /// Parameter `compositionTrack`: The composition track for which a compatible AVAssetTrack is requested.
890        ///
891        /// Returns: an instance of AVAssetTrack
892        ///
893        /// Finds a track of the target with content that can be accommodated by the specified composition track.
894        /// The logical complement of -[AVMutableComposition mutableTrackCompatibleWithTrack:].
895        #[deprecated = "Use findCompatibleTrackForCompositionTrack:completionHandler: instead"]
896        #[unsafe(method(compatibleTrackForCompositionTrack:))]
897        #[unsafe(method_family = none)]
898        pub unsafe fn compatibleTrackForCompositionTrack(
899            &self,
900            composition_track: &AVCompositionTrack,
901        ) -> Option<Retained<AVAssetTrack>>;
902
903        #[cfg(all(
904            feature = "AVAssetTrack",
905            feature = "AVCompositionTrack",
906            feature = "block2"
907        ))]
908        /// Loads a reference to an AVAssetTrack of the target from which any timeRange
909        /// can be inserted into a mutable composition track (via -[AVMutableCompositionTrack insertTimeRange:ofTrack:atTime:error:]).
910        ///
911        /// Parameter `compositionTrack`: The composition track for which a compatible AVAssetTrack is requested.
912        ///
913        /// Parameter `completionHandler`: A block that is invoked when loading is complete, vending an instance of AVAssetTrack or an error.
914        ///
915        /// Finds a track of the target with content that can be accommodated by the specified composition track.
916        /// The logical complement of -[AVMutableComposition mutableTrackCompatibleWithTrack:].
917        #[unsafe(method(findCompatibleTrackForCompositionTrack:completionHandler:))]
918        #[unsafe(method_family = none)]
919        pub unsafe fn findCompatibleTrackForCompositionTrack_completionHandler(
920            &self,
921            composition_track: &AVCompositionTrack,
922            completion_handler: &block2::Block<dyn Fn(*mut AVAssetTrack, *mut NSError)>,
923        );
924    );
925}
926
927/// AVAssetVariantInspection.
928impl AVURLAsset {
929    extern_methods!(
930        #[cfg(feature = "AVAssetVariant")]
931        /// Provides an array of AVAssetVariants contained in the asset
932        ///
933        /// Some variants may not be playable according to the current device configuration.
934        #[unsafe(method(variants))]
935        #[unsafe(method_family = none)]
936        pub unsafe fn variants(&self) -> Retained<NSArray<AVAssetVariant>>;
937    );
938}
939
940/// AVURLAssetNSItemProvider.
941/// AVURLAssets can be shared through any interface that supports passing NSItemProviders. Note that only AVURLAssets with file URLs can be added to NSItemProviders. Attempting to share assets with non file URLs will result in an error.
942///
943/// AVURLAssets can be retrieved from NSItemProviders by directly requesting an AVURLAsset through -[NSItemProvider loadObjectOfClass:completionHandler:]. Requesting data representations of AVURLAssets is not supported. File representations of AVURLAssets will be sent without copying the underlying media and the receiver will be extended readonly sandbox access to the sender's original URL until the AVURLAsset is deallocated. Use of NSFileCoordinator and NSFilePresenter is recommended for both the sender and receive to coordinate possible changes in the file's state once sharing has been completed.
944impl AVURLAsset {
945    extern_methods!();
946}
947
948unsafe impl NSItemProviderReading for AVURLAsset {}
949
950unsafe impl NSItemProviderWriting for AVURLAsset {}
951
952extern_class!(
953    /// A class incorporating properties for a MediaExtension
954    ///
955    /// AVMediaExtensionProperties objects are returned from property queries on AVAsset, AVPlayerItemTrack, AVSampleBufferDisplayLayer, or AVSampleBufferVideoRenderer.
956    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
957    ///
958    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmediaextensionproperties?language=objc)
959    #[unsafe(super(NSObject))]
960    #[derive(Debug, PartialEq, Eq, Hash)]
961    pub struct AVMediaExtensionProperties;
962);
963
964unsafe impl Send for AVMediaExtensionProperties {}
965
966unsafe impl Sync for AVMediaExtensionProperties {}
967
968unsafe impl NSCopying for AVMediaExtensionProperties {}
969
970unsafe impl CopyingHelper for AVMediaExtensionProperties {
971    type Result = Self;
972}
973
974unsafe impl NSObjectProtocol for AVMediaExtensionProperties {}
975
976impl AVMediaExtensionProperties {
977    extern_methods!(
978        #[unsafe(method(init))]
979        #[unsafe(method_family = init)]
980        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
981
982        #[unsafe(method(new))]
983        #[unsafe(method_family = new)]
984        pub unsafe fn new() -> Retained<Self>;
985
986        /// The identifier of the Media Extension.
987        ///
988        /// The extension identifier string, corresponding to the ClassImplementationID value from the EXAppExtensionAttributes dictionary in the Info.plist file.
989        #[unsafe(method(extensionIdentifier))]
990        #[unsafe(method_family = none)]
991        pub unsafe fn extensionIdentifier(&self) -> Retained<NSString>;
992
993        /// The name of the MediaExtension.
994        ///
995        /// The localized name of the MediaExtension format reader or video decoder, corresponding to the CFBundleDisplayName.
996        #[unsafe(method(extensionName))]
997        #[unsafe(method_family = none)]
998        pub unsafe fn extensionName(&self) -> Retained<NSString>;
999
1000        /// The name of the containing application bundle.
1001        ///
1002        /// The localized name of the application that hosts the MediaExtension.
1003        #[unsafe(method(containingBundleName))]
1004        #[unsafe(method_family = none)]
1005        pub unsafe fn containingBundleName(&self) -> Retained<NSString>;
1006
1007        /// The file URL of the MediaExtension bundle.
1008        #[unsafe(method(extensionURL))]
1009        #[unsafe(method_family = none)]
1010        pub unsafe fn extensionURL(&self) -> Retained<NSURL>;
1011
1012        /// The file URL of the host application for the MediaExtension.
1013        #[unsafe(method(containingBundleURL))]
1014        #[unsafe(method_family = none)]
1015        pub unsafe fn containingBundleURL(&self) -> Retained<NSURL>;
1016    );
1017}
1018
1019/// AVMediaExtension.
1020impl AVURLAsset {
1021    extern_methods!(
1022        /// The properties of the MediaExtension format reader for the asset.
1023        ///
1024        /// If the asset is being decoded using a MediaExtension format reader, this property will return a AVMediaExtensionProperties object describing the extension. If the asset is not being decoded with a MediaExtension format reader, this property will return nil.
1025        #[unsafe(method(mediaExtensionProperties))]
1026        #[unsafe(method_family = none)]
1027        pub unsafe fn mediaExtensionProperties(
1028            &self,
1029        ) -> Option<Retained<AVMediaExtensionProperties>>;
1030    );
1031}
1032
1033extern "C" {
1034    /// Posted when the duration of an AVFragmentedAsset changes while it's being minded by an AVFragmentedAssetMinder, but only for changes that occur after the status of the value of
1035    /// "
1036    /// duration" has reached AVKeyValueStatusLoaded.
1037    ///
1038    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetdurationdidchangenotification?language=objc)
1039    pub static AVAssetDurationDidChangeNotification: &'static NSString;
1040}
1041
1042extern "C" {
1043    /// Posted after the value of
1044    /// "
1045    /// containsFragments" has already been loaded and the AVFragmentedAsset is added to an AVFragmentedAssetMinder, either when 1) fragments are detected in the asset on disk after it had previously contained none or when 2) no fragments are detected in the asset on disk after it had previously contained one or more.
1046    ///
1047    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetcontainsfragmentsdidchangenotification?language=objc)
1048    pub static AVAssetContainsFragmentsDidChangeNotification: &'static NSString;
1049}
1050
1051extern "C" {
1052    /// Posted when the asset on disk is defragmented while an AVFragmentedAsset is being minded by an AVFragmentedAssetMinder, but only if the defragmentation occurs after the status of the value of
1053    /// "
1054    /// canContainFragments" has reached AVKeyValueStatusLoaded.
1055    ///
1056    /// After this notification is posted, the value of the asset properties canContainFragments and containsFragments will both be NO.
1057    ///
1058    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetwasdefragmentednotification?language=objc)
1059    pub static AVAssetWasDefragmentedNotification: &'static NSString;
1060}
1061
1062extern "C" {
1063    /// Posted when the collection of arrays of timed metadata groups representing chapters of an AVAsset change and when any of the contents of the timed metadata groups change, but only for changes that occur after the status of the value of
1064    /// "
1065    /// availableChapterLocales" has reached AVKeyValueStatusLoaded.
1066    ///
1067    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetchaptermetadatagroupsdidchangenotification?language=objc)
1068    pub static AVAssetChapterMetadataGroupsDidChangeNotification: &'static NSString;
1069}
1070
1071extern "C" {
1072    /// Posted when the collection of media selection groups provided by an AVAsset changes and when any of the contents of its media selection groups change, but only for changes that occur after the status of the value of
1073    /// "
1074    /// availableMediaCharacteristicsWithMediaSelectionOptions" has reached AVKeyValueStatusLoaded.
1075    ///
1076    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetmediaselectiongroupsdidchangenotification?language=objc)
1077    pub static AVAssetMediaSelectionGroupsDidChangeNotification: &'static NSString;
1078}
1079
1080extern_protocol!(
1081    /// A subclass of AVURLAsset that represents media resources that can be extended in total duration without modifying previously existing data structures.
1082    /// Such media resources include QuickTime movie files and MPEG-4 files that indicate, via an 'mvex' box in their 'moov' box, that they accommodate additional fragments. Media resources of other types may also be supported. To check whether a given instance of AVFragmentedAsset can be used to monitor the addition of fragments, check the value of the AVURLAsset property canContainFragments.
1083    /// An AVFragmentedAsset is capable of changing the values of certain of its properties and those of its tracks, while an operation that appends fragments to the underlying media resource in in progress, if the AVFragmentedAsset is associated with an instance of AVFragmentedAssetMinder.
1084    ///
1085    /// While associated with an AVFragmentedAssetMinder, AVFragmentedAsset posts AVAssetDurationDidChangeNotification whenever new fragments are detected, as appropriate. It may also post AVAssetContainsFragmentsDidChangeNotification and AVAssetWasDefragmentedNotification, as discussed in documentation of those notifications.
1086    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
1087    ///
1088    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentminding?language=objc)
1089    pub unsafe trait AVFragmentMinding {
1090        /// Indicates whether an AVAsset that supports fragment minding is currently associated with a fragment minder, e.g. an instance of AVFragmentedAssetMinder.
1091        ///
1092        /// AVAssets that support fragment minding post change notifications only while associated with a fragment minder.
1093        #[unsafe(method(isAssociatedWithFragmentMinder))]
1094        #[unsafe(method_family = none)]
1095        unsafe fn isAssociatedWithFragmentMinder(&self) -> bool;
1096    }
1097);
1098
1099extern_class!(
1100    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedasset?language=objc)
1101    #[unsafe(super(AVURLAsset, AVAsset, NSObject))]
1102    #[derive(Debug, PartialEq, Eq, Hash)]
1103    pub struct AVFragmentedAsset;
1104);
1105
1106unsafe impl Send for AVFragmentedAsset {}
1107
1108unsafe impl Sync for AVFragmentedAsset {}
1109
1110#[cfg(feature = "AVAsynchronousKeyValueLoading")]
1111unsafe impl AVAsynchronousKeyValueLoading for AVFragmentedAsset {}
1112
1113unsafe impl AVFragmentMinding for AVFragmentedAsset {}
1114
1115unsafe impl NSCopying for AVFragmentedAsset {}
1116
1117unsafe impl CopyingHelper for AVFragmentedAsset {
1118    type Result = Self;
1119}
1120
1121unsafe impl NSObjectProtocol for AVFragmentedAsset {}
1122
1123impl AVFragmentedAsset {
1124    extern_methods!(
1125        /// Returns an instance of AVFragmentedAsset for inspection of a fragmented media resource.
1126        ///
1127        /// Parameter `URL`: An instance of NSURL that references a media resource.
1128        ///
1129        /// Parameter `options`: An instance of NSDictionary that contains keys for specifying options for the initialization of the AVFragmentedAsset. See AVURLAssetPreferPreciseDurationAndTimingKey and AVURLAssetReferenceRestrictionsKey above.
1130        ///
1131        /// Returns: An instance of AVFragmentedAsset.
1132        #[unsafe(method(fragmentedAssetWithURL:options:))]
1133        #[unsafe(method_family = none)]
1134        pub unsafe fn fragmentedAssetWithURL_options(
1135            url: &NSURL,
1136            options: Option<&NSDictionary<NSString, AnyObject>>,
1137        ) -> Retained<Self>;
1138
1139        #[cfg(feature = "AVAssetTrack")]
1140        /// The tracks in an asset.
1141        ///
1142        /// The value of this property is an array of tracks the asset contains; the tracks are of type AVFragmentedAssetTrack.
1143        #[unsafe(method(tracks))]
1144        #[unsafe(method_family = none)]
1145        pub unsafe fn tracks(&self) -> Retained<NSArray<AVFragmentedAssetTrack>>;
1146    );
1147}
1148
1149/// Methods declared on superclass `AVURLAsset`.
1150impl AVFragmentedAsset {
1151    extern_methods!(
1152        #[unsafe(method(init))]
1153        #[unsafe(method_family = init)]
1154        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1155
1156        #[unsafe(method(new))]
1157        #[unsafe(method_family = new)]
1158        pub unsafe fn new() -> Retained<Self>;
1159
1160        /// Returns an instance of AVURLAsset for inspection of a media resource.
1161        ///
1162        /// Parameter `URL`: An instance of NSURL that references a media resource.
1163        ///
1164        /// Parameter `options`: An instance of NSDictionary that contains keys for specifying options for the initialization of the AVURLAsset. See AVURLAssetPreferPreciseDurationAndTimingKey and AVURLAssetReferenceRestrictionsKey above.
1165        ///
1166        /// Returns: An instance of AVURLAsset.
1167        #[unsafe(method(URLAssetWithURL:options:))]
1168        #[unsafe(method_family = none)]
1169        pub unsafe fn URLAssetWithURL_options(
1170            url: &NSURL,
1171            options: Option<&NSDictionary<NSString, AnyObject>>,
1172        ) -> Retained<Self>;
1173
1174        /// Initializes an instance of AVURLAsset for inspection of a media resource.
1175        ///
1176        /// Parameter `URL`: An instance of NSURL that references a media resource.
1177        ///
1178        /// Parameter `options`: An instance of NSDictionary that contains keys for specifying options for the initialization of the AVURLAsset. See AVURLAssetPreferPreciseDurationAndTimingKey and AVURLAssetReferenceRestrictionsKey above.
1179        ///
1180        /// Returns: An instance of AVURLAsset.
1181        #[unsafe(method(initWithURL:options:))]
1182        #[unsafe(method_family = init)]
1183        pub unsafe fn initWithURL_options(
1184            this: Allocated<Self>,
1185            url: &NSURL,
1186            options: Option<&NSDictionary<NSString, AnyObject>>,
1187        ) -> Retained<Self>;
1188    );
1189}
1190
1191/// Methods declared on superclass `AVAsset`.
1192impl AVFragmentedAsset {
1193    extern_methods!(
1194        /// Returns an instance of AVAsset for inspection of a media resource.
1195        ///
1196        /// Parameter `URL`: An instance of NSURL that references a media resource.
1197        ///
1198        /// Returns: An instance of AVAsset.
1199        ///
1200        /// Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.
1201        #[unsafe(method(assetWithURL:))]
1202        #[unsafe(method_family = none)]
1203        pub unsafe fn assetWithURL(url: &NSURL) -> Retained<Self>;
1204    );
1205}
1206
1207/// AVFragmentedAssetTrackInspection.
1208impl AVFragmentedAsset {
1209    extern_methods!(
1210        #[cfg(all(feature = "AVAssetTrack", feature = "objc2-core-media"))]
1211        /// Provides an instance of AVFragmentedAssetTrack that represents the track of the specified trackID.
1212        ///
1213        /// Parameter `trackID`: The trackID of the requested AVFragmentedAssetTrack.
1214        ///
1215        /// Returns: An instance of AVFragmentedAssetTrack; may be nil if no track of the specified trackID is available.
1216        ///
1217        /// Becomes callable without blocking when the key
1218        /// "
1219        /// tracks" has been loaded
1220        #[deprecated = "Use loadTrackWithTrackID:completionHandler: instead"]
1221        #[unsafe(method(trackWithTrackID:))]
1222        #[unsafe(method_family = none)]
1223        pub unsafe fn trackWithTrackID(
1224            &self,
1225            track_id: CMPersistentTrackID,
1226        ) -> Option<Retained<AVFragmentedAssetTrack>>;
1227
1228        #[cfg(all(
1229            feature = "AVAssetTrack",
1230            feature = "block2",
1231            feature = "objc2-core-media"
1232        ))]
1233        /// Loads an instance of AVFragmentedAssetTrack that represents the track of the specified trackID.
1234        ///
1235        /// Parameter `trackID`: The trackID of the requested AVFragmentedAssetTrack.
1236        ///
1237        /// Parameter `completionHandler`: A block that is called when the loading is finished, with either the loaded track (which may be nil if no track of the specified trackID is available) or an error.
1238        #[unsafe(method(loadTrackWithTrackID:completionHandler:))]
1239        #[unsafe(method_family = none)]
1240        pub unsafe fn loadTrackWithTrackID_completionHandler(
1241            &self,
1242            track_id: CMPersistentTrackID,
1243            completion_handler: &block2::Block<dyn Fn(*mut AVFragmentedAssetTrack, *mut NSError)>,
1244        );
1245
1246        #[cfg(all(feature = "AVAssetTrack", feature = "AVMediaFormat"))]
1247        /// Provides an array of AVFragmentedAssetTracks of the asset that present media of the specified media type.
1248        ///
1249        /// Parameter `mediaType`: The media type according to which the receiver filters its AVFragmentedAssetTracks. (Media types are defined in AVMediaFormat.h)
1250        ///
1251        /// Returns: An NSArray of AVFragmentedAssetTracks; may be empty if no tracks of the specified media type are available.
1252        ///
1253        /// Becomes callable without blocking when the key
1254        /// "
1255        /// tracks" has been loaded
1256        #[deprecated = "Use loadTracksWithMediaType:completionHandler: instead"]
1257        #[unsafe(method(tracksWithMediaType:))]
1258        #[unsafe(method_family = none)]
1259        pub unsafe fn tracksWithMediaType(
1260            &self,
1261            media_type: &AVMediaType,
1262        ) -> Retained<NSArray<AVFragmentedAssetTrack>>;
1263
1264        #[cfg(all(
1265            feature = "AVAssetTrack",
1266            feature = "AVMediaFormat",
1267            feature = "block2"
1268        ))]
1269        /// Loads an array of AVFragmentedAssetTracks of the asset that present media of the specified media type.
1270        ///
1271        /// Parameter `mediaType`: The media type according to which AVAsset filters its AVFragmentedAssetTracks. (Media types are defined in AVMediaFormat.h.)
1272        ///
1273        /// Parameter `completionHandler`: A block that is called when the loading is finished, with either the loaded tracks (which may be empty if no tracks of the specified media type are available) or an error.
1274        #[unsafe(method(loadTracksWithMediaType:completionHandler:))]
1275        #[unsafe(method_family = none)]
1276        pub unsafe fn loadTracksWithMediaType_completionHandler(
1277            &self,
1278            media_type: &AVMediaType,
1279            completion_handler: &block2::Block<
1280                dyn Fn(*mut NSArray<AVFragmentedAssetTrack>, *mut NSError),
1281            >,
1282        );
1283
1284        #[cfg(all(feature = "AVAssetTrack", feature = "AVMediaFormat"))]
1285        /// Provides an array of AVFragmentedAssetTracks of the asset that present media with the specified characteristic.
1286        ///
1287        /// Parameter `mediaCharacteristic`: The media characteristic according to which the receiver filters its AVFragmentedAssetTracks. (Media characteristics are defined in AVMediaFormat.h)
1288        ///
1289        /// Returns: An NSArray of AVFragmentedAssetTracks; may be empty if no tracks with the specified characteristic are available.
1290        ///
1291        /// Becomes callable without blocking when the key
1292        /// "
1293        /// tracks" has been loaded
1294        #[deprecated = "Use loadTracksWithMediaCharacteristic:completionHandler: instead"]
1295        #[unsafe(method(tracksWithMediaCharacteristic:))]
1296        #[unsafe(method_family = none)]
1297        pub unsafe fn tracksWithMediaCharacteristic(
1298            &self,
1299            media_characteristic: &AVMediaCharacteristic,
1300        ) -> Retained<NSArray<AVFragmentedAssetTrack>>;
1301
1302        #[cfg(all(
1303            feature = "AVAssetTrack",
1304            feature = "AVMediaFormat",
1305            feature = "block2"
1306        ))]
1307        /// Loads an array of AVFragmentedAssetTracks of the asset that present media with the specified characteristic.
1308        ///
1309        /// Parameter `mediaCharacteristic`: The media characteristic according to which AVAsset filters its AVFragmentedAssetTracks. (Media characteristics are defined in AVMediaFormat.h.)
1310        ///
1311        /// Parameter `completionHandler`: A block that is called when the loading is finished, with either the loaded tracks (which may be empty if no tracks with the specified characteristic are available) or an error.
1312        #[unsafe(method(loadTracksWithMediaCharacteristic:completionHandler:))]
1313        #[unsafe(method_family = none)]
1314        pub unsafe fn loadTracksWithMediaCharacteristic_completionHandler(
1315            &self,
1316            media_characteristic: &AVMediaCharacteristic,
1317            completion_handler: &block2::Block<
1318                dyn Fn(*mut NSArray<AVFragmentedAssetTrack>, *mut NSError),
1319            >,
1320        );
1321    );
1322}
1323
1324extern_class!(
1325    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedassetminder?language=objc)
1326    #[unsafe(super(NSObject))]
1327    #[derive(Debug, PartialEq, Eq, Hash)]
1328    pub struct AVFragmentedAssetMinder;
1329);
1330
1331unsafe impl NSObjectProtocol for AVFragmentedAssetMinder {}
1332
1333impl AVFragmentedAssetMinder {
1334    extern_methods!(
1335        /// Creates an AVFragmentedAssetMinder, adds the specified asset to it, and sets the mindingInterval to the specified value.
1336        ///
1337        /// Parameter `asset`: An instance of AVFragmentedAsset to add to the AVFragmentedAssetMinder
1338        ///
1339        /// Parameter `mindingInterval`: The initial minding interval of the AVFragmentedAssetMinder.
1340        ///
1341        /// Returns: A new instance of AVFragmentedAssetMinder.
1342        #[unsafe(method(fragmentedAssetMinderWithAsset:mindingInterval:))]
1343        #[unsafe(method_family = none)]
1344        pub unsafe fn fragmentedAssetMinderWithAsset_mindingInterval(
1345            asset: &AVAsset,
1346            minding_interval: NSTimeInterval,
1347        ) -> Retained<Self>;
1348
1349        /// Creates an AVFragmentedAssetMinder, adds the specified asset to it, and sets the mindingInterval to the specified value.
1350        ///
1351        /// Parameter `asset`: An instance of AVFragmentedAsset to add to the AVFragmentedAssetMinder
1352        ///
1353        /// Parameter `mindingInterval`: The initial minding interval of the AVFragmentedAssetMinder.
1354        ///
1355        /// Returns: A new instance of AVFragmentedAssetMinder.
1356        #[unsafe(method(initWithAsset:mindingInterval:))]
1357        #[unsafe(method_family = init)]
1358        pub unsafe fn initWithAsset_mindingInterval(
1359            this: Allocated<Self>,
1360            asset: &AVAsset,
1361            minding_interval: NSTimeInterval,
1362        ) -> Retained<Self>;
1363
1364        /// An NSTimeInterval indicating how often a check for additional fragments should be performed. The default interval is 10.0.
1365        ///
1366        /// This property throws an excepion if a value is set less than one millisecond (0.001) in duration.
1367        #[unsafe(method(mindingInterval))]
1368        #[unsafe(method_family = none)]
1369        pub unsafe fn mindingInterval(&self) -> NSTimeInterval;
1370
1371        /// Setter for [`mindingInterval`][Self::mindingInterval].
1372        #[unsafe(method(setMindingInterval:))]
1373        #[unsafe(method_family = none)]
1374        pub unsafe fn setMindingInterval(&self, minding_interval: NSTimeInterval);
1375
1376        /// An NSArray of the AVFragmentedAsset objects being minded.
1377        #[unsafe(method(assets))]
1378        #[unsafe(method_family = none)]
1379        pub unsafe fn assets(&self) -> Retained<NSArray<AVAsset>>;
1380
1381        /// Adds a fragmented asset to the array of assets being minded.
1382        ///
1383        /// Parameter `asset`: The fragmented asset to add to the minder.
1384        ///
1385        /// This method throws an exception if the asset is not a supported type (AVFragmentedAsset, AVFragmentedMovie), or if the asset is already being minded by another fragment minder.
1386        #[unsafe(method(addFragmentedAsset:))]
1387        #[unsafe(method_family = none)]
1388        pub unsafe fn addFragmentedAsset(&self, asset: &AVAsset);
1389
1390        /// Removes a fragmented asset from the array of assets being minded.
1391        ///
1392        /// Parameter `asset`: The fragmented asset to remove from the minder.
1393        ///
1394        /// This method throws an exception if the asset is not a supported type (AVFragmentedAsset, AVFragmentedMovie).
1395        #[unsafe(method(removeFragmentedAsset:))]
1396        #[unsafe(method_family = none)]
1397        pub unsafe fn removeFragmentedAsset(&self, asset: &AVAsset);
1398    );
1399}
1400
1401/// Methods declared on superclass `NSObject`.
1402impl AVFragmentedAssetMinder {
1403    extern_methods!(
1404        #[unsafe(method(init))]
1405        #[unsafe(method_family = init)]
1406        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1407
1408        #[unsafe(method(new))]
1409        #[unsafe(method_family = new)]
1410        pub unsafe fn new() -> Retained<Self>;
1411    );
1412}
1413
1414/// AVURLAssetContentKeyEligibility.
1415impl AVURLAsset {
1416    extern_methods!(
1417        /// Allows AVURLAsset to be added as a content key recipient to an AVContentKeySession.
1418        #[unsafe(method(mayRequireContentKeysForMediaDataProcessing))]
1419        #[unsafe(method_family = none)]
1420        pub unsafe fn mayRequireContentKeysForMediaDataProcessing(&self) -> bool;
1421    );
1422}
1423
1424#[cfg(feature = "AVContentKeySession")]
1425unsafe impl AVContentKeyRecipient for AVURLAsset {}