1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcompositiontracksegment?language=objc)
#[unsafe(super(AVAssetTrackSegment, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "AVAssetTrackSegment")]
pub struct AVCompositionTrackSegment;
);
#[cfg(feature = "AVAssetTrackSegment")]
unsafe impl Send for AVCompositionTrackSegment {}
#[cfg(feature = "AVAssetTrackSegment")]
unsafe impl Sync for AVCompositionTrackSegment {}
#[cfg(feature = "AVAssetTrackSegment")]
extern_conformance!(
unsafe impl NSObjectProtocol for AVCompositionTrackSegment {}
);
#[cfg(feature = "AVAssetTrackSegment")]
impl AVCompositionTrackSegment {
extern_methods!(
#[cfg(feature = "objc2-core-media")]
/// Returns an instance of AVCompositionTrackSegment that presents a portion of a file referenced by URL.
///
/// Parameter `URL`: An instance of NSURL that references the container file to be presented by the AVCompositionTrackSegment.
///
/// Parameter `trackID`: The track identifier that specifies the track of the container file to be presented by the AVCompositionTrackSegment.
///
/// Parameter `sourceTimeRange`: The timeRange of the track of the container file to be presented by the AVCompositionTrackSegment.
///
/// Parameter `targetTimeRange`: The timeRange of the composition track during which the AVCompositionTrackSegment is to be presented.
///
/// Returns: An instance of AVCompositionTrackSegment.
///
/// To specify that the segment be played at the asset's normal rate, set source.duration == target.duration in the timeMapping.
/// Otherwise, the segment will be played at a rate equal to the ratio source.duration / target.duration.
#[unsafe(method(compositionTrackSegmentWithURL:trackID:sourceTimeRange:targetTimeRange:))]
#[unsafe(method_family = none)]
pub unsafe fn compositionTrackSegmentWithURL_trackID_sourceTimeRange_targetTimeRange(
url: &NSURL,
track_id: CMPersistentTrackID,
source_time_range: CMTimeRange,
target_time_range: CMTimeRange,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-media")]
/// Returns an instance of AVCompositionTrackSegment that presents an empty track segment.
///
/// Parameter `timeRange`: The timeRange of the empty AVCompositionTrackSegment.
///
/// Returns: An instance of AVCompositionTrackSegment.
#[unsafe(method(compositionTrackSegmentWithTimeRange:))]
#[unsafe(method_family = none)]
pub unsafe fn compositionTrackSegmentWithTimeRange(
time_range: CMTimeRange,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-media")]
/// Initializes an instance of AVCompositionTrackSegment that presents a portion of a file referenced by URL.
///
/// Parameter `URL`: An instance of NSURL that references the container file to be presented by the AVCompositionTrackSegment.
///
/// Parameter `trackID`: The track identifier that specifies the track of the container file to be presented by the AVCompositionTrackSegment.
///
/// Parameter `sourceTimeRange`: The timeRange of the track of the container file to be presented by the AVCompositionTrackSegment.
///
/// Parameter `targetTimeRange`: The timeRange of the composition track during which the AVCompositionTrackSegment is to be presented.
///
/// Returns: An instance of AVCompositionTrackSegment.
///
/// To specify that the segment be played at the asset's normal rate, set source.duration == target.duration in the timeMapping.
/// Otherwise, the segment will be played at a rate equal to the ratio source.duration / target.duration.
#[unsafe(method(initWithURL:trackID:sourceTimeRange:targetTimeRange:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithURL_trackID_sourceTimeRange_targetTimeRange(
this: Allocated<Self>,
url: &NSURL,
track_id: CMPersistentTrackID,
source_time_range: CMTimeRange,
target_time_range: CMTimeRange,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-media")]
/// Initializes an instance of AVCompositionTrackSegment that presents an empty track segment.
///
/// Parameter `timeRange`: The timeRange of the empty AVCompositionTrackSegment.
///
/// Returns: An instance of AVCompositionTrackSegment.
#[unsafe(method(initWithTimeRange:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTimeRange(
this: Allocated<Self>,
time_range: CMTimeRange,
) -> Retained<Self>;
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(isEmpty))]
#[unsafe(method_family = none)]
pub unsafe fn isEmpty(&self) -> bool;
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(sourceURL))]
#[unsafe(method_family = none)]
pub unsafe fn sourceURL(&self) -> Option<Retained<NSURL>>;
#[cfg(feature = "objc2-core-media")]
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(sourceTrackID))]
#[unsafe(method_family = none)]
pub unsafe fn sourceTrackID(&self) -> CMPersistentTrackID;
);
}
/// Methods declared on superclass `AVAssetTrackSegment`.
#[cfg(feature = "AVAssetTrackSegment")]
impl AVCompositionTrackSegment {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}