objc2_av_foundation/generated/
AVMetrics.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "dispatch2")]
6use dispatch2::*;
7use objc2::__framework_prelude::*;
8#[cfg(feature = "objc2-core-media")]
9use objc2_core_media::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_protocol!(
15    /// This protocol needs to be implemented by interfaces intending to publish metric events to the event stream.
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetriceventstreampublisher?language=objc)
18    pub unsafe trait AVMetricEventStreamPublisher {}
19);
20
21extern_protocol!(
22    /// This protocol needs to be implemented by the subscriber delegate to receive subscribed metric events.
23    ///
24    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetriceventstreamsubscriber?language=objc)
25    pub unsafe trait AVMetricEventStreamSubscriber {
26        /// Delegate callback to receive metric events.
27        ///
28        /// - Parameter event: The metric event.
29        /// - Parameter publisher: The publisher which generated the current event.
30        #[unsafe(method(publisher:didReceiveEvent:))]
31        #[unsafe(method_family = none)]
32        unsafe fn publisher_didReceiveEvent(
33            &self,
34            publisher: &ProtocolObject<dyn AVMetricEventStreamPublisher>,
35            event: &AVMetricEvent,
36        );
37    }
38);
39
40extern_class!(
41    /// AVMetricEventStream allows clients to add publishers and then subscribe to specific metric event classes from those publishers. Publishers are AVFoundation instances implementing AVMetricEventStreamPublisher. The interface allows clients to receive metric events via a subscriber delegate which implements AVMetricEventStreamSubscriber.
42    ///
43    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetriceventstream?language=objc)
44    #[unsafe(super(NSObject))]
45    #[derive(Debug, PartialEq, Eq, Hash)]
46    pub struct AVMetricEventStream;
47);
48
49extern_conformance!(
50    unsafe impl NSObjectProtocol for AVMetricEventStream {}
51);
52
53impl AVMetricEventStream {
54    extern_methods!(
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62
63        /// Returns an autoreleased instance.
64        #[unsafe(method(eventStream))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn eventStream() -> Retained<Self>;
67
68        /// The publisher should be an AVFoundation instance conforming to AVMetricEventStreamPublisher.
69        #[unsafe(method(addPublisher:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn addPublisher(
72            &self,
73            publisher: &ProtocolObject<dyn AVMetricEventStreamPublisher>,
74        ) -> bool;
75
76        #[cfg(feature = "dispatch2")]
77        /// Set a subscriber delegate.
78        ///
79        /// - Parameter subscriber: A subscriber delegate object conforming to AVMetricEventStreamSubscriber.
80        /// - Parameter queue: Dispatch queue for the delegate callbacks.
81        ///
82        /// # Safety
83        ///
84        /// `queue` possibly has additional threading requirements.
85        #[unsafe(method(setSubscriber:queue:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn setSubscriber_queue(
88            &self,
89            subscriber: &ProtocolObject<dyn AVMetricEventStreamSubscriber>,
90            queue: Option<&DispatchQueue>,
91        ) -> bool;
92
93        /// Subscribe to a specific metric event class.
94        ///
95        /// - Parameter metricEventClass: Type of metric event class to subscribe to.
96        ///
97        /// # Safety
98        ///
99        /// `metric_event_class` probably has further requirements.
100        #[unsafe(method(subscribeToMetricEvent:))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn subscribeToMetricEvent(&self, metric_event_class: &AnyClass);
103
104        /// Subscribe to set of metric event classes.
105        ///
106        /// - Parameter metricEventClasses: Set of metric event classes to subscribe to.
107        ///
108        /// # Safety
109        ///
110        /// `metric_event_classes` generic probably has further requirements.
111        #[unsafe(method(subscribeToMetricEvents:))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn subscribeToMetricEvents(&self, metric_event_classes: &NSArray<AnyClass>);
114
115        /// Subscribe to all metric event classes.
116        #[unsafe(method(subscribeToAllMetricEvents))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn subscribeToAllMetricEvents(&self);
119    );
120}
121
122extern_class!(
123    /// An abstract base class representing metric events.
124    ///
125    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
126    ///
127    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricevent?language=objc)
128    #[unsafe(super(NSObject))]
129    #[derive(Debug, PartialEq, Eq, Hash)]
130    pub struct AVMetricEvent;
131);
132
133unsafe impl Send for AVMetricEvent {}
134
135unsafe impl Sync for AVMetricEvent {}
136
137extern_conformance!(
138    unsafe impl NSCoding for AVMetricEvent {}
139);
140
141extern_conformance!(
142    unsafe impl NSObjectProtocol for AVMetricEvent {}
143);
144
145extern_conformance!(
146    unsafe impl NSSecureCoding for AVMetricEvent {}
147);
148
149impl AVMetricEvent {
150    extern_methods!(
151        #[unsafe(method(init))]
152        #[unsafe(method_family = init)]
153        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
154
155        #[unsafe(method(new))]
156        #[unsafe(method_family = new)]
157        pub unsafe fn new() -> Retained<Self>;
158
159        /// Returns the date when the event occurred.
160        #[unsafe(method(date))]
161        #[unsafe(method_family = none)]
162        pub unsafe fn date(&self) -> Retained<NSDate>;
163
164        #[cfg(feature = "objc2-core-media")]
165        /// Returns the time in the media timeline when the event occured.
166        #[unsafe(method(mediaTime))]
167        #[unsafe(method_family = none)]
168        pub unsafe fn mediaTime(&self) -> CMTime;
169
170        /// A GUID that identifies the media session. If not available, value is nil.
171        #[unsafe(method(sessionID))]
172        #[unsafe(method_family = none)]
173        pub unsafe fn sessionID(&self) -> Option<Retained<NSString>>;
174    );
175}
176
177extern_class!(
178    /// Represents a metric event when an error occurred.
179    ///
180    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
181    ///
182    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricerrorevent?language=objc)
183    #[unsafe(super(AVMetricEvent, NSObject))]
184    #[derive(Debug, PartialEq, Eq, Hash)]
185    pub struct AVMetricErrorEvent;
186);
187
188unsafe impl Send for AVMetricErrorEvent {}
189
190unsafe impl Sync for AVMetricErrorEvent {}
191
192extern_conformance!(
193    unsafe impl NSCoding for AVMetricErrorEvent {}
194);
195
196extern_conformance!(
197    unsafe impl NSObjectProtocol for AVMetricErrorEvent {}
198);
199
200extern_conformance!(
201    unsafe impl NSSecureCoding for AVMetricErrorEvent {}
202);
203
204impl AVMetricErrorEvent {
205    extern_methods!(
206        #[unsafe(method(init))]
207        #[unsafe(method_family = init)]
208        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
209
210        #[unsafe(method(new))]
211        #[unsafe(method_family = new)]
212        pub unsafe fn new() -> Retained<Self>;
213
214        /// Returns whether the error was recoverable.
215        #[unsafe(method(didRecover))]
216        #[unsafe(method_family = none)]
217        pub unsafe fn didRecover(&self) -> bool;
218
219        /// Returns the error encountered.
220        #[unsafe(method(error))]
221        #[unsafe(method_family = none)]
222        pub unsafe fn error(&self) -> Retained<NSError>;
223    );
224}
225
226extern_class!(
227    /// Represents a metric event associated with media resource requests.
228    ///
229    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
230    ///
231    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricmediaresourcerequestevent?language=objc)
232    #[unsafe(super(AVMetricEvent, NSObject))]
233    #[derive(Debug, PartialEq, Eq, Hash)]
234    pub struct AVMetricMediaResourceRequestEvent;
235);
236
237unsafe impl Send for AVMetricMediaResourceRequestEvent {}
238
239unsafe impl Sync for AVMetricMediaResourceRequestEvent {}
240
241extern_conformance!(
242    unsafe impl NSCoding for AVMetricMediaResourceRequestEvent {}
243);
244
245extern_conformance!(
246    unsafe impl NSObjectProtocol for AVMetricMediaResourceRequestEvent {}
247);
248
249extern_conformance!(
250    unsafe impl NSSecureCoding for AVMetricMediaResourceRequestEvent {}
251);
252
253impl AVMetricMediaResourceRequestEvent {
254    extern_methods!(
255        #[unsafe(method(init))]
256        #[unsafe(method_family = init)]
257        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
258
259        #[unsafe(method(new))]
260        #[unsafe(method_family = new)]
261        pub unsafe fn new() -> Retained<Self>;
262
263        /// Returns the URL of the resource request. If no value is available, returns nil.
264        #[unsafe(method(url))]
265        #[unsafe(method_family = none)]
266        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
267
268        /// The IP address of the server. If not available, the value is nil.
269        #[unsafe(method(serverAddress))]
270        #[unsafe(method_family = none)]
271        pub unsafe fn serverAddress(&self) -> Option<Retained<NSString>>;
272
273        /// Returns the start time of the resource request.
274        #[unsafe(method(requestStartTime))]
275        #[unsafe(method_family = none)]
276        pub unsafe fn requestStartTime(&self) -> Retained<NSDate>;
277
278        /// Returns the end time of the resource request.
279        #[unsafe(method(requestEndTime))]
280        #[unsafe(method_family = none)]
281        pub unsafe fn requestEndTime(&self) -> Retained<NSDate>;
282
283        /// Returns the start time of the resource request response.
284        #[unsafe(method(responseStartTime))]
285        #[unsafe(method_family = none)]
286        pub unsafe fn responseStartTime(&self) -> Retained<NSDate>;
287
288        /// Returns the end time of the resource request response.
289        #[unsafe(method(responseEndTime))]
290        #[unsafe(method_family = none)]
291        pub unsafe fn responseEndTime(&self) -> Retained<NSDate>;
292
293        /// Returns the byte range downloaded for the resource request. If not available, the range start and end will be 0.
294        #[unsafe(method(byteRange))]
295        #[unsafe(method_family = none)]
296        pub unsafe fn byteRange(&self) -> NSRange;
297
298        /// Returns true if the resource was read from the cache.
299        #[unsafe(method(wasReadFromCache))]
300        #[unsafe(method_family = none)]
301        pub unsafe fn wasReadFromCache(&self) -> bool;
302
303        /// Returns the error event, if any, encountered during the resource request. If no value is present, returns nil.
304        #[unsafe(method(errorEvent))]
305        #[unsafe(method_family = none)]
306        pub unsafe fn errorEvent(&self) -> Option<Retained<AVMetricErrorEvent>>;
307
308        /// Returns the NSURLSessionTaskMetrics associated with the resource request. If no value is present, returns nil
309        #[unsafe(method(networkTransactionMetrics))]
310        #[unsafe(method_family = none)]
311        pub unsafe fn networkTransactionMetrics(&self)
312            -> Option<Retained<NSURLSessionTaskMetrics>>;
313    );
314}
315
316extern_class!(
317    /// Represents a metric event associated with a HLS playlist resource request.
318    ///
319    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
320    ///
321    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetrichlsplaylistrequestevent?language=objc)
322    #[unsafe(super(AVMetricEvent, NSObject))]
323    #[derive(Debug, PartialEq, Eq, Hash)]
324    pub struct AVMetricHLSPlaylistRequestEvent;
325);
326
327unsafe impl Send for AVMetricHLSPlaylistRequestEvent {}
328
329unsafe impl Sync for AVMetricHLSPlaylistRequestEvent {}
330
331extern_conformance!(
332    unsafe impl NSCoding for AVMetricHLSPlaylistRequestEvent {}
333);
334
335extern_conformance!(
336    unsafe impl NSObjectProtocol for AVMetricHLSPlaylistRequestEvent {}
337);
338
339extern_conformance!(
340    unsafe impl NSSecureCoding for AVMetricHLSPlaylistRequestEvent {}
341);
342
343impl AVMetricHLSPlaylistRequestEvent {
344    extern_methods!(
345        #[unsafe(method(init))]
346        #[unsafe(method_family = init)]
347        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
348
349        #[unsafe(method(new))]
350        #[unsafe(method_family = new)]
351        pub unsafe fn new() -> Retained<Self>;
352
353        /// Returns the URL of the playlist. If no value is available, returns nil.
354        #[unsafe(method(url))]
355        #[unsafe(method_family = none)]
356        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
357
358        /// Returns true if the playlist request is for a multivariant playlist.
359        #[unsafe(method(isMultivariantPlaylist))]
360        #[unsafe(method_family = none)]
361        pub unsafe fn isMultivariantPlaylist(&self) -> bool;
362
363        #[cfg(feature = "AVMediaFormat")]
364        /// Returns the media type. If the value cannot be determined, returns AVMediaTypeMuxed.
365        #[unsafe(method(mediaType))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn mediaType(&self) -> Retained<AVMediaType>;
368
369        /// Returns the media resource request event which was used to satisfy the playlist.
370        #[unsafe(method(mediaResourceRequestEvent))]
371        #[unsafe(method_family = none)]
372        pub unsafe fn mediaResourceRequestEvent(
373            &self,
374        ) -> Option<Retained<AVMetricMediaResourceRequestEvent>>;
375    );
376}
377
378extern_class!(
379    /// Represents a metric event associated with a HLS media segment resource request.
380    ///
381    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
382    ///
383    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetrichlsmediasegmentrequestevent?language=objc)
384    #[unsafe(super(AVMetricEvent, NSObject))]
385    #[derive(Debug, PartialEq, Eq, Hash)]
386    pub struct AVMetricHLSMediaSegmentRequestEvent;
387);
388
389unsafe impl Send for AVMetricHLSMediaSegmentRequestEvent {}
390
391unsafe impl Sync for AVMetricHLSMediaSegmentRequestEvent {}
392
393extern_conformance!(
394    unsafe impl NSCoding for AVMetricHLSMediaSegmentRequestEvent {}
395);
396
397extern_conformance!(
398    unsafe impl NSObjectProtocol for AVMetricHLSMediaSegmentRequestEvent {}
399);
400
401extern_conformance!(
402    unsafe impl NSSecureCoding for AVMetricHLSMediaSegmentRequestEvent {}
403);
404
405impl AVMetricHLSMediaSegmentRequestEvent {
406    extern_methods!(
407        #[unsafe(method(init))]
408        #[unsafe(method_family = init)]
409        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
410
411        #[unsafe(method(new))]
412        #[unsafe(method_family = new)]
413        pub unsafe fn new() -> Retained<Self>;
414
415        /// Returns the URL of the media segment. If no value is available, returns nil.
416        #[unsafe(method(url))]
417        #[unsafe(method_family = none)]
418        pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
419
420        /// Returns true if the media segment request is for a map segment.
421        #[unsafe(method(isMapSegment))]
422        #[unsafe(method_family = none)]
423        pub unsafe fn isMapSegment(&self) -> bool;
424
425        #[cfg(feature = "AVMediaFormat")]
426        /// Returns the media type. If the value cannot be determined, returns AVMediaTypeMuxed.
427        #[unsafe(method(mediaType))]
428        #[unsafe(method_family = none)]
429        pub unsafe fn mediaType(&self) -> Retained<AVMediaType>;
430
431        /// Returns the byte range for the media segment. If not available, the range start and end will be 0.
432        #[unsafe(method(byteRange))]
433        #[unsafe(method_family = none)]
434        pub unsafe fn byteRange(&self) -> NSRange;
435
436        /// Returns the URL of the index file in which this segment was declared. If not available, returns nil.
437        #[unsafe(method(indexFileURL))]
438        #[unsafe(method_family = none)]
439        pub unsafe fn indexFileURL(&self) -> Retained<NSURL>;
440
441        /// Returns the duration of segment in seconds.
442        #[unsafe(method(segmentDuration))]
443        #[unsafe(method_family = none)]
444        pub unsafe fn segmentDuration(&self) -> NSTimeInterval;
445
446        /// Returns the media resource request event which was used to satisfy the media segment.
447        #[unsafe(method(mediaResourceRequestEvent))]
448        #[unsafe(method_family = none)]
449        pub unsafe fn mediaResourceRequestEvent(
450            &self,
451        ) -> Option<Retained<AVMetricMediaResourceRequestEvent>>;
452    );
453}
454
455extern_class!(
456    /// Represents a metric event associated with a HLS content key resource request.
457    ///
458    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
459    ///
460    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetriccontentkeyrequestevent?language=objc)
461    #[unsafe(super(AVMetricEvent, NSObject))]
462    #[derive(Debug, PartialEq, Eq, Hash)]
463    pub struct AVMetricContentKeyRequestEvent;
464);
465
466unsafe impl Send for AVMetricContentKeyRequestEvent {}
467
468unsafe impl Sync for AVMetricContentKeyRequestEvent {}
469
470extern_conformance!(
471    unsafe impl NSCoding for AVMetricContentKeyRequestEvent {}
472);
473
474extern_conformance!(
475    unsafe impl NSObjectProtocol for AVMetricContentKeyRequestEvent {}
476);
477
478extern_conformance!(
479    unsafe impl NSSecureCoding for AVMetricContentKeyRequestEvent {}
480);
481
482impl AVMetricContentKeyRequestEvent {
483    extern_methods!(
484        #[unsafe(method(init))]
485        #[unsafe(method_family = init)]
486        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
487
488        #[unsafe(method(new))]
489        #[unsafe(method_family = new)]
490        pub unsafe fn new() -> Retained<Self>;
491
492        #[cfg(feature = "AVContentKeySession")]
493        /// Returns the content key specifier for the request.
494        #[unsafe(method(contentKeySpecifier))]
495        #[unsafe(method_family = none)]
496        pub unsafe fn contentKeySpecifier(&self) -> Retained<AVContentKeySpecifier>;
497
498        #[cfg(feature = "AVMediaFormat")]
499        /// Returns the media type. If the value cannot be determined, returns AVMediaTypeMuxed.
500        #[unsafe(method(mediaType))]
501        #[unsafe(method_family = none)]
502        pub unsafe fn mediaType(&self) -> Retained<AVMediaType>;
503
504        /// Returns whether the content key resource request was initiated by the client.
505        #[unsafe(method(isClientInitiated))]
506        #[unsafe(method_family = none)]
507        pub unsafe fn isClientInitiated(&self) -> bool;
508
509        /// Returns the media resource request event which was used to satisfy the content key.
510        #[unsafe(method(mediaResourceRequestEvent))]
511        #[unsafe(method_family = none)]
512        pub unsafe fn mediaResourceRequestEvent(
513            &self,
514        ) -> Option<Retained<AVMetricMediaResourceRequestEvent>>;
515    );
516}
517
518extern_class!(
519    /// Represents a metric event when playback was likely to play through without stalling.
520    ///
521    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
522    ///
523    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemlikelytokeepupevent?language=objc)
524    #[unsafe(super(AVMetricEvent, NSObject))]
525    #[derive(Debug, PartialEq, Eq, Hash)]
526    pub struct AVMetricPlayerItemLikelyToKeepUpEvent;
527);
528
529unsafe impl Send for AVMetricPlayerItemLikelyToKeepUpEvent {}
530
531unsafe impl Sync for AVMetricPlayerItemLikelyToKeepUpEvent {}
532
533extern_conformance!(
534    unsafe impl NSCoding for AVMetricPlayerItemLikelyToKeepUpEvent {}
535);
536
537extern_conformance!(
538    unsafe impl NSObjectProtocol for AVMetricPlayerItemLikelyToKeepUpEvent {}
539);
540
541extern_conformance!(
542    unsafe impl NSSecureCoding for AVMetricPlayerItemLikelyToKeepUpEvent {}
543);
544
545impl AVMetricPlayerItemLikelyToKeepUpEvent {
546    extern_methods!(
547        #[unsafe(method(init))]
548        #[unsafe(method_family = init)]
549        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
550
551        #[unsafe(method(new))]
552        #[unsafe(method_family = new)]
553        pub unsafe fn new() -> Retained<Self>;
554
555        #[cfg(feature = "AVAssetVariant")]
556        /// Returns the variant selected at the time likely to keep up is achieved. If no value is present, returns nil.
557        #[unsafe(method(variant))]
558        #[unsafe(method_family = none)]
559        pub unsafe fn variant(&self) -> Option<Retained<AVAssetVariant>>;
560
561        /// Returns the total time taken to reach likely to keep up.
562        #[unsafe(method(timeTaken))]
563        #[unsafe(method_family = none)]
564        pub unsafe fn timeTaken(&self) -> NSTimeInterval;
565
566        /// This property provides a collection of time ranges for which the player has the media data readily available. The ranges provided might be discontinuous.
567        ///
568        /// Returns an NSArray of NSValues containing CMTimeRanges.
569        #[unsafe(method(loadedTimeRanges))]
570        #[unsafe(method_family = none)]
571        pub unsafe fn loadedTimeRanges(&self) -> Retained<NSArray<NSValue>>;
572    );
573}
574
575extern_class!(
576    /// Represents a metric event when playback was first likely to play through without stalling.
577    ///
578    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
579    ///
580    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeriteminitiallikelytokeepupevent?language=objc)
581    #[unsafe(super(AVMetricPlayerItemLikelyToKeepUpEvent, AVMetricEvent, NSObject))]
582    #[derive(Debug, PartialEq, Eq, Hash)]
583    pub struct AVMetricPlayerItemInitialLikelyToKeepUpEvent;
584);
585
586unsafe impl Send for AVMetricPlayerItemInitialLikelyToKeepUpEvent {}
587
588unsafe impl Sync for AVMetricPlayerItemInitialLikelyToKeepUpEvent {}
589
590extern_conformance!(
591    unsafe impl NSCoding for AVMetricPlayerItemInitialLikelyToKeepUpEvent {}
592);
593
594extern_conformance!(
595    unsafe impl NSObjectProtocol for AVMetricPlayerItemInitialLikelyToKeepUpEvent {}
596);
597
598extern_conformance!(
599    unsafe impl NSSecureCoding for AVMetricPlayerItemInitialLikelyToKeepUpEvent {}
600);
601
602impl AVMetricPlayerItemInitialLikelyToKeepUpEvent {
603    extern_methods!(
604        #[unsafe(method(init))]
605        #[unsafe(method_family = init)]
606        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
607
608        #[unsafe(method(new))]
609        #[unsafe(method_family = new)]
610        pub unsafe fn new() -> Retained<Self>;
611
612        /// Returns the playlist request events required to reach likely to keep up.
613        #[unsafe(method(playlistRequestEvents))]
614        #[unsafe(method_family = none)]
615        pub unsafe fn playlistRequestEvents(
616            &self,
617        ) -> Retained<NSArray<AVMetricHLSPlaylistRequestEvent>>;
618
619        /// Returns the media segment request events required to reach likely to keep up.
620        #[unsafe(method(mediaSegmentRequestEvents))]
621        #[unsafe(method_family = none)]
622        pub unsafe fn mediaSegmentRequestEvents(
623            &self,
624        ) -> Retained<NSArray<AVMetricHLSMediaSegmentRequestEvent>>;
625
626        /// Returns the content key request required to reach likely to keep up.
627        #[unsafe(method(contentKeyRequestEvents))]
628        #[unsafe(method_family = none)]
629        pub unsafe fn contentKeyRequestEvents(
630            &self,
631        ) -> Retained<NSArray<AVMetricContentKeyRequestEvent>>;
632    );
633}
634
635extern_class!(
636    /// Represents a metric event when playback rate change occurred.
637    ///
638    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
639    ///
640    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemratechangeevent?language=objc)
641    #[unsafe(super(AVMetricEvent, NSObject))]
642    #[derive(Debug, PartialEq, Eq, Hash)]
643    pub struct AVMetricPlayerItemRateChangeEvent;
644);
645
646unsafe impl Send for AVMetricPlayerItemRateChangeEvent {}
647
648unsafe impl Sync for AVMetricPlayerItemRateChangeEvent {}
649
650extern_conformance!(
651    unsafe impl NSCoding for AVMetricPlayerItemRateChangeEvent {}
652);
653
654extern_conformance!(
655    unsafe impl NSObjectProtocol for AVMetricPlayerItemRateChangeEvent {}
656);
657
658extern_conformance!(
659    unsafe impl NSSecureCoding for AVMetricPlayerItemRateChangeEvent {}
660);
661
662impl AVMetricPlayerItemRateChangeEvent {
663    extern_methods!(
664        #[unsafe(method(init))]
665        #[unsafe(method_family = init)]
666        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
667
668        #[unsafe(method(new))]
669        #[unsafe(method_family = new)]
670        pub unsafe fn new() -> Retained<Self>;
671
672        /// Returns the playback rate after the rate change event.
673        #[unsafe(method(rate))]
674        #[unsafe(method_family = none)]
675        pub unsafe fn rate(&self) -> c_double;
676
677        /// Returns the playback rate before the rate change event.
678        #[unsafe(method(previousRate))]
679        #[unsafe(method_family = none)]
680        pub unsafe fn previousRate(&self) -> c_double;
681
682        #[cfg(feature = "AVAssetVariant")]
683        /// Returns the variant being played at the time of rate change. If no value is present, returns nil.
684        #[unsafe(method(variant))]
685        #[unsafe(method_family = none)]
686        pub unsafe fn variant(&self) -> Option<Retained<AVAssetVariant>>;
687    );
688}
689
690extern_class!(
691    /// Represents a metric event when playback stalled.
692    ///
693    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
694    ///
695    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemstallevent?language=objc)
696    #[unsafe(super(AVMetricPlayerItemRateChangeEvent, AVMetricEvent, NSObject))]
697    #[derive(Debug, PartialEq, Eq, Hash)]
698    pub struct AVMetricPlayerItemStallEvent;
699);
700
701unsafe impl Send for AVMetricPlayerItemStallEvent {}
702
703unsafe impl Sync for AVMetricPlayerItemStallEvent {}
704
705extern_conformance!(
706    unsafe impl NSCoding for AVMetricPlayerItemStallEvent {}
707);
708
709extern_conformance!(
710    unsafe impl NSObjectProtocol for AVMetricPlayerItemStallEvent {}
711);
712
713extern_conformance!(
714    unsafe impl NSSecureCoding for AVMetricPlayerItemStallEvent {}
715);
716
717impl AVMetricPlayerItemStallEvent {
718    extern_methods!(
719        #[unsafe(method(init))]
720        #[unsafe(method_family = init)]
721        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
722
723        #[unsafe(method(new))]
724        #[unsafe(method_family = new)]
725        pub unsafe fn new() -> Retained<Self>;
726    );
727}
728
729extern_class!(
730    /// Represents a metric event when playback seeked.
731    ///
732    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
733    ///
734    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemseekevent?language=objc)
735    #[unsafe(super(AVMetricPlayerItemRateChangeEvent, AVMetricEvent, NSObject))]
736    #[derive(Debug, PartialEq, Eq, Hash)]
737    pub struct AVMetricPlayerItemSeekEvent;
738);
739
740unsafe impl Send for AVMetricPlayerItemSeekEvent {}
741
742unsafe impl Sync for AVMetricPlayerItemSeekEvent {}
743
744extern_conformance!(
745    unsafe impl NSCoding for AVMetricPlayerItemSeekEvent {}
746);
747
748extern_conformance!(
749    unsafe impl NSObjectProtocol for AVMetricPlayerItemSeekEvent {}
750);
751
752extern_conformance!(
753    unsafe impl NSSecureCoding for AVMetricPlayerItemSeekEvent {}
754);
755
756impl AVMetricPlayerItemSeekEvent {
757    extern_methods!(
758        #[unsafe(method(init))]
759        #[unsafe(method_family = init)]
760        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
761
762        #[unsafe(method(new))]
763        #[unsafe(method_family = new)]
764        pub unsafe fn new() -> Retained<Self>;
765    );
766}
767
768extern_class!(
769    /// Represents a metric event when playback seek completed.
770    ///
771    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
772    ///
773    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemseekdidcompleteevent?language=objc)
774    #[unsafe(super(AVMetricPlayerItemRateChangeEvent, AVMetricEvent, NSObject))]
775    #[derive(Debug, PartialEq, Eq, Hash)]
776    pub struct AVMetricPlayerItemSeekDidCompleteEvent;
777);
778
779unsafe impl Send for AVMetricPlayerItemSeekDidCompleteEvent {}
780
781unsafe impl Sync for AVMetricPlayerItemSeekDidCompleteEvent {}
782
783extern_conformance!(
784    unsafe impl NSCoding for AVMetricPlayerItemSeekDidCompleteEvent {}
785);
786
787extern_conformance!(
788    unsafe impl NSObjectProtocol for AVMetricPlayerItemSeekDidCompleteEvent {}
789);
790
791extern_conformance!(
792    unsafe impl NSSecureCoding for AVMetricPlayerItemSeekDidCompleteEvent {}
793);
794
795impl AVMetricPlayerItemSeekDidCompleteEvent {
796    extern_methods!(
797        #[unsafe(method(init))]
798        #[unsafe(method_family = init)]
799        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
800
801        #[unsafe(method(new))]
802        #[unsafe(method_family = new)]
803        pub unsafe fn new() -> Retained<Self>;
804
805        /// Returns whether the seek was performed within the available buffer.
806        #[unsafe(method(didSeekInBuffer))]
807        #[unsafe(method_family = none)]
808        pub unsafe fn didSeekInBuffer(&self) -> bool;
809    );
810}
811
812extern_class!(
813    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricmediarendition?language=objc)
814    #[unsafe(super(NSObject))]
815    #[derive(Debug, PartialEq, Eq, Hash)]
816    pub struct AVMetricMediaRendition;
817);
818
819unsafe impl Send for AVMetricMediaRendition {}
820
821unsafe impl Sync for AVMetricMediaRendition {}
822
823extern_conformance!(
824    unsafe impl NSCoding for AVMetricMediaRendition {}
825);
826
827extern_conformance!(
828    unsafe impl NSObjectProtocol for AVMetricMediaRendition {}
829);
830
831extern_conformance!(
832    unsafe impl NSSecureCoding for AVMetricMediaRendition {}
833);
834
835impl AVMetricMediaRendition {
836    extern_methods!(
837        #[unsafe(method(init))]
838        #[unsafe(method_family = init)]
839        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
840
841        #[unsafe(method(new))]
842        #[unsafe(method_family = new)]
843        pub unsafe fn new() -> Retained<Self>;
844
845        /// Provides ID corresponding to the rendition. This is equivalent to the
846        /// STABLE-RENDITION-ID in the HLS playlist. If not available, value is nil.
847        #[unsafe(method(stableID))]
848        #[unsafe(method_family = none)]
849        pub unsafe fn stableID(&self) -> Option<Retained<NSString>>;
850
851        /// Provides URL corresponding to the rendition's HLS playlist. If not available,
852        /// value is nil.
853        #[unsafe(method(URL))]
854        #[unsafe(method_family = none)]
855        pub unsafe fn URL(&self) -> Option<Retained<NSURL>>;
856    );
857}
858
859extern_class!(
860    /// Represents a metric event when variant switch was completed.
861    ///
862    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
863    ///
864    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemvariantswitchevent?language=objc)
865    #[unsafe(super(AVMetricEvent, NSObject))]
866    #[derive(Debug, PartialEq, Eq, Hash)]
867    pub struct AVMetricPlayerItemVariantSwitchEvent;
868);
869
870unsafe impl Send for AVMetricPlayerItemVariantSwitchEvent {}
871
872unsafe impl Sync for AVMetricPlayerItemVariantSwitchEvent {}
873
874extern_conformance!(
875    unsafe impl NSCoding for AVMetricPlayerItemVariantSwitchEvent {}
876);
877
878extern_conformance!(
879    unsafe impl NSObjectProtocol for AVMetricPlayerItemVariantSwitchEvent {}
880);
881
882extern_conformance!(
883    unsafe impl NSSecureCoding for AVMetricPlayerItemVariantSwitchEvent {}
884);
885
886impl AVMetricPlayerItemVariantSwitchEvent {
887    extern_methods!(
888        #[unsafe(method(init))]
889        #[unsafe(method_family = init)]
890        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
891
892        #[unsafe(method(new))]
893        #[unsafe(method_family = new)]
894        pub unsafe fn new() -> Retained<Self>;
895
896        #[cfg(feature = "AVAssetVariant")]
897        /// Returns the variant before the switch. If no value is available, returns nil
898        #[unsafe(method(fromVariant))]
899        #[unsafe(method_family = none)]
900        pub unsafe fn fromVariant(&self) -> Option<Retained<AVAssetVariant>>;
901
902        #[cfg(feature = "AVAssetVariant")]
903        /// Returns the variant after the switch.
904        #[unsafe(method(toVariant))]
905        #[unsafe(method_family = none)]
906        pub unsafe fn toVariant(&self) -> Retained<AVAssetVariant>;
907
908        /// This property provides a collection of time ranges for which the player has the media data readily available. The ranges provided might be discontinuous.
909        ///
910        /// Returns an NSArray of NSValues containing CMTimeRanges.
911        #[unsafe(method(loadedTimeRanges))]
912        #[unsafe(method_family = none)]
913        pub unsafe fn loadedTimeRanges(&self) -> Retained<NSArray<NSValue>>;
914
915        /// Represents the currently selected video rendition's identifiers.
916        ///
917        /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
918        #[unsafe(method(videoRendition))]
919        #[unsafe(method_family = none)]
920        pub unsafe fn videoRendition(&self) -> Retained<AVMetricMediaRendition>;
921
922        /// Represents the currently selected video rendition's identifiers.
923        ///
924        /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
925        #[unsafe(method(audioRendition))]
926        #[unsafe(method_family = none)]
927        pub unsafe fn audioRendition(&self) -> Retained<AVMetricMediaRendition>;
928
929        /// Represents the currently selected audio rendition's identifiers.
930        ///
931        /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
932        #[unsafe(method(subtitleRendition))]
933        #[unsafe(method_family = none)]
934        pub unsafe fn subtitleRendition(&self) -> Retained<AVMetricMediaRendition>;
935
936        /// Returns if the switch did succeed.
937        #[unsafe(method(didSucceed))]
938        #[unsafe(method_family = none)]
939        pub unsafe fn didSucceed(&self) -> bool;
940    );
941}
942
943extern_class!(
944    /// Represents a metric event when variant switch was attempted.
945    ///
946    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
947    ///
948    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemvariantswitchstartevent?language=objc)
949    #[unsafe(super(AVMetricEvent, NSObject))]
950    #[derive(Debug, PartialEq, Eq, Hash)]
951    pub struct AVMetricPlayerItemVariantSwitchStartEvent;
952);
953
954unsafe impl Send for AVMetricPlayerItemVariantSwitchStartEvent {}
955
956unsafe impl Sync for AVMetricPlayerItemVariantSwitchStartEvent {}
957
958extern_conformance!(
959    unsafe impl NSCoding for AVMetricPlayerItemVariantSwitchStartEvent {}
960);
961
962extern_conformance!(
963    unsafe impl NSObjectProtocol for AVMetricPlayerItemVariantSwitchStartEvent {}
964);
965
966extern_conformance!(
967    unsafe impl NSSecureCoding for AVMetricPlayerItemVariantSwitchStartEvent {}
968);
969
970impl AVMetricPlayerItemVariantSwitchStartEvent {
971    extern_methods!(
972        #[unsafe(method(init))]
973        #[unsafe(method_family = init)]
974        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
975
976        #[unsafe(method(new))]
977        #[unsafe(method_family = new)]
978        pub unsafe fn new() -> Retained<Self>;
979
980        #[cfg(feature = "AVAssetVariant")]
981        /// Returns the variant from which the switch is attempted. If no value is available, returns nil
982        #[unsafe(method(fromVariant))]
983        #[unsafe(method_family = none)]
984        pub unsafe fn fromVariant(&self) -> Option<Retained<AVAssetVariant>>;
985
986        #[cfg(feature = "AVAssetVariant")]
987        /// Returns the variant to which the switch is attempted.
988        #[unsafe(method(toVariant))]
989        #[unsafe(method_family = none)]
990        pub unsafe fn toVariant(&self) -> Retained<AVAssetVariant>;
991
992        /// This property provides a collection of time ranges for which the player has the media data readily available. The ranges provided might be discontinuous.
993        ///
994        /// Returns an NSArray of NSValues containing CMTimeRanges.
995        #[unsafe(method(loadedTimeRanges))]
996        #[unsafe(method_family = none)]
997        pub unsafe fn loadedTimeRanges(&self) -> Retained<NSArray<NSValue>>;
998
999        /// Contains information corresponding to the currently selected video rendition.
1000        #[unsafe(method(videoRendition))]
1001        #[unsafe(method_family = none)]
1002        pub unsafe fn videoRendition(&self) -> Retained<AVMetricMediaRendition>;
1003
1004        /// Contains information corresponding to the currently selected audio rendition.
1005        #[unsafe(method(audioRendition))]
1006        #[unsafe(method_family = none)]
1007        pub unsafe fn audioRendition(&self) -> Retained<AVMetricMediaRendition>;
1008
1009        /// Contains information corresponding to the currently selected subtitle rendition.
1010        #[unsafe(method(subtitleRendition))]
1011        #[unsafe(method_family = none)]
1012        pub unsafe fn subtitleRendition(&self) -> Retained<AVMetricMediaRendition>;
1013    );
1014}
1015
1016extern_class!(
1017    /// Represents a summary metric event with aggregated metrics for the entire playback session.
1018    ///
1019    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
1020    ///
1021    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricplayeritemplaybacksummaryevent?language=objc)
1022    #[unsafe(super(AVMetricEvent, NSObject))]
1023    #[derive(Debug, PartialEq, Eq, Hash)]
1024    pub struct AVMetricPlayerItemPlaybackSummaryEvent;
1025);
1026
1027unsafe impl Send for AVMetricPlayerItemPlaybackSummaryEvent {}
1028
1029unsafe impl Sync for AVMetricPlayerItemPlaybackSummaryEvent {}
1030
1031extern_conformance!(
1032    unsafe impl NSCoding for AVMetricPlayerItemPlaybackSummaryEvent {}
1033);
1034
1035extern_conformance!(
1036    unsafe impl NSObjectProtocol for AVMetricPlayerItemPlaybackSummaryEvent {}
1037);
1038
1039extern_conformance!(
1040    unsafe impl NSSecureCoding for AVMetricPlayerItemPlaybackSummaryEvent {}
1041);
1042
1043impl AVMetricPlayerItemPlaybackSummaryEvent {
1044    extern_methods!(
1045        #[unsafe(method(init))]
1046        #[unsafe(method_family = init)]
1047        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1048
1049        #[unsafe(method(new))]
1050        #[unsafe(method_family = new)]
1051        pub unsafe fn new() -> Retained<Self>;
1052
1053        /// Returns the error event if any. If no value is available, returns nil.
1054        #[unsafe(method(errorEvent))]
1055        #[unsafe(method_family = none)]
1056        pub unsafe fn errorEvent(&self) -> Option<Retained<AVMetricErrorEvent>>;
1057
1058        /// Returns the total count of recoverable errors encountered during playback. If no errors were encountered, returns 0.
1059        #[unsafe(method(recoverableErrorCount))]
1060        #[unsafe(method_family = none)]
1061        pub unsafe fn recoverableErrorCount(&self) -> NSInteger;
1062
1063        /// Returns the total count of stalls encountered during playback. If no stalls were encountered, returns 0.
1064        #[unsafe(method(stallCount))]
1065        #[unsafe(method_family = none)]
1066        pub unsafe fn stallCount(&self) -> NSInteger;
1067
1068        /// Returns the total count of variant switch encountered during playback.
1069        #[unsafe(method(variantSwitchCount))]
1070        #[unsafe(method_family = none)]
1071        pub unsafe fn variantSwitchCount(&self) -> NSInteger;
1072
1073        /// Returns the total duration of playback in seconds.
1074        #[unsafe(method(playbackDuration))]
1075        #[unsafe(method_family = none)]
1076        pub unsafe fn playbackDuration(&self) -> NSInteger;
1077
1078        /// Returns the total number of media requests performed by the player. This includes playlist requests, media segment requests, and content key requests.
1079        #[unsafe(method(mediaResourceRequestCount))]
1080        #[unsafe(method_family = none)]
1081        pub unsafe fn mediaResourceRequestCount(&self) -> NSInteger;
1082
1083        /// Returns the total time spent recovering from a stall event.
1084        #[unsafe(method(timeSpentRecoveringFromStall))]
1085        #[unsafe(method_family = none)]
1086        pub unsafe fn timeSpentRecoveringFromStall(&self) -> NSTimeInterval;
1087
1088        /// Returns the total time spent in initial startup of playback.
1089        #[unsafe(method(timeSpentInInitialStartup))]
1090        #[unsafe(method_family = none)]
1091        pub unsafe fn timeSpentInInitialStartup(&self) -> NSTimeInterval;
1092
1093        /// Returns the playtime weighted average bitrate played in bits / second.
1094        #[unsafe(method(timeWeightedAverageBitrate))]
1095        #[unsafe(method_family = none)]
1096        pub unsafe fn timeWeightedAverageBitrate(&self) -> NSInteger;
1097
1098        /// Returns the playtime weighted peak bitrate played in bits / second.
1099        #[unsafe(method(timeWeightedPeakBitrate))]
1100        #[unsafe(method_family = none)]
1101        pub unsafe fn timeWeightedPeakBitrate(&self) -> NSInteger;
1102    );
1103}
1104
1105extern_class!(
1106    /// Represents a summary metric event with aggregated metrics for the entire download task.
1107    ///
1108    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
1109    ///
1110    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetricdownloadsummaryevent?language=objc)
1111    #[unsafe(super(AVMetricEvent, NSObject))]
1112    #[derive(Debug, PartialEq, Eq, Hash)]
1113    pub struct AVMetricDownloadSummaryEvent;
1114);
1115
1116unsafe impl Send for AVMetricDownloadSummaryEvent {}
1117
1118unsafe impl Sync for AVMetricDownloadSummaryEvent {}
1119
1120extern_conformance!(
1121    unsafe impl NSCoding for AVMetricDownloadSummaryEvent {}
1122);
1123
1124extern_conformance!(
1125    unsafe impl NSObjectProtocol for AVMetricDownloadSummaryEvent {}
1126);
1127
1128extern_conformance!(
1129    unsafe impl NSSecureCoding for AVMetricDownloadSummaryEvent {}
1130);
1131
1132impl AVMetricDownloadSummaryEvent {
1133    extern_methods!(
1134        #[unsafe(method(init))]
1135        #[unsafe(method_family = init)]
1136        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1137
1138        #[unsafe(method(new))]
1139        #[unsafe(method_family = new)]
1140        pub unsafe fn new() -> Retained<Self>;
1141
1142        /// Returns the error event if any. If no value is available, returns nil.
1143        #[unsafe(method(errorEvent))]
1144        #[unsafe(method_family = none)]
1145        pub unsafe fn errorEvent(&self) -> Option<Retained<AVMetricErrorEvent>>;
1146
1147        /// Returns the total count of recoverable errors encountered during the download. If no errors were encountered, returns 0.
1148        ///
1149        /// Error counts may not be consistent across OS versions. Comparisons should be made within a given OS version, as error reporting is subject to change with OS updates.
1150        #[unsafe(method(recoverableErrorCount))]
1151        #[unsafe(method_family = none)]
1152        pub unsafe fn recoverableErrorCount(&self) -> NSInteger;
1153
1154        /// Returns the total number of media requests performed by the download task. This includes playlist requests, media segment requests, and content key requests.
1155        #[unsafe(method(mediaResourceRequestCount))]
1156        #[unsafe(method_family = none)]
1157        pub unsafe fn mediaResourceRequestCount(&self) -> NSInteger;
1158
1159        /// Returns the total number of bytes downloaded by the download task.
1160        #[unsafe(method(bytesDownloadedCount))]
1161        #[unsafe(method_family = none)]
1162        pub unsafe fn bytesDownloadedCount(&self) -> NSInteger;
1163
1164        /// Returns the total duration of the download in seconds.
1165        #[unsafe(method(downloadDuration))]
1166        #[unsafe(method_family = none)]
1167        pub unsafe fn downloadDuration(&self) -> NSTimeInterval;
1168
1169        #[cfg(feature = "AVAssetVariant")]
1170        /// Returns the variants that were downloaded.
1171        #[unsafe(method(variants))]
1172        #[unsafe(method_family = none)]
1173        pub unsafe fn variants(&self) -> Retained<NSArray<AVAssetVariant>>;
1174    );
1175}