objc2_av_foundation/generated/
AVMovie.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 "C" {
15    /// Indicates the restrictions used by the movie 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. See AVAsset.h for the declaration of the AVAssetReferenceRestrictions enum.
16    ///
17    /// Some movies can contain references to media data stored outside the movie's container, for example in another file. This key can be used to specify a policy to use when these references are encountered. If a movie contains one or more references of a type that is forbidden by the reference restrictions, loading of movie properties will fail. In addition, such a movie cannot be used with other AVFoundation modules, such as AVPlayerItem or AVAssetExportSession.
18    ///
19    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmoviereferencerestrictionskey?language=objc)
20    pub static AVMovieReferenceRestrictionsKey: &'static NSString;
21}
22
23extern "C" {
24    /// Indicates whether alias data references in the movie should be parsed and resolved.
25    ///
26    /// 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 AVMovie initialization option is appropriate. AVMovie and AVMutableMovie do not create movies using alias data references to external media files.
27    ///
28    /// If you provide a value for AVMovieReferenceRestrictionsKey, restrictions will be observed for resolved alias references just as they are for URL references.
29    ///
30    /// For more details about alias resolution, consult documentation of the bookmark-related interfaces of NSURL.
31    ///
32    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmovieshouldsupportaliasdatareferenceskey?language=objc)
33    pub static AVMovieShouldSupportAliasDataReferencesKey: &'static NSString;
34}
35
36extern_class!(
37    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmovie?language=objc)
38    #[unsafe(super(AVAsset, NSObject))]
39    #[derive(Debug, PartialEq, Eq, Hash)]
40    #[cfg(feature = "AVAsset")]
41    pub struct AVMovie;
42);
43
44#[cfg(all(feature = "AVAsset", feature = "AVAsynchronousKeyValueLoading"))]
45unsafe impl AVAsynchronousKeyValueLoading for AVMovie {}
46
47#[cfg(feature = "AVAsset")]
48unsafe impl NSCopying for AVMovie {}
49
50#[cfg(feature = "AVAsset")]
51unsafe impl CopyingHelper for AVMovie {
52    type Result = Self;
53}
54
55#[cfg(feature = "AVAsset")]
56unsafe impl NSMutableCopying for AVMovie {}
57
58#[cfg(feature = "AVAsset")]
59unsafe impl MutableCopyingHelper for AVMovie {
60    type Result = AVMutableMovie;
61}
62
63#[cfg(feature = "AVAsset")]
64unsafe impl NSObjectProtocol for AVMovie {}
65
66#[cfg(feature = "AVAsset")]
67impl AVMovie {
68    extern_methods!(
69        #[cfg(feature = "AVMediaFormat")]
70        /// Provides the file types the AVMovie class understands.
71        ///
72        /// Returns: An NSArray of UTIs identifying the file types the AVMovie class understands.
73        #[unsafe(method(movieTypes))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn movieTypes() -> Retained<NSArray<AVFileType>>;
76
77        /// Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
78        ///
79        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
80        ///
81        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
82        ///
83        /// Returns: An AVMovie object
84        ///
85        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
86        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
87        /// to indicate where the sample data should be written.
88        #[unsafe(method(movieWithURL:options:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn movieWithURL_options(
91            url: &NSURL,
92            options: Option<&NSDictionary<NSString, AnyObject>>,
93        ) -> Retained<Self>;
94
95        /// Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
96        ///
97        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
98        ///
99        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
100        ///
101        /// Returns: An AVMovie object
102        ///
103        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
104        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
105        /// to indicate where the sample data should be written.
106        #[unsafe(method(initWithURL:options:))]
107        #[unsafe(method_family = init)]
108        pub unsafe fn initWithURL_options(
109            this: Allocated<Self>,
110            url: &NSURL,
111            options: Option<&NSDictionary<NSString, AnyObject>>,
112        ) -> Retained<Self>;
113
114        /// Creates an AVMovie object from a movie header stored in an NSData object.
115        ///
116        /// Parameter `data`: An NSData object containing a movie header.
117        ///
118        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
119        ///
120        /// Returns: An AVMovie object
121        ///
122        /// You can use this method to operate on movie headers that are not stored in files; this might include movie headers on the pasteboard (which do not contain media data). In general you should avoid loading an entire movie file with its media data into an instance of NSData! By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
123        /// If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
124        #[unsafe(method(movieWithData:options:))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn movieWithData_options(
127            data: &NSData,
128            options: Option<&NSDictionary<NSString, AnyObject>>,
129        ) -> Retained<Self>;
130
131        /// Creates an AVMovie object from a movie header stored in an NSData object.
132        ///
133        /// Parameter `data`: An NSData object containing a movie header.
134        ///
135        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
136        ///
137        /// Returns: An AVMovie object
138        ///
139        /// You can use this method to operate on movie headers that are not stored in files. In general you should avoid loading an entire movie file with its media data into an instance of NSData!
140        ///
141        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil. If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
142        #[unsafe(method(initWithData:options:))]
143        #[unsafe(method_family = init)]
144        pub unsafe fn initWithData_options(
145            this: Allocated<Self>,
146            data: &NSData,
147            options: Option<&NSDictionary<NSString, AnyObject>>,
148        ) -> Retained<Self>;
149
150        /// The URL with which the instance of AVMovie was initialized; may be nil.
151        #[unsafe(method(URL))]
152        #[unsafe(method_family = none)]
153        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
154
155        /// The data block with which the instance of AVMovie was initialized; may be nil.
156        #[unsafe(method(data))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn data(&self) -> Option<Retained<NSData>>;
159
160        /// The default storage container for media data added to a movie.
161        ///
162        /// The value of this property is an AVMediaDataStorage object that indicates where sample data that is added to a movie should be written by default.
163        #[unsafe(method(defaultMediaDataStorage))]
164        #[unsafe(method_family = none)]
165        pub unsafe fn defaultMediaDataStorage(&self) -> Option<Retained<AVMediaDataStorage>>;
166
167        #[cfg(all(feature = "AVAssetTrack", feature = "AVMovieTrack"))]
168        /// The tracks in a movie.
169        ///
170        /// The value of this property is an array of tracks the movie contains; the tracks are of type AVMovieTrack.
171        #[unsafe(method(tracks))]
172        #[unsafe(method_family = none)]
173        pub unsafe fn tracks(&self) -> Retained<NSArray<AVMovieTrack>>;
174
175        /// Indicates whether the movie file is capable of being extended by fragments.
176        ///
177        /// The value of this property is YES if an 'mvex' box is present in the 'moov' box. The 'mvex' box is necessary in order to signal the possible presence of later 'moof' boxes.
178        #[unsafe(method(canContainMovieFragments))]
179        #[unsafe(method_family = none)]
180        pub unsafe fn canContainMovieFragments(&self) -> bool;
181
182        /// Indicates whether the movie file is extended by at least one movie fragment.
183        ///
184        /// The value of this property is YES if canContainMovieFragments is YES and at least one 'moof' box is present after the 'moov' box.
185        #[unsafe(method(containsMovieFragments))]
186        #[unsafe(method_family = none)]
187        pub unsafe fn containsMovieFragments(&self) -> bool;
188    );
189}
190
191/// Methods declared on superclass `AVAsset`.
192#[cfg(feature = "AVAsset")]
193impl AVMovie {
194    extern_methods!(
195        /// Returns an instance of AVAsset for inspection of a media resource.
196        ///
197        /// Parameter `URL`: An instance of NSURL that references a media resource.
198        ///
199        /// Returns: An instance of AVAsset.
200        ///
201        /// Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.
202        #[unsafe(method(assetWithURL:))]
203        #[unsafe(method_family = none)]
204        pub unsafe fn assetWithURL(url: &NSURL) -> Retained<Self>;
205    );
206}
207
208/// Methods declared on superclass `NSObject`.
209#[cfg(feature = "AVAsset")]
210impl AVMovie {
211    extern_methods!(
212        #[unsafe(method(init))]
213        #[unsafe(method_family = init)]
214        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
215
216        #[unsafe(method(new))]
217        #[unsafe(method_family = new)]
218        pub unsafe fn new() -> Retained<Self>;
219    );
220}
221
222/// These options can be passed into writeMovieHeaderToURL:fileType:options:error: to control the writing of a movie header to a destination URL.
223///
224/// Writing the movie header will remove any existing movie header in the destination file and add a new movie header, preserving any other data in the file. If the destination file was empty, a file type box will be written at the beginning of the file.
225///
226/// If set, writing the movie header will truncate all existing data in the destination file and write a new movie header, thereby creating a pure reference movie file. A file type box will be written at the beginning of the file.
227///
228/// You would not want to use the AVMovieWritingTruncateDestinationToMovieHeaderOnly option if you had written sample data to the destination file using (for example) -[AVMutableMovie insertTimeRange:ofAsset:atTime:copySampleData:error:] with copySampleData set to YES, since that data would be lost.
229///
230/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmoviewritingoptions?language=objc)
231// NS_OPTIONS
232#[repr(transparent)]
233#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
234pub struct AVMovieWritingOptions(pub NSUInteger);
235bitflags::bitflags! {
236    impl AVMovieWritingOptions: NSUInteger {
237        #[doc(alias = "AVMovieWritingAddMovieHeaderToDestination")]
238        const AddMovieHeaderToDestination = 0;
239        #[doc(alias = "AVMovieWritingTruncateDestinationToMovieHeaderOnly")]
240        const TruncateDestinationToMovieHeaderOnly = 1<<0;
241    }
242}
243
244unsafe impl Encode for AVMovieWritingOptions {
245    const ENCODING: Encoding = NSUInteger::ENCODING;
246}
247
248unsafe impl RefEncode for AVMovieWritingOptions {
249    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
250}
251
252/// AVMovieMovieHeaderSupport.
253#[cfg(feature = "AVAsset")]
254impl AVMovie {
255    extern_methods!(
256        #[cfg(feature = "AVMediaFormat")]
257        /// Creates an NSData object containing the movie header of the AVMovie object.
258        ///
259        /// Parameter `fileType`: A UTI indicating the specific file format of the movie header (e.g. AVFileTypeQuickTimeMovie for a QuickTime movie).
260        ///
261        /// Parameter `outError`: If an error occurs reading the movie header, describes the nature of the failure.
262        ///
263        /// Returns: An NSData object.
264        ///
265        /// The movie header will be a pure reference movie, with no base URL, suitable for use on the pasteboard.
266        #[unsafe(method(movieHeaderWithFileType:error:_))]
267        #[unsafe(method_family = none)]
268        pub unsafe fn movieHeaderWithFileType_error(
269            &self,
270            file_type: &AVFileType,
271        ) -> Result<Retained<NSData>, Retained<NSError>>;
272
273        #[cfg(feature = "AVMediaFormat")]
274        /// Writes the movie header to a destination URL.
275        ///
276        /// Parameter `URL`: An NSURL object indicating where to write the movie header.
277        ///
278        /// Parameter `fileType`: A UTI indicating the specific file format (e.g. AVFileTypeQuickTimeMovie for a QuickTime movie).
279        ///
280        /// Parameter `options`: An NSUInteger whose bits specify options for the writing of the movie header. See AVMovieWritingOptions above.
281        ///
282        /// Parameter `outError`: If an error occurs writing the movie header, describes the nature of the failure.
283        ///
284        /// Note that modifications to instances of AVMutableMovie, to their constituent AVMutableMovieTracks, or to their collections of metadata are committed to storage when their movie headers are written.
285        #[unsafe(method(writeMovieHeaderToURL:fileType:options:error:_))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn writeMovieHeaderToURL_fileType_options_error(
288            &self,
289            url: &NSURL,
290            file_type: &AVFileType,
291            options: AVMovieWritingOptions,
292        ) -> Result<(), Retained<NSError>>;
293
294        #[cfg(feature = "AVMediaFormat")]
295        /// Indicates whether a movie header for the AVMovie object can be created for the specified file type.
296        ///
297        /// Parameter `fileType`: A UTI indicating a movie file format (e.g. AVFileTypeQuickTimeMovie for a QuickTime movie).
298        ///
299        /// This method returns a BOOL that indicates whether a movie header of the specified type can be created for the receiver. For example, this method returns NO if the movie contains tracks whose media types or media subtypes are not allowed by the specified file type.
300        #[unsafe(method(isCompatibleWithFileType:))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn isCompatibleWithFileType(&self, file_type: &AVFileType) -> bool;
303    );
304}
305
306/// AVMovieTrackInspection.
307#[cfg(feature = "AVAsset")]
308impl AVMovie {
309    extern_methods!(
310        #[cfg(all(
311            feature = "AVAssetTrack",
312            feature = "AVMovieTrack",
313            feature = "objc2-core-media"
314        ))]
315        /// Provides an instance of AVMovieTrack that represents the track of the specified trackID.
316        ///
317        /// Parameter `trackID`: The trackID of the requested AVMovieTrack.
318        ///
319        /// Returns: An instance of AVMovieTrack; may be nil if no track of the specified trackID is available.
320        ///
321        /// Becomes callable without blocking when the key
322        /// "
323        /// tracks" has been loaded
324        #[deprecated = "Use loadTrackWithTrackID:completionHandler: instead"]
325        #[unsafe(method(trackWithTrackID:))]
326        #[unsafe(method_family = none)]
327        pub unsafe fn trackWithTrackID(
328            &self,
329            track_id: CMPersistentTrackID,
330        ) -> Option<Retained<AVMovieTrack>>;
331
332        #[cfg(all(
333            feature = "AVAssetTrack",
334            feature = "AVMovieTrack",
335            feature = "block2",
336            feature = "objc2-core-media"
337        ))]
338        /// Loads an instance of AVMovieTrack that represents the track of the specified trackID.
339        ///
340        /// Parameter `trackID`: The trackID of the requested AVMovieTrack.
341        ///
342        /// 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.
343        #[unsafe(method(loadTrackWithTrackID:completionHandler:))]
344        #[unsafe(method_family = none)]
345        pub unsafe fn loadTrackWithTrackID_completionHandler(
346            &self,
347            track_id: CMPersistentTrackID,
348            completion_handler: &block2::Block<dyn Fn(*mut AVMovieTrack, *mut NSError)>,
349        );
350
351        #[cfg(all(
352            feature = "AVAssetTrack",
353            feature = "AVMediaFormat",
354            feature = "AVMovieTrack"
355        ))]
356        /// Provides an array of AVMovieTracks of the asset that present media of the specified media type.
357        ///
358        /// Parameter `mediaType`: The media type according to which the receiver filters its AVMovieTracks. (Media types are defined in AVMediaFormat.h)
359        ///
360        /// Returns: An NSArray of AVMovieTracks; may be empty if no tracks of the specified media type are available.
361        ///
362        /// Becomes callable without blocking when the key
363        /// "
364        /// tracks" has been loaded
365        #[deprecated = "Use loadTracksWithMediaType:completionHandler: instead"]
366        #[unsafe(method(tracksWithMediaType:))]
367        #[unsafe(method_family = none)]
368        pub unsafe fn tracksWithMediaType(
369            &self,
370            media_type: &AVMediaType,
371        ) -> Retained<NSArray<AVMovieTrack>>;
372
373        #[cfg(all(
374            feature = "AVAssetTrack",
375            feature = "AVMediaFormat",
376            feature = "AVMovieTrack",
377            feature = "block2"
378        ))]
379        /// Loads an array of AVMovieTracks of the asset that present media of the specified media type.
380        ///
381        /// Parameter `mediaType`: The media type according to which AVAsset filters its AVMovieTracks. (Media types are defined in AVMediaFormat.h.)
382        ///
383        /// 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.
384        #[unsafe(method(loadTracksWithMediaType:completionHandler:))]
385        #[unsafe(method_family = none)]
386        pub unsafe fn loadTracksWithMediaType_completionHandler(
387            &self,
388            media_type: &AVMediaType,
389            completion_handler: &block2::Block<dyn Fn(*mut NSArray<AVMovieTrack>, *mut NSError)>,
390        );
391
392        #[cfg(all(
393            feature = "AVAssetTrack",
394            feature = "AVMediaFormat",
395            feature = "AVMovieTrack"
396        ))]
397        /// Provides an array of AVMovieTracks of the asset that present media with the specified characteristic.
398        ///
399        /// Parameter `mediaCharacteristic`: The media characteristic according to which the receiver filters its AVMovieTracks. (Media characteristics are defined in AVMediaFormat.h)
400        ///
401        /// Returns: An NSArray of AVMovieTracks; may be empty if no tracks with the specified characteristic are available.
402        ///
403        /// Becomes callable without blocking when the key
404        /// "
405        /// tracks" has been loaded
406        #[deprecated = "Use loadTracksWithMediaCharacteristic:completionHandler: instead"]
407        #[unsafe(method(tracksWithMediaCharacteristic:))]
408        #[unsafe(method_family = none)]
409        pub unsafe fn tracksWithMediaCharacteristic(
410            &self,
411            media_characteristic: &AVMediaCharacteristic,
412        ) -> Retained<NSArray<AVMovieTrack>>;
413
414        #[cfg(all(
415            feature = "AVAssetTrack",
416            feature = "AVMediaFormat",
417            feature = "AVMovieTrack",
418            feature = "block2"
419        ))]
420        /// Loads an array of AVMovieTracks of the asset that present media with the specified characteristic.
421        ///
422        /// Parameter `mediaCharacteristic`: The media characteristic according to which AVAsset filters its AVMovieTracks. (Media characteristics are defined in AVMediaFormat.h.)
423        ///
424        /// 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.
425        #[unsafe(method(loadTracksWithMediaCharacteristic:completionHandler:))]
426        #[unsafe(method_family = none)]
427        pub unsafe fn loadTracksWithMediaCharacteristic_completionHandler(
428            &self,
429            media_characteristic: &AVMediaCharacteristic,
430            completion_handler: &block2::Block<dyn Fn(*mut NSArray<AVMovieTrack>, *mut NSError)>,
431        );
432    );
433}
434
435extern_class!(
436    /// AVMutableMovie adds to its immutable superclass, AVMovie, several categories of methods for editing QuickTime movie files, e.g. inserting and removing time ranges of media, adding and removing tracks, and modifying the metadata collections stored therein.
437    ///
438    ///
439    /// By default, after creating an AVMutableMovie the defaultMediaDataStorage property will be nil and each associated AVMutableMovieTrack's mediaDataStorage property will be nil. If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
440    ///
441    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmutablemovie?language=objc)
442    #[unsafe(super(AVMovie, AVAsset, NSObject))]
443    #[derive(Debug, PartialEq, Eq, Hash)]
444    #[cfg(feature = "AVAsset")]
445    pub struct AVMutableMovie;
446);
447
448#[cfg(all(feature = "AVAsset", feature = "AVAsynchronousKeyValueLoading"))]
449unsafe impl AVAsynchronousKeyValueLoading for AVMutableMovie {}
450
451#[cfg(feature = "AVAsset")]
452unsafe impl NSCopying for AVMutableMovie {}
453
454#[cfg(feature = "AVAsset")]
455unsafe impl CopyingHelper for AVMutableMovie {
456    type Result = AVMovie;
457}
458
459#[cfg(feature = "AVAsset")]
460unsafe impl NSMutableCopying for AVMutableMovie {}
461
462#[cfg(feature = "AVAsset")]
463unsafe impl MutableCopyingHelper for AVMutableMovie {
464    type Result = Self;
465}
466
467#[cfg(feature = "AVAsset")]
468unsafe impl NSObjectProtocol for AVMutableMovie {}
469
470#[cfg(feature = "AVAsset")]
471impl AVMutableMovie {
472    extern_methods!(
473        /// Creates an AVMutableMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
474        ///
475        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
476        ///
477        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMutableMovie object.
478        ///
479        /// Parameter `outError`: If an error occurs creating a movie, describes the nature of the failure.
480        ///
481        /// Returns: An AVMutableMovie object
482        ///
483        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMutableMovieTrack's mediaDataStorage property will be nil.
484        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
485        /// to indicate where the sample data should be written.
486        #[unsafe(method(movieWithURL:options:error:_))]
487        #[unsafe(method_family = none)]
488        pub unsafe fn movieWithURL_options_error(
489            url: &NSURL,
490            options: Option<&NSDictionary<NSString, AnyObject>>,
491        ) -> Result<Retained<Self>, Retained<NSError>>;
492
493        /// Creates an AVMutableMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
494        ///
495        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
496        ///
497        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMutableMovie object.
498        ///
499        /// Parameter `outError`: If an error occurs creating a movie, describes the nature of the failure.
500        ///
501        /// Returns: An AVMutableMovie object
502        ///
503        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMutableMovieTrack's mediaDataStorage property will be nil.
504        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
505        /// to indicate where the sample data should be written.
506        #[unsafe(method(initWithURL:options:error:_))]
507        #[unsafe(method_family = init)]
508        pub unsafe fn initWithURL_options_error(
509            this: Allocated<Self>,
510            url: &NSURL,
511            options: Option<&NSDictionary<NSString, AnyObject>>,
512        ) -> Result<Retained<Self>, Retained<NSError>>;
513
514        /// Creates an AVMutableMovie object from a movie header stored in an NSData object.
515        ///
516        /// Parameter `data`: An NSData object containing a movie header.
517        ///
518        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMutableMovie object.
519        ///
520        /// Parameter `outError`: If an error occurs creating a movie, describes the nature of the failure.
521        ///
522        /// Returns: An AVMutableMovie object
523        ///
524        /// You can use this method to operate on movie headers that are not stored in files. In general you should avoid loading an entire movie file with its media data into an instance of NSData!
525        ///
526        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMutableMovieTrack's mediaDataStorage property will be nil. If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
527        #[unsafe(method(movieWithData:options:error:_))]
528        #[unsafe(method_family = none)]
529        pub unsafe fn movieWithData_options_error(
530            data: &NSData,
531            options: Option<&NSDictionary<NSString, AnyObject>>,
532        ) -> Result<Retained<Self>, Retained<NSError>>;
533
534        /// Creates an AVMutableMovie object from a movie header stored in an NSData object.
535        ///
536        /// Parameter `data`: An NSData object containing a movie header.
537        ///
538        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMutableMovie object.
539        ///
540        /// Parameter `outError`: If an error occurs creating a movie, describes the nature of the failure.
541        ///
542        /// Returns: An AVMutableMovie object
543        ///
544        /// You can use this method to operate on movie headers that are not stored in files. In general you should avoid loading an entire movie file with its media data into an instance of NSData!
545        ///
546        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMutableMovieTrack's mediaDataStorage property will be nil. If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
547        #[unsafe(method(initWithData:options:error:_))]
548        #[unsafe(method_family = init)]
549        pub unsafe fn initWithData_options_error(
550            this: Allocated<Self>,
551            data: &NSData,
552            options: Option<&NSDictionary<NSString, AnyObject>>,
553        ) -> Result<Retained<Self>, Retained<NSError>>;
554
555        /// Creates an AVMutableMovie object without tracks (and therefore without media).
556        ///
557        /// Parameter `movie`: If you wish to transfer settings from an existing movie (including movie userdata and metadata, preferred rate, preferred volume, etc.), pass a reference to an AVMovie object representing that movie. Otherwise pass nil. The userdata and metadata from the source movie may need to be converted if the format of that movie differs from fileType; you may wish to inspect the userdata or metadata of the receiver to ensure that important data was copied.
558        ///
559        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMutableMovie object. Pass nil for default initialization behavior.
560        ///
561        /// Parameter `outError`: If an error occurs creating a movie, describes the nature of the failure.
562        ///
563        /// Returns: An AVMutableMovie object
564        ///
565        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
566        /// If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
567        #[unsafe(method(movieWithSettingsFromMovie:options:error:_))]
568        #[unsafe(method_family = none)]
569        pub unsafe fn movieWithSettingsFromMovie_options_error(
570            movie: Option<&AVMovie>,
571            options: Option<&NSDictionary<NSString, AnyObject>>,
572        ) -> Result<Retained<Self>, Retained<NSError>>;
573
574        /// Creates an AVMutableMovie object without tracks (and therefore without media).
575        ///
576        /// Parameter `movie`: If you wish to transfer settings from an existing movie (including movie userdata and metadata, preferred rate, preferred volume, etc.), pass a reference to an AVMovie object representing that movie. Otherwise pass nil. The userdata and metadata from the source movie may need to be converted if the format of that movie differs from fileType; you may wish to inspect the userdata or metadata of the receiver to ensure that important data was copied.
577        ///
578        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMutableMovie object. Pass nil for default initialization behavior.
579        ///
580        /// Parameter `outError`: If an error occurs creating a movie, describes the nature of the failure.
581        ///
582        /// Returns: An AVMutableMovie object
583        ///
584        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
585        /// If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
586        #[unsafe(method(initWithSettingsFromMovie:options:error:_))]
587        #[unsafe(method_family = init)]
588        pub unsafe fn initWithSettingsFromMovie_options_error(
589            this: Allocated<Self>,
590            movie: Option<&AVMovie>,
591            options: Option<&NSDictionary<NSString, AnyObject>>,
592        ) -> Result<Retained<Self>, Retained<NSError>>;
593
594        /// The natural rate at which the movie is to be played; often but not always 1.0.
595        #[unsafe(method(preferredRate))]
596        #[unsafe(method_family = none)]
597        pub unsafe fn preferredRate(&self) -> c_float;
598
599        /// Setter for [`preferredRate`][Self::preferredRate].
600        #[unsafe(method(setPreferredRate:))]
601        #[unsafe(method_family = none)]
602        pub unsafe fn setPreferredRate(&self, preferred_rate: c_float);
603
604        /// The preferred volume of the audible media data of the movie; often but not always 1.0.
605        #[unsafe(method(preferredVolume))]
606        #[unsafe(method_family = none)]
607        pub unsafe fn preferredVolume(&self) -> c_float;
608
609        /// Setter for [`preferredVolume`][Self::preferredVolume].
610        #[unsafe(method(setPreferredVolume:))]
611        #[unsafe(method_family = none)]
612        pub unsafe fn setPreferredVolume(&self, preferred_volume: c_float);
613
614        #[cfg(feature = "objc2-core-foundation")]
615        /// A CGAffineTransform indicating the transform specified in the movie's storage container as the preferred transformation of the visual media data for display purposes; the value is often but not always CGAffineTransformIdentity.
616        #[unsafe(method(preferredTransform))]
617        #[unsafe(method_family = none)]
618        pub unsafe fn preferredTransform(&self) -> CGAffineTransform;
619
620        #[cfg(feature = "objc2-core-foundation")]
621        /// Setter for [`preferredTransform`][Self::preferredTransform].
622        #[unsafe(method(setPreferredTransform:))]
623        #[unsafe(method_family = none)]
624        pub unsafe fn setPreferredTransform(&self, preferred_transform: CGAffineTransform);
625
626        #[cfg(feature = "objc2-core-media")]
627        /// For file types that contain a 'moov' atom, such as QuickTime Movie files, specifies the time scale of the movie.
628        ///
629        /// The default movie time scale is 600. In certain cases, you may want to set this to a different value. For instance, a movie that
630        /// contains a single audio track should typically have the movie time scale set to the media time scale of that track.
631        ///
632        /// This property should be set on a new empty movie before any edits are performed on the movie.
633        #[unsafe(method(timescale))]
634        #[unsafe(method_family = none)]
635        pub unsafe fn timescale(&self) -> CMTimeScale;
636
637        #[cfg(feature = "objc2-core-media")]
638        /// Setter for [`timescale`][Self::timescale].
639        #[unsafe(method(setTimescale:))]
640        #[unsafe(method_family = none)]
641        pub unsafe fn setTimescale(&self, timescale: CMTimeScale);
642
643        #[cfg(all(feature = "AVAssetTrack", feature = "AVMovieTrack"))]
644        /// The tracks in a mutable movie.
645        ///
646        /// The value of this property is an array of tracks the mutable movie contains; the tracks are of type AVMutableMovieTrack.
647        #[unsafe(method(tracks))]
648        #[unsafe(method_family = none)]
649        pub unsafe fn tracks(&self) -> Retained<NSArray<AVMutableMovieTrack>>;
650    );
651}
652
653/// Methods declared on superclass `AVMovie`.
654#[cfg(feature = "AVAsset")]
655impl AVMutableMovie {
656    extern_methods!(
657        /// Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
658        ///
659        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
660        ///
661        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
662        ///
663        /// Returns: An AVMovie object
664        ///
665        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
666        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
667        /// to indicate where the sample data should be written.
668        #[unsafe(method(movieWithURL:options:))]
669        #[unsafe(method_family = none)]
670        pub unsafe fn movieWithURL_options(
671            url: &NSURL,
672            options: Option<&NSDictionary<NSString, AnyObject>>,
673        ) -> Retained<Self>;
674
675        /// Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
676        ///
677        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
678        ///
679        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
680        ///
681        /// Returns: An AVMovie object
682        ///
683        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
684        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
685        /// to indicate where the sample data should be written.
686        #[unsafe(method(initWithURL:options:))]
687        #[unsafe(method_family = init)]
688        pub unsafe fn initWithURL_options(
689            this: Allocated<Self>,
690            url: &NSURL,
691            options: Option<&NSDictionary<NSString, AnyObject>>,
692        ) -> Retained<Self>;
693
694        /// Creates an AVMovie object from a movie header stored in an NSData object.
695        ///
696        /// Parameter `data`: An NSData object containing a movie header.
697        ///
698        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
699        ///
700        /// Returns: An AVMovie object
701        ///
702        /// You can use this method to operate on movie headers that are not stored in files; this might include movie headers on the pasteboard (which do not contain media data). In general you should avoid loading an entire movie file with its media data into an instance of NSData! By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
703        /// If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
704        #[unsafe(method(movieWithData:options:))]
705        #[unsafe(method_family = none)]
706        pub unsafe fn movieWithData_options(
707            data: &NSData,
708            options: Option<&NSDictionary<NSString, AnyObject>>,
709        ) -> Retained<Self>;
710
711        /// Creates an AVMovie object from a movie header stored in an NSData object.
712        ///
713        /// Parameter `data`: An NSData object containing a movie header.
714        ///
715        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
716        ///
717        /// Returns: An AVMovie object
718        ///
719        /// You can use this method to operate on movie headers that are not stored in files. In general you should avoid loading an entire movie file with its media data into an instance of NSData!
720        ///
721        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil. If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
722        #[unsafe(method(initWithData:options:))]
723        #[unsafe(method_family = init)]
724        pub unsafe fn initWithData_options(
725            this: Allocated<Self>,
726            data: &NSData,
727            options: Option<&NSDictionary<NSString, AnyObject>>,
728        ) -> Retained<Self>;
729    );
730}
731
732/// Methods declared on superclass `AVAsset`.
733#[cfg(feature = "AVAsset")]
734impl AVMutableMovie {
735    extern_methods!(
736        /// Returns an instance of AVAsset for inspection of a media resource.
737        ///
738        /// Parameter `URL`: An instance of NSURL that references a media resource.
739        ///
740        /// Returns: An instance of AVAsset.
741        ///
742        /// Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.
743        #[unsafe(method(assetWithURL:))]
744        #[unsafe(method_family = none)]
745        pub unsafe fn assetWithURL(url: &NSURL) -> Retained<Self>;
746    );
747}
748
749/// Methods declared on superclass `NSObject`.
750#[cfg(feature = "AVAsset")]
751impl AVMutableMovie {
752    extern_methods!(
753        #[unsafe(method(init))]
754        #[unsafe(method_family = init)]
755        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
756
757        #[unsafe(method(new))]
758        #[unsafe(method_family = new)]
759        pub unsafe fn new() -> Retained<Self>;
760    );
761}
762
763/// AVMutableMovieMovieLevelEditing.
764#[cfg(feature = "AVAsset")]
765impl AVMutableMovie {
766    extern_methods!(
767        /// Whether a movie has been modified.
768        ///
769        /// The value of this property is a BOOL that indicates whether the AVMutableMovie object has been modified since it was created, was last written, or had its modified state cleared via a call to setModified:NO.
770        #[unsafe(method(isModified))]
771        #[unsafe(method_family = none)]
772        pub unsafe fn isModified(&self) -> bool;
773
774        /// Setter for [`isModified`][Self::isModified].
775        #[unsafe(method(setModified:))]
776        #[unsafe(method_family = none)]
777        pub unsafe fn setModified(&self, modified: bool);
778
779        /// The default storage container for media data added to a movie.
780        ///
781        /// The value of this property is an AVMediaDataStorage object that indicates where sample data that is added to a movie should be written, for any track for whose mediaDataStorage property is nil.
782        #[unsafe(method(defaultMediaDataStorage))]
783        #[unsafe(method_family = none)]
784        pub unsafe fn defaultMediaDataStorage(&self) -> Option<Retained<AVMediaDataStorage>>;
785
786        /// Setter for [`defaultMediaDataStorage`][Self::defaultMediaDataStorage].
787        #[unsafe(method(setDefaultMediaDataStorage:))]
788        #[unsafe(method_family = none)]
789        pub unsafe fn setDefaultMediaDataStorage(
790            &self,
791            default_media_data_storage: Option<&AVMediaDataStorage>,
792        );
793
794        #[cfg(feature = "objc2-core-media")]
795        /// A CMTime that indicates the duration for interleaving runs of samples of each track.
796        ///
797        /// The default interleaving period is 0.5 seconds.
798        #[unsafe(method(interleavingPeriod))]
799        #[unsafe(method_family = none)]
800        pub unsafe fn interleavingPeriod(&self) -> CMTime;
801
802        #[cfg(feature = "objc2-core-media")]
803        /// Setter for [`interleavingPeriod`][Self::interleavingPeriod].
804        #[unsafe(method(setInterleavingPeriod:))]
805        #[unsafe(method_family = none)]
806        pub unsafe fn setInterleavingPeriod(&self, interleaving_period: CMTime);
807
808        #[cfg(feature = "objc2-core-media")]
809        /// Inserts all the tracks of a timeRange of an asset into a movie.
810        ///
811        /// Parameter `timeRange`: The time range of the asset to be inserted.
812        ///
813        /// Parameter `asset`: An AVAsset object indicating the source of the inserted media. Only instances of AVURLAsset and AVComposition are supported.
814        /// Must not be nil.
815        ///
816        /// Parameter `startTime`: The time in the target movie at which the media is to be inserted.
817        ///
818        /// Parameter `copySampleData`: A BOOL value that indicates whether sample data is to be copied from the source to the destination during edits.
819        /// If YES, the sample data is written to the location specified by the track property mediaDataStorage if non-nil,
820        /// or else by the movie property defaultMediaDataStorage if non-nil; if both are nil, the method will fail and return NO.
821        /// If NO, sample data will not be written and sample references to the samples in their original container will be added as necessary.
822        /// Note that in this case, this method will fail if the source AVAsset is not able to provide sample reference information for the original container.
823        ///
824        /// Parameter `outError`: If the insertion fails, an NSError object that describes the nature of the failure.
825        ///
826        /// Returns: A BOOL value that indicates the success of the insertion.
827        ///
828        /// This method may add new tracks to the target movie to ensure that all tracks of the asset are represented in the inserted timeRange.
829        /// Existing content at the specified startTime will be pushed out by the duration of timeRange.
830        /// Note that metadata will not be automatically copied.
831        #[unsafe(method(insertTimeRange:ofAsset:atTime:copySampleData:error:_))]
832        #[unsafe(method_family = none)]
833        pub unsafe fn insertTimeRange_ofAsset_atTime_copySampleData_error(
834            &self,
835            time_range: CMTimeRange,
836            asset: &AVAsset,
837            start_time: CMTime,
838            copy_sample_data: bool,
839        ) -> Result<(), Retained<NSError>>;
840
841        #[cfg(feature = "objc2-core-media")]
842        /// Adds an empty time range to the target movie.
843        ///
844        /// Parameter `timeRange`: The time range to be made empty. Note that you cannot add empty time ranges to the end of a movie.
845        #[unsafe(method(insertEmptyTimeRange:))]
846        #[unsafe(method_family = none)]
847        pub unsafe fn insertEmptyTimeRange(&self, time_range: CMTimeRange);
848
849        #[cfg(feature = "objc2-core-media")]
850        /// Removes a specified time range from a movie.
851        ///
852        /// Parameter `timeRange`: The time range to be removed.
853        #[unsafe(method(removeTimeRange:))]
854        #[unsafe(method_family = none)]
855        pub unsafe fn removeTimeRange(&self, time_range: CMTimeRange);
856
857        #[cfg(feature = "objc2-core-media")]
858        /// Changes the duration of a time range of a movie.
859        ///
860        /// Parameter `timeRange`: The time range to be scaled.
861        ///
862        /// Parameter `duration`: The new duration of the time range.
863        #[unsafe(method(scaleTimeRange:toDuration:))]
864        #[unsafe(method_family = none)]
865        pub unsafe fn scaleTimeRange_toDuration(&self, time_range: CMTimeRange, duration: CMTime);
866    );
867}
868
869/// AVMutableMovieTrackLevelEditing.
870#[cfg(feature = "AVAsset")]
871impl AVMutableMovie {
872    extern_methods!(
873        #[cfg(all(feature = "AVAssetTrack", feature = "AVMovieTrack"))]
874        /// Provides a reference to a track of a mutable movie into which any time range of an AVAssetTrack
875        /// can be inserted (via -[AVMutableMovieTrack insertTimeRange:ofTrack:atTime:copySampleData:error:]).
876        ///
877        /// Parameter `track`: A reference to the AVAssetTrack from which a time range may be inserted.
878        ///
879        /// Returns: An AVMutableMovieTrack that can accommodate the insertion.
880        /// If no such track is available, the result is nil. A new track of the same media type
881        /// as the AVAssetTrack can be created via -addMutableTrackWithMediaType:copySettingsFromTrack:options:,
882        /// and this new track will be compatible.
883        ///
884        /// For best performance, the number of tracks in a movie should be kept to a minimum, corresponding to the
885        /// number for which media data must be presented in parallel. If media data of the same type is to be presented
886        /// serially, even from multiple assets, a single track of that media type should be used. This method,
887        /// -mutableTrackCompatibleWithTrack:, can help the client to identify an existing target track for an insertion.
888        #[unsafe(method(mutableTrackCompatibleWithTrack:))]
889        #[unsafe(method_family = none)]
890        pub unsafe fn mutableTrackCompatibleWithTrack(
891            &self,
892            track: &AVAssetTrack,
893        ) -> Option<Retained<AVMutableMovieTrack>>;
894
895        #[cfg(all(
896            feature = "AVAssetTrack",
897            feature = "AVMediaFormat",
898            feature = "AVMovieTrack"
899        ))]
900        /// Adds an empty track to the target movie.
901        ///
902        /// Parameter `mediaType`: The media type of the new track (e.g. AVMediaTypeVideo for a video track).
903        ///
904        /// Parameter `track`: If you wish to transfer settings from an existing track, including width, height, preferred volume, etc., pass a reference to an AVAssetTrack representing that track. Otherwise pass nil.
905        ///
906        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the new AVMutableMovieTrack object. Pass nil for default initialization behavior.
907        ///
908        /// Returns: An AVMutableMovieTrack object
909        ///
910        /// The trackID of the newly added track is a property of the returned instance of AVMutableMovieTrack.
911        /// This method throws an exception if media type is not equal to the track's media type, or if any option is invalid.
912        /// Note that metadata will not be automatically copied.
913        #[unsafe(method(addMutableTrackWithMediaType:copySettingsFromTrack:options:))]
914        #[unsafe(method_family = none)]
915        pub unsafe fn addMutableTrackWithMediaType_copySettingsFromTrack_options(
916            &self,
917            media_type: &AVMediaType,
918            track: Option<&AVAssetTrack>,
919            options: Option<&NSDictionary<NSString, AnyObject>>,
920        ) -> Option<Retained<AVMutableMovieTrack>>;
921
922        #[cfg(all(feature = "AVAssetTrack", feature = "AVMovieTrack"))]
923        /// Adds one or more empty tracks to the target movie, copying track settings from the source tracks.
924        ///
925        /// Parameter `existingTracks`: An array of AVAssetTrack objects.
926        ///
927        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the new AVMutableMovieTrack objects. Pass nil for default initialization behavior.
928        ///
929        /// Returns: An array of AVMutableMovieTrack objects; the index of a track in this array is the same as the index of its source track in the existingTracks array.
930        ///
931        /// This method creates one or more empty tracks in the target movie and configures those tracks with settings (such as track userdata and metadata, width, height, and preferred volume) copied from the source tracks in the existingTracks array. Also, properties involving pairs of tracks (such as track references) are copied from the source tracks to the target tracks.
932        /// This method throws an exception if any option is invalid.
933        #[unsafe(method(addMutableTracksCopyingSettingsFromTracks:options:))]
934        #[unsafe(method_family = none)]
935        pub unsafe fn addMutableTracksCopyingSettingsFromTracks_options(
936            &self,
937            existing_tracks: &NSArray<AVAssetTrack>,
938            options: Option<&NSDictionary<NSString, AnyObject>>,
939        ) -> Retained<NSArray<AVMutableMovieTrack>>;
940
941        #[cfg(all(feature = "AVAssetTrack", feature = "AVMovieTrack"))]
942        /// Removes a track from the target movie.
943        ///
944        /// Parameter `track`: The track to be removed.
945        #[unsafe(method(removeTrack:))]
946        #[unsafe(method_family = none)]
947        pub unsafe fn removeTrack(&self, track: &AVMovieTrack);
948    );
949}
950
951/// AVMutableMovieMetadataEditing.
952#[cfg(feature = "AVAsset")]
953impl AVMutableMovie {
954    extern_methods!(
955        #[cfg(feature = "AVMetadataItem")]
956        /// A collection of metadata stored by the movie.
957        ///
958        /// The value of this property is an array of AVMetadataItem objects representing the collection of metadata stored by the movie.
959        #[unsafe(method(metadata))]
960        #[unsafe(method_family = none)]
961        pub unsafe fn metadata(&self) -> Retained<NSArray<AVMetadataItem>>;
962
963        #[cfg(feature = "AVMetadataItem")]
964        /// Setter for [`metadata`][Self::metadata].
965        #[unsafe(method(setMetadata:))]
966        #[unsafe(method_family = none)]
967        pub unsafe fn setMetadata(&self, metadata: &NSArray<AVMetadataItem>);
968    );
969}
970
971/// AVMutableMovieTrackInspection.
972#[cfg(feature = "AVAsset")]
973impl AVMutableMovie {
974    extern_methods!(
975        #[cfg(all(
976            feature = "AVAssetTrack",
977            feature = "AVMovieTrack",
978            feature = "objc2-core-media"
979        ))]
980        /// Provides an instance of AVMutableMovieTrack that represents the track of the specified trackID.
981        ///
982        /// Parameter `trackID`: The trackID of the requested AVMutableMovieTrack.
983        ///
984        /// Returns: An instance of AVMutableMovieTrack; may be nil if no track of the specified trackID is available.
985        ///
986        /// Becomes callable without blocking when the key
987        /// "
988        /// tracks" has been loaded
989        #[unsafe(method(trackWithTrackID:))]
990        #[unsafe(method_family = none)]
991        pub unsafe fn trackWithTrackID(
992            &self,
993            track_id: CMPersistentTrackID,
994        ) -> Option<Retained<AVMutableMovieTrack>>;
995
996        #[cfg(all(
997            feature = "AVAssetTrack",
998            feature = "AVMovieTrack",
999            feature = "block2",
1000            feature = "objc2-core-media"
1001        ))]
1002        /// Loads an instance of AVMutableMovieTrack that represents the track of the specified trackID.
1003        ///
1004        /// Parameter `trackID`: The trackID of the requested AVMutableMovieTrack.
1005        ///
1006        /// 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.
1007        #[unsafe(method(loadTrackWithTrackID:completionHandler:))]
1008        #[unsafe(method_family = none)]
1009        pub unsafe fn loadTrackWithTrackID_completionHandler(
1010            &self,
1011            track_id: CMPersistentTrackID,
1012            completion_handler: &block2::Block<dyn Fn(*mut AVMutableMovieTrack, *mut NSError)>,
1013        );
1014
1015        #[cfg(all(
1016            feature = "AVAssetTrack",
1017            feature = "AVMediaFormat",
1018            feature = "AVMovieTrack"
1019        ))]
1020        /// Provides an array of AVMutableMovieTracks of the asset that present media of the specified media type.
1021        ///
1022        /// Parameter `mediaType`: The media type according to which the receiver filters its AVMutableMovieTracks. (Media types are defined in AVMediaFormat.h)
1023        ///
1024        /// Returns: An NSArray of AVMutableMovieTracks; may be empty if no tracks of the specified media type are available.
1025        ///
1026        /// Becomes callable without blocking when the key
1027        /// "
1028        /// tracks" has been loaded
1029        #[unsafe(method(tracksWithMediaType:))]
1030        #[unsafe(method_family = none)]
1031        pub unsafe fn tracksWithMediaType(
1032            &self,
1033            media_type: &AVMediaType,
1034        ) -> Retained<NSArray<AVMutableMovieTrack>>;
1035
1036        #[cfg(all(
1037            feature = "AVAssetTrack",
1038            feature = "AVMediaFormat",
1039            feature = "AVMovieTrack",
1040            feature = "block2"
1041        ))]
1042        /// Loads an array of AVMutableMovieTracks of the asset that present media of the specified media type.
1043        ///
1044        /// Parameter `mediaType`: The media type according to which AVAsset filters its AVMutableMovieTracks. (Media types are defined in AVMediaFormat.h.)
1045        ///
1046        /// 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.
1047        #[unsafe(method(loadTracksWithMediaType:completionHandler:))]
1048        #[unsafe(method_family = none)]
1049        pub unsafe fn loadTracksWithMediaType_completionHandler(
1050            &self,
1051            media_type: &AVMediaType,
1052            completion_handler: &block2::Block<
1053                dyn Fn(*mut NSArray<AVMutableMovieTrack>, *mut NSError),
1054            >,
1055        );
1056
1057        #[cfg(all(
1058            feature = "AVAssetTrack",
1059            feature = "AVMediaFormat",
1060            feature = "AVMovieTrack"
1061        ))]
1062        /// Provides an array of AVMutableMovieTracks of the asset that present media with the specified characteristic.
1063        ///
1064        /// Parameter `mediaCharacteristic`: The media characteristic according to which the receiver filters its AVMutableMovieTracks. (Media characteristics are defined in AVMediaFormat.h)
1065        ///
1066        /// Returns: An NSArray of AVMutableMovieTracks; may be empty if no tracks with the specified characteristic are available.
1067        ///
1068        /// Becomes callable without blocking when the key
1069        /// "
1070        /// tracks" has been loaded
1071        #[unsafe(method(tracksWithMediaCharacteristic:))]
1072        #[unsafe(method_family = none)]
1073        pub unsafe fn tracksWithMediaCharacteristic(
1074            &self,
1075            media_characteristic: &AVMediaCharacteristic,
1076        ) -> Retained<NSArray<AVMutableMovieTrack>>;
1077
1078        #[cfg(all(
1079            feature = "AVAssetTrack",
1080            feature = "AVMediaFormat",
1081            feature = "AVMovieTrack",
1082            feature = "block2"
1083        ))]
1084        /// Loads an array of AVMutableMovieTracks of the asset that present media with the specified characteristic.
1085        ///
1086        /// Parameter `mediaCharacteristic`: The media characteristic according to which AVAsset filters its AVMutableMovieTracks. (Media characteristics are defined in AVMediaFormat.h.)
1087        ///
1088        /// 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.
1089        #[unsafe(method(loadTracksWithMediaCharacteristic:completionHandler:))]
1090        #[unsafe(method_family = none)]
1091        pub unsafe fn loadTracksWithMediaCharacteristic_completionHandler(
1092            &self,
1093            media_characteristic: &AVMediaCharacteristic,
1094            completion_handler: &block2::Block<
1095                dyn Fn(*mut NSArray<AVMutableMovieTrack>, *mut NSError),
1096            >,
1097        );
1098    );
1099}
1100
1101extern_class!(
1102    /// Media sample data storage file.
1103    ///
1104    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
1105    ///
1106    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmediadatastorage?language=objc)
1107    #[unsafe(super(NSObject))]
1108    #[derive(Debug, PartialEq, Eq, Hash)]
1109    pub struct AVMediaDataStorage;
1110);
1111
1112unsafe impl Send for AVMediaDataStorage {}
1113
1114unsafe impl Sync for AVMediaDataStorage {}
1115
1116unsafe impl NSObjectProtocol for AVMediaDataStorage {}
1117
1118impl AVMediaDataStorage {
1119    extern_methods!(
1120        #[unsafe(method(init))]
1121        #[unsafe(method_family = init)]
1122        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1123
1124        #[unsafe(method(new))]
1125        #[unsafe(method_family = new)]
1126        pub unsafe fn new() -> Retained<Self>;
1127
1128        /// Creates an AVMediaDataStorage object associated with a file URL.
1129        ///
1130        /// Parameter `URL`: An NSURL object that specifies a file where sample data that is added to a movie or track should be written.
1131        ///
1132        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMediaDataStorage object. Currently no keys are defined.
1133        ///
1134        /// Returns: An AVMediaDataStorage object
1135        #[unsafe(method(initWithURL:options:))]
1136        #[unsafe(method_family = init)]
1137        pub unsafe fn initWithURL_options(
1138            this: Allocated<Self>,
1139            url: &NSURL,
1140            options: Option<&NSDictionary<NSString, AnyObject>>,
1141        ) -> Retained<Self>;
1142
1143        /// The URL from which the receiver was initialized; may be nil.
1144        #[unsafe(method(URL))]
1145        #[unsafe(method_family = none)]
1146        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
1147    );
1148}
1149
1150extern "C" {
1151    /// Posted after the value of
1152    /// "
1153    /// containsMovieFragments" has already been loaded and the AVFragmentedMovie is added to an AVFragmentedMovieMinder, either when 1) movie fragments are detected in the movie file on disk after it had previously contained none or when 2) no movie fragments are detected in the movie file on disk after it had previously contained one or more.
1154    ///
1155    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedmoviecontainsmoviefragmentsdidchangenotification?language=objc)
1156    pub static AVFragmentedMovieContainsMovieFragmentsDidChangeNotification: &'static NSString;
1157}
1158
1159extern "C" {
1160    /// Posted when the duration of an AVFragmentedMovie changes while it's being minded by an AVFragmentedMovieMinder, but only for changes that occur after the status of the value of
1161    /// "
1162    /// duration" has reached AVKeyValueStatusLoaded.
1163    ///
1164    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedmoviedurationdidchangenotification?language=objc)
1165    pub static AVFragmentedMovieDurationDidChangeNotification: &'static NSString;
1166}
1167
1168extern "C" {
1169    /// Posted when the movie file on disk is defragmented while an AVFragmentedMovie is being minded by an AVFragmentedMovieMinder, but only if the defragmentation occurs after the status of the value of
1170    /// "
1171    /// canContainMovieFragments" has reached AVKeyValueStatusLoaded.
1172    ///
1173    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedmoviewasdefragmentednotification?language=objc)
1174    pub static AVFragmentedMovieWasDefragmentedNotification: &'static NSString;
1175}
1176
1177extern_class!(
1178    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedmovie?language=objc)
1179    #[unsafe(super(AVMovie, AVAsset, NSObject))]
1180    #[derive(Debug, PartialEq, Eq, Hash)]
1181    #[cfg(feature = "AVAsset")]
1182    pub struct AVFragmentedMovie;
1183);
1184
1185#[cfg(feature = "AVAsset")]
1186unsafe impl Send for AVFragmentedMovie {}
1187
1188#[cfg(feature = "AVAsset")]
1189unsafe impl Sync for AVFragmentedMovie {}
1190
1191#[cfg(all(feature = "AVAsset", feature = "AVAsynchronousKeyValueLoading"))]
1192unsafe impl AVAsynchronousKeyValueLoading for AVFragmentedMovie {}
1193
1194#[cfg(feature = "AVAsset")]
1195unsafe impl AVFragmentMinding for AVFragmentedMovie {}
1196
1197#[cfg(feature = "AVAsset")]
1198unsafe impl NSObjectProtocol for AVFragmentedMovie {}
1199
1200#[cfg(feature = "AVAsset")]
1201impl AVFragmentedMovie {
1202    extern_methods!(
1203        #[cfg(all(feature = "AVAssetTrack", feature = "AVMovieTrack"))]
1204        /// The tracks in a movie.
1205        ///
1206        /// The value of this property is an array of tracks the movie contains; the tracks are of type AVFragmentedMovieTrack.
1207        #[unsafe(method(tracks))]
1208        #[unsafe(method_family = none)]
1209        pub unsafe fn tracks(&self) -> Retained<NSArray<AVFragmentedMovieTrack>>;
1210    );
1211}
1212
1213/// Methods declared on superclass `AVMovie`.
1214#[cfg(feature = "AVAsset")]
1215impl AVFragmentedMovie {
1216    extern_methods!(
1217        /// Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
1218        ///
1219        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
1220        ///
1221        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
1222        ///
1223        /// Returns: An AVMovie object
1224        ///
1225        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
1226        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
1227        /// to indicate where the sample data should be written.
1228        #[unsafe(method(movieWithURL:options:))]
1229        #[unsafe(method_family = none)]
1230        pub unsafe fn movieWithURL_options(
1231            url: &NSURL,
1232            options: Option<&NSDictionary<NSString, AnyObject>>,
1233        ) -> Retained<Self>;
1234
1235        /// Creates an AVMovie object from a movie header stored in a QuickTime movie file or ISO base media file.
1236        ///
1237        /// Parameter `URL`: An NSURL object that specifies a file containing a movie header.
1238        ///
1239        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
1240        ///
1241        /// Returns: An AVMovie object
1242        ///
1243        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
1244        /// If you want to create an AVMutableMovie from a file and then append sample buffers to any of its tracks, you must first set one of these properties
1245        /// to indicate where the sample data should be written.
1246        #[unsafe(method(initWithURL:options:))]
1247        #[unsafe(method_family = init)]
1248        pub unsafe fn initWithURL_options(
1249            this: Allocated<Self>,
1250            url: &NSURL,
1251            options: Option<&NSDictionary<NSString, AnyObject>>,
1252        ) -> Retained<Self>;
1253
1254        /// Creates an AVMovie object from a movie header stored in an NSData object.
1255        ///
1256        /// Parameter `data`: An NSData object containing a movie header.
1257        ///
1258        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
1259        ///
1260        /// Returns: An AVMovie object
1261        ///
1262        /// You can use this method to operate on movie headers that are not stored in files; this might include movie headers on the pasteboard (which do not contain media data). In general you should avoid loading an entire movie file with its media data into an instance of NSData! By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil.
1263        /// If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
1264        #[unsafe(method(movieWithData:options:))]
1265        #[unsafe(method_family = none)]
1266        pub unsafe fn movieWithData_options(
1267            data: &NSData,
1268            options: Option<&NSDictionary<NSString, AnyObject>>,
1269        ) -> Retained<Self>;
1270
1271        /// Creates an AVMovie object from a movie header stored in an NSData object.
1272        ///
1273        /// Parameter `data`: An NSData object containing a movie header.
1274        ///
1275        /// Parameter `options`: An NSDictionary object that contains keys for specifying options for the initialization of the AVMovie object.
1276        ///
1277        /// Returns: An AVMovie object
1278        ///
1279        /// You can use this method to operate on movie headers that are not stored in files. In general you should avoid loading an entire movie file with its media data into an instance of NSData!
1280        ///
1281        /// By default, the defaultMediaDataStorage property will be nil and each associated AVMovieTrack's mediaDataStorage property will be nil. If you want to create an AVMutableMovie from an NSData object and then append sample buffers to any of its tracks, you must first set one of these properties to indicate where the sample data should be written.
1282        #[unsafe(method(initWithData:options:))]
1283        #[unsafe(method_family = init)]
1284        pub unsafe fn initWithData_options(
1285            this: Allocated<Self>,
1286            data: &NSData,
1287            options: Option<&NSDictionary<NSString, AnyObject>>,
1288        ) -> Retained<Self>;
1289    );
1290}
1291
1292/// Methods declared on superclass `AVAsset`.
1293#[cfg(feature = "AVAsset")]
1294impl AVFragmentedMovie {
1295    extern_methods!(
1296        /// Returns an instance of AVAsset for inspection of a media resource.
1297        ///
1298        /// Parameter `URL`: An instance of NSURL that references a media resource.
1299        ///
1300        /// Returns: An instance of AVAsset.
1301        ///
1302        /// Returns a newly allocated instance of a subclass of AVAsset initialized with the specified URL.
1303        #[unsafe(method(assetWithURL:))]
1304        #[unsafe(method_family = none)]
1305        pub unsafe fn assetWithURL(url: &NSURL) -> Retained<Self>;
1306    );
1307}
1308
1309/// Methods declared on superclass `NSObject`.
1310#[cfg(feature = "AVAsset")]
1311impl AVFragmentedMovie {
1312    extern_methods!(
1313        #[unsafe(method(init))]
1314        #[unsafe(method_family = init)]
1315        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1316
1317        #[unsafe(method(new))]
1318        #[unsafe(method_family = new)]
1319        pub unsafe fn new() -> Retained<Self>;
1320    );
1321}
1322
1323/// AVFragmentedMovieTrackInspection.
1324#[cfg(feature = "AVAsset")]
1325impl AVFragmentedMovie {
1326    extern_methods!(
1327        #[cfg(all(
1328            feature = "AVAssetTrack",
1329            feature = "AVMovieTrack",
1330            feature = "objc2-core-media"
1331        ))]
1332        /// Provides an instance of AVFragmentedMovieTrack that represents the track of the specified trackID.
1333        ///
1334        /// Parameter `trackID`: The trackID of the requested AVFragmentedMovieTrack.
1335        ///
1336        /// Returns: An instance of AVFragmentedMovieTrack; may be nil if no track of the specified trackID is available.
1337        ///
1338        /// Becomes callable without blocking when the key
1339        /// "
1340        /// tracks" has been loaded
1341        #[deprecated = "Use loadTrackWithTrackID:completionHandler: instead"]
1342        #[unsafe(method(trackWithTrackID:))]
1343        #[unsafe(method_family = none)]
1344        pub unsafe fn trackWithTrackID(
1345            &self,
1346            track_id: CMPersistentTrackID,
1347        ) -> Option<Retained<AVFragmentedMovieTrack>>;
1348
1349        #[cfg(all(
1350            feature = "AVAssetTrack",
1351            feature = "AVMovieTrack",
1352            feature = "block2",
1353            feature = "objc2-core-media"
1354        ))]
1355        /// Loads an instance of AVFragmentedMovieTrack that represents the track of the specified trackID.
1356        ///
1357        /// Parameter `trackID`: The trackID of the requested AVFragmentedMovieTrack.
1358        ///
1359        /// 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.
1360        #[unsafe(method(loadTrackWithTrackID:completionHandler:))]
1361        #[unsafe(method_family = none)]
1362        pub unsafe fn loadTrackWithTrackID_completionHandler(
1363            &self,
1364            track_id: CMPersistentTrackID,
1365            completion_handler: &block2::Block<dyn Fn(*mut AVFragmentedMovieTrack, *mut NSError)>,
1366        );
1367
1368        #[cfg(all(
1369            feature = "AVAssetTrack",
1370            feature = "AVMediaFormat",
1371            feature = "AVMovieTrack"
1372        ))]
1373        /// Provides an array of AVFragmentedMovieTracks of the asset that present media of the specified media type.
1374        ///
1375        /// Parameter `mediaType`: The media type according to which the receiver filters its AVFragmentedMovieTracks. (Media types are defined in AVMediaFormat.h)
1376        ///
1377        /// Returns: An NSArray of AVFragmentedMovieTracks; may be empty if no tracks of the specified media type are available.
1378        ///
1379        /// Becomes callable without blocking when the key
1380        /// "
1381        /// tracks" has been loaded
1382        #[deprecated = "Use loadTracksWithMediaType:completionHandler: instead"]
1383        #[unsafe(method(tracksWithMediaType:))]
1384        #[unsafe(method_family = none)]
1385        pub unsafe fn tracksWithMediaType(
1386            &self,
1387            media_type: &AVMediaType,
1388        ) -> Retained<NSArray<AVFragmentedMovieTrack>>;
1389
1390        #[cfg(all(
1391            feature = "AVAssetTrack",
1392            feature = "AVMediaFormat",
1393            feature = "AVMovieTrack",
1394            feature = "block2"
1395        ))]
1396        /// Loads an array of AVFragmentedMovieTracks of the asset that present media of the specified media type.
1397        ///
1398        /// Parameter `mediaType`: The media type according to which AVAsset filters its AVFragmentedMovieTracks. (Media types are defined in AVMediaFormat.h.)
1399        ///
1400        /// 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.
1401        #[unsafe(method(loadTracksWithMediaType:completionHandler:))]
1402        #[unsafe(method_family = none)]
1403        pub unsafe fn loadTracksWithMediaType_completionHandler(
1404            &self,
1405            media_type: &AVMediaType,
1406            completion_handler: &block2::Block<
1407                dyn Fn(*mut NSArray<AVFragmentedMovieTrack>, *mut NSError),
1408            >,
1409        );
1410
1411        #[cfg(all(
1412            feature = "AVAssetTrack",
1413            feature = "AVMediaFormat",
1414            feature = "AVMovieTrack"
1415        ))]
1416        /// Provides an array of AVFragmentedMovieTracks of the asset that present media with the specified characteristic.
1417        ///
1418        /// Parameter `mediaCharacteristic`: The media characteristic according to which the receiver filters its AVFragmentedMovieTracks. (Media characteristics are defined in AVMediaFormat.h)
1419        ///
1420        /// Returns: An NSArray of AVFragmentedMovieTracks; may be empty if no tracks with the specified characteristic are available.
1421        ///
1422        /// Becomes callable without blocking when the key
1423        /// "
1424        /// tracks" has been loaded
1425        #[deprecated = "loadTracksWithMediaCharacteristic:completionHandler:"]
1426        #[unsafe(method(tracksWithMediaCharacteristic:))]
1427        #[unsafe(method_family = none)]
1428        pub unsafe fn tracksWithMediaCharacteristic(
1429            &self,
1430            media_characteristic: &AVMediaCharacteristic,
1431        ) -> Retained<NSArray<AVFragmentedMovieTrack>>;
1432
1433        #[cfg(all(
1434            feature = "AVAssetTrack",
1435            feature = "AVMediaFormat",
1436            feature = "AVMovieTrack",
1437            feature = "block2"
1438        ))]
1439        /// Loads an array of AVFragmentedMovieTracks of the asset that present media with the specified characteristic.
1440        ///
1441        /// Parameter `mediaCharacteristic`: The media characteristic according to which AVAsset filters its AVFragmentedMovieTracks. (Media characteristics are defined in AVMediaFormat.h.)
1442        ///
1443        /// 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.
1444        #[unsafe(method(loadTracksWithMediaCharacteristic:completionHandler:))]
1445        #[unsafe(method_family = none)]
1446        pub unsafe fn loadTracksWithMediaCharacteristic_completionHandler(
1447            &self,
1448            media_characteristic: &AVMediaCharacteristic,
1449            completion_handler: &block2::Block<
1450                dyn Fn(*mut NSArray<AVFragmentedMovieTrack>, *mut NSError),
1451            >,
1452        );
1453    );
1454}
1455
1456extern_class!(
1457    /// A class that periodically checks whether additional movie fragments have been appended to fragmented movie files.
1458    ///
1459    /// AVFragmentedMovieMinder is identical to AVFragmentedAssetMinder except that it's capable of minding only assets of class AVFragmentedMovie.
1460    ///
1461    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avfragmentedmovieminder?language=objc)
1462    #[unsafe(super(AVFragmentedAssetMinder, NSObject))]
1463    #[derive(Debug, PartialEq, Eq, Hash)]
1464    #[cfg(feature = "AVAsset")]
1465    pub struct AVFragmentedMovieMinder;
1466);
1467
1468#[cfg(feature = "AVAsset")]
1469unsafe impl NSObjectProtocol for AVFragmentedMovieMinder {}
1470
1471#[cfg(feature = "AVAsset")]
1472impl AVFragmentedMovieMinder {
1473    extern_methods!(
1474        /// Creates an AVFragmentedMovieMinder, adds the specified movie to it, and sets the mindingInterval to the specified value.
1475        ///
1476        /// Parameter `movie`: An instance of AVFragmentedMovie to add to the AVFragmentedMovieMinder
1477        ///
1478        /// Parameter `mindingInterval`: The initial minding interval of the AVFragmentedMovieMinder.
1479        ///
1480        /// Returns: A new instance of AVFragmentedMovieMinder.
1481        #[unsafe(method(fragmentedMovieMinderWithMovie:mindingInterval:))]
1482        #[unsafe(method_family = none)]
1483        pub unsafe fn fragmentedMovieMinderWithMovie_mindingInterval(
1484            movie: &AVFragmentedMovie,
1485            minding_interval: NSTimeInterval,
1486        ) -> Retained<Self>;
1487
1488        /// Creates an AVFragmentedMovieMinder, adds the specified movie to it, and sets the mindingInterval to the specified value.
1489        ///
1490        /// Parameter `movie`: An instance of AVFragmentedMovie to add to the AVFragmentedMovieMinder
1491        ///
1492        /// Parameter `mindingInterval`: The initial minding interval of the AVFragmentedMovieMinder.
1493        ///
1494        /// Returns: A new instance of AVFragmentedMovieMinder.
1495        #[unsafe(method(initWithMovie:mindingInterval:))]
1496        #[unsafe(method_family = init)]
1497        pub unsafe fn initWithMovie_mindingInterval(
1498            this: Allocated<Self>,
1499            movie: &AVFragmentedMovie,
1500            minding_interval: NSTimeInterval,
1501        ) -> Retained<Self>;
1502
1503        /// An NSTimeInterval indicating how often a check for additional movie fragments should be performed. The default interval is 10.0.
1504        #[unsafe(method(mindingInterval))]
1505        #[unsafe(method_family = none)]
1506        pub unsafe fn mindingInterval(&self) -> NSTimeInterval;
1507
1508        /// Setter for [`mindingInterval`][Self::mindingInterval].
1509        #[unsafe(method(setMindingInterval:))]
1510        #[unsafe(method_family = none)]
1511        pub unsafe fn setMindingInterval(&self, minding_interval: NSTimeInterval);
1512
1513        /// An NSArray of the AVFragmentedMovie objects being minded.
1514        #[unsafe(method(movies))]
1515        #[unsafe(method_family = none)]
1516        pub unsafe fn movies(&self) -> Retained<NSArray<AVFragmentedMovie>>;
1517
1518        /// Adds a fragmented movie to the array of movies being minded.
1519        ///
1520        /// Parameter `movie`: The fragmented movie to add to the minder.
1521        #[unsafe(method(addFragmentedMovie:))]
1522        #[unsafe(method_family = none)]
1523        pub unsafe fn addFragmentedMovie(&self, movie: &AVFragmentedMovie);
1524
1525        /// Removes a fragmented movie from the array of movies being minded.
1526        ///
1527        /// Parameter `movie`: The fragmented movie to remove from the minder.
1528        #[unsafe(method(removeFragmentedMovie:))]
1529        #[unsafe(method_family = none)]
1530        pub unsafe fn removeFragmentedMovie(&self, movie: &AVFragmentedMovie);
1531    );
1532}
1533
1534/// Methods declared on superclass `AVFragmentedAssetMinder`.
1535#[cfg(feature = "AVAsset")]
1536impl AVFragmentedMovieMinder {
1537    extern_methods!(
1538        /// Creates an AVFragmentedAssetMinder, adds the specified asset to it, and sets the mindingInterval to the specified value.
1539        ///
1540        /// Parameter `asset`: An instance of AVFragmentedAsset to add to the AVFragmentedAssetMinder
1541        ///
1542        /// Parameter `mindingInterval`: The initial minding interval of the AVFragmentedAssetMinder.
1543        ///
1544        /// Returns: A new instance of AVFragmentedAssetMinder.
1545        #[unsafe(method(fragmentedAssetMinderWithAsset:mindingInterval:))]
1546        #[unsafe(method_family = none)]
1547        pub unsafe fn fragmentedAssetMinderWithAsset_mindingInterval(
1548            asset: &AVAsset,
1549            minding_interval: NSTimeInterval,
1550        ) -> Retained<Self>;
1551
1552        /// Creates an AVFragmentedAssetMinder, adds the specified asset to it, and sets the mindingInterval to the specified value.
1553        ///
1554        /// Parameter `asset`: An instance of AVFragmentedAsset to add to the AVFragmentedAssetMinder
1555        ///
1556        /// Parameter `mindingInterval`: The initial minding interval of the AVFragmentedAssetMinder.
1557        ///
1558        /// Returns: A new instance of AVFragmentedAssetMinder.
1559        #[unsafe(method(initWithAsset:mindingInterval:))]
1560        #[unsafe(method_family = init)]
1561        pub unsafe fn initWithAsset_mindingInterval(
1562            this: Allocated<Self>,
1563            asset: &AVAsset,
1564            minding_interval: NSTimeInterval,
1565        ) -> Retained<Self>;
1566    );
1567}
1568
1569/// Methods declared on superclass `NSObject`.
1570#[cfg(feature = "AVAsset")]
1571impl AVFragmentedMovieMinder {
1572    extern_methods!(
1573        #[unsafe(method(init))]
1574        #[unsafe(method_family = init)]
1575        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1576
1577        #[unsafe(method(new))]
1578        #[unsafe(method_family = new)]
1579        pub unsafe fn new() -> Retained<Self>;
1580    );
1581}
1582
1583/// SynchronousAssetInterface.
1584/// Redeclarations of async-only AVAsset interfaces to allow synchronous usage in the synchronous subclass.
1585///
1586/// See AVAsset's interface for more information about these interfaces.
1587#[cfg(feature = "AVAsset")]
1588impl AVMutableMovie {
1589    extern_methods!(
1590        #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataItem"))]
1591        #[unsafe(method(metadataForFormat:))]
1592        #[unsafe(method_family = none)]
1593        pub unsafe fn metadataForFormat(
1594            &self,
1595            format: &AVMetadataFormat,
1596        ) -> Retained<NSArray<AVMetadataItem>>;
1597
1598        #[cfg(all(feature = "AVMetadataFormat", feature = "AVTimedMetadataGroup"))]
1599        #[unsafe(method(chapterMetadataGroupsWithTitleLocale:containingItemsWithCommonKeys:))]
1600        #[unsafe(method_family = none)]
1601        pub unsafe fn chapterMetadataGroupsWithTitleLocale_containingItemsWithCommonKeys(
1602            &self,
1603            locale: &NSLocale,
1604            common_keys: Option<&NSArray<AVMetadataKey>>,
1605        ) -> Retained<NSArray<AVTimedMetadataGroup>>;
1606
1607        #[cfg(feature = "AVTimedMetadataGroup")]
1608        #[unsafe(method(chapterMetadataGroupsBestMatchingPreferredLanguages:))]
1609        #[unsafe(method_family = none)]
1610        pub unsafe fn chapterMetadataGroupsBestMatchingPreferredLanguages(
1611            &self,
1612            preferred_languages: &NSArray<NSString>,
1613        ) -> Retained<NSArray<AVTimedMetadataGroup>>;
1614
1615        #[cfg(all(feature = "AVMediaFormat", feature = "AVMediaSelectionGroup"))]
1616        #[unsafe(method(mediaSelectionGroupForMediaCharacteristic:))]
1617        #[unsafe(method_family = none)]
1618        pub unsafe fn mediaSelectionGroupForMediaCharacteristic(
1619            &self,
1620            media_characteristic: &AVMediaCharacteristic,
1621        ) -> Option<Retained<AVMediaSelectionGroup>>;
1622
1623        #[cfg(feature = "objc2-core-media")]
1624        #[unsafe(method(unusedTrackID))]
1625        #[unsafe(method_family = none)]
1626        pub unsafe fn unusedTrackID(&self) -> CMPersistentTrackID;
1627    );
1628}