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