objc2_av_foundation/generated/AVAssetTrackGroup.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 /// A class whose instances describe a group of tracks in an asset.
11 ///
12 ///
13 /// Instances of AVAssetTrackGroup describe a single group of related tracks in an asset. For example, a track group can
14 /// describe a set of alternate tracks, which are tracks containing variations of the same content, such as content
15 /// translated into different languages, out of which only one track should be played at a time.
16 ///
17 /// Clients can inspect the track groups contained in an AVAsset by loading and obtaining the value of its trackGroups property.
18 ///
19 /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
20 ///
21 /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassettrackgroup?language=objc)
22 #[unsafe(super(NSObject))]
23 #[derive(Debug, PartialEq, Eq, Hash)]
24 pub struct AVAssetTrackGroup;
25);
26
27unsafe impl Send for AVAssetTrackGroup {}
28
29unsafe impl Sync for AVAssetTrackGroup {}
30
31unsafe impl NSCopying for AVAssetTrackGroup {}
32
33unsafe impl CopyingHelper for AVAssetTrackGroup {
34 type Result = Self;
35}
36
37unsafe impl NSObjectProtocol for AVAssetTrackGroup {}
38
39impl AVAssetTrackGroup {
40 extern_methods!(
41 /// The IDs of all of the tracks in the group.
42 ///
43 ///
44 /// The value of this property is an NSArray of NSNumbers interpreted as CMPersistentTrackIDs, one for each track in the
45 /// group.
46 #[unsafe(method(trackIDs))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn trackIDs(&self) -> Retained<NSArray<NSNumber>>;
49 );
50}
51
52/// Methods declared on superclass `NSObject`.
53impl AVAssetTrackGroup {
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}