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
31extern_conformance!(
32    unsafe impl NSCopying for AVAssetTrackGroup {}
33);
34
35unsafe impl CopyingHelper for AVAssetTrackGroup {
36    type Result = Self;
37}
38
39extern_conformance!(
40    unsafe impl NSObjectProtocol for AVAssetTrackGroup {}
41);
42
43impl AVAssetTrackGroup {
44    extern_methods!(
45        /// The IDs of all of the tracks in the group.
46        ///
47        ///
48        /// The value of this property is an NSArray of NSNumbers interpreted as CMPersistentTrackIDs, one for each track in the
49        /// group.
50        ///
51        /// This property is not atomic.
52        ///
53        /// # Safety
54        ///
55        /// This might not be thread-safe.
56        #[unsafe(method(trackIDs))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn trackIDs(&self) -> Retained<NSArray<NSNumber>>;
59    );
60}
61
62/// Methods declared on superclass `NSObject`.
63impl AVAssetTrackGroup {
64    extern_methods!(
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72    );
73}