objc2_av_foundation/generated/
AVTimedMetadataGroup.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-media")]
7use objc2_core_media::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct AVMetadataGroup;
19);
20
21unsafe impl NSObjectProtocol for AVMetadataGroup {}
22
23impl AVMetadataGroup {
24 extern_methods!(
25 #[cfg(feature = "AVMetadataItem")]
26 #[unsafe(method(items))]
27 #[unsafe(method_family = none)]
28 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
29 );
30}
31
32impl AVMetadataGroup {
34 extern_methods!(
35 #[unsafe(method(init))]
36 #[unsafe(method_family = init)]
37 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
38
39 #[unsafe(method(new))]
40 #[unsafe(method_family = new)]
41 pub unsafe fn new() -> Retained<Self>;
42 );
43}
44
45impl AVMetadataGroup {
47 extern_methods!(
48 #[unsafe(method(classifyingLabel))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn classifyingLabel(&self) -> Option<Retained<NSString>>;
51
52 #[unsafe(method(uniqueID))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn uniqueID(&self) -> Option<Retained<NSString>>;
55 );
56}
57
58extern_class!(
59 #[unsafe(super(AVMetadataGroup, NSObject))]
63 #[derive(Debug, PartialEq, Eq, Hash)]
64 pub struct AVTimedMetadataGroup;
65);
66
67unsafe impl NSCopying for AVTimedMetadataGroup {}
68
69unsafe impl CopyingHelper for AVTimedMetadataGroup {
70 type Result = Self;
71}
72
73unsafe impl NSMutableCopying for AVTimedMetadataGroup {}
74
75unsafe impl MutableCopyingHelper for AVTimedMetadataGroup {
76 type Result = AVMutableTimedMetadataGroup;
77}
78
79unsafe impl NSObjectProtocol for AVTimedMetadataGroup {}
80
81impl AVTimedMetadataGroup {
82 extern_methods!(
83 #[cfg(all(feature = "AVMetadataItem", feature = "objc2-core-media"))]
84 #[unsafe(method(initWithItems:timeRange:))]
92 #[unsafe(method_family = init)]
93 pub unsafe fn initWithItems_timeRange(
94 this: Allocated<Self>,
95 items: &NSArray<AVMetadataItem>,
96 time_range: CMTimeRange,
97 ) -> Retained<Self>;
98
99 #[cfg(feature = "objc2-core-media")]
100 #[unsafe(method(initWithSampleBuffer:))]
106 #[unsafe(method_family = init)]
107 pub unsafe fn initWithSampleBuffer(
108 this: Allocated<Self>,
109 sample_buffer: &CMSampleBuffer,
110 ) -> Option<Retained<Self>>;
111
112 #[cfg(feature = "objc2-core-media")]
113 #[unsafe(method(timeRange))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn timeRange(&self) -> CMTimeRange;
116
117 #[cfg(feature = "AVMetadataItem")]
118 #[unsafe(method(items))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
121 );
122}
123
124impl AVTimedMetadataGroup {
126 extern_methods!(
127 #[unsafe(method(init))]
128 #[unsafe(method_family = init)]
129 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
130
131 #[unsafe(method(new))]
132 #[unsafe(method_family = new)]
133 pub unsafe fn new() -> Retained<Self>;
134 );
135}
136
137impl AVTimedMetadataGroup {
139 extern_methods!(
140 #[cfg(feature = "objc2-core-media")]
141 #[unsafe(method(copyFormatDescription))]
149 #[unsafe(method_family = copy)]
150 pub unsafe fn copyFormatDescription(&self)
151 -> Option<Retained<CMMetadataFormatDescription>>;
152 );
153}
154
155extern_class!(
156 #[unsafe(super(AVTimedMetadataGroup, AVMetadataGroup, NSObject))]
160 #[derive(Debug, PartialEq, Eq, Hash)]
161 pub struct AVMutableTimedMetadataGroup;
162);
163
164unsafe impl NSCopying for AVMutableTimedMetadataGroup {}
165
166unsafe impl CopyingHelper for AVMutableTimedMetadataGroup {
167 type Result = AVTimedMetadataGroup;
168}
169
170unsafe impl NSMutableCopying for AVMutableTimedMetadataGroup {}
171
172unsafe impl MutableCopyingHelper for AVMutableTimedMetadataGroup {
173 type Result = Self;
174}
175
176unsafe impl NSObjectProtocol for AVMutableTimedMetadataGroup {}
177
178impl AVMutableTimedMetadataGroup {
179 extern_methods!(
180 #[cfg(feature = "objc2-core-media")]
181 #[unsafe(method(timeRange))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn timeRange(&self) -> CMTimeRange;
184
185 #[cfg(feature = "objc2-core-media")]
186 #[unsafe(method(setTimeRange:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn setTimeRange(&self, time_range: CMTimeRange);
190
191 #[cfg(feature = "AVMetadataItem")]
192 #[unsafe(method(items))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
195
196 #[cfg(feature = "AVMetadataItem")]
197 #[unsafe(method(setItems:))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn setItems(&self, items: &NSArray<AVMetadataItem>);
201 );
202}
203
204impl AVMutableTimedMetadataGroup {
206 extern_methods!(
207 #[cfg(all(feature = "AVMetadataItem", feature = "objc2-core-media"))]
208 #[unsafe(method(initWithItems:timeRange:))]
216 #[unsafe(method_family = init)]
217 pub unsafe fn initWithItems_timeRange(
218 this: Allocated<Self>,
219 items: &NSArray<AVMetadataItem>,
220 time_range: CMTimeRange,
221 ) -> Retained<Self>;
222
223 #[cfg(feature = "objc2-core-media")]
224 #[unsafe(method(initWithSampleBuffer:))]
230 #[unsafe(method_family = init)]
231 pub unsafe fn initWithSampleBuffer(
232 this: Allocated<Self>,
233 sample_buffer: &CMSampleBuffer,
234 ) -> Option<Retained<Self>>;
235 );
236}
237
238impl AVMutableTimedMetadataGroup {
240 extern_methods!(
241 #[unsafe(method(init))]
242 #[unsafe(method_family = init)]
243 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
244
245 #[unsafe(method(new))]
246 #[unsafe(method_family = new)]
247 pub unsafe fn new() -> Retained<Self>;
248 );
249}
250
251extern_class!(
252 #[unsafe(super(AVMetadataGroup, NSObject))]
256 #[derive(Debug, PartialEq, Eq, Hash)]
257 pub struct AVDateRangeMetadataGroup;
258);
259
260unsafe impl NSCopying for AVDateRangeMetadataGroup {}
261
262unsafe impl CopyingHelper for AVDateRangeMetadataGroup {
263 type Result = Self;
264}
265
266unsafe impl NSMutableCopying for AVDateRangeMetadataGroup {}
267
268unsafe impl MutableCopyingHelper for AVDateRangeMetadataGroup {
269 type Result = AVMutableDateRangeMetadataGroup;
270}
271
272unsafe impl NSObjectProtocol for AVDateRangeMetadataGroup {}
273
274impl AVDateRangeMetadataGroup {
275 extern_methods!(
276 #[cfg(feature = "AVMetadataItem")]
277 #[unsafe(method(initWithItems:startDate:endDate:))]
287 #[unsafe(method_family = init)]
288 pub unsafe fn initWithItems_startDate_endDate(
289 this: Allocated<Self>,
290 items: &NSArray<AVMetadataItem>,
291 start_date: &NSDate,
292 end_date: Option<&NSDate>,
293 ) -> Retained<Self>;
294
295 #[unsafe(method(startDate))]
296 #[unsafe(method_family = none)]
297 pub unsafe fn startDate(&self) -> Retained<NSDate>;
298
299 #[unsafe(method(endDate))]
300 #[unsafe(method_family = none)]
301 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
302
303 #[cfg(feature = "AVMetadataItem")]
304 #[unsafe(method(items))]
305 #[unsafe(method_family = none)]
306 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
307 );
308}
309
310impl AVDateRangeMetadataGroup {
312 extern_methods!(
313 #[unsafe(method(init))]
314 #[unsafe(method_family = init)]
315 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
316
317 #[unsafe(method(new))]
318 #[unsafe(method_family = new)]
319 pub unsafe fn new() -> Retained<Self>;
320 );
321}
322
323extern_class!(
324 #[unsafe(super(AVDateRangeMetadataGroup, AVMetadataGroup, NSObject))]
328 #[derive(Debug, PartialEq, Eq, Hash)]
329 pub struct AVMutableDateRangeMetadataGroup;
330);
331
332unsafe impl NSCopying for AVMutableDateRangeMetadataGroup {}
333
334unsafe impl CopyingHelper for AVMutableDateRangeMetadataGroup {
335 type Result = AVDateRangeMetadataGroup;
336}
337
338unsafe impl NSMutableCopying for AVMutableDateRangeMetadataGroup {}
339
340unsafe impl MutableCopyingHelper for AVMutableDateRangeMetadataGroup {
341 type Result = Self;
342}
343
344unsafe impl NSObjectProtocol for AVMutableDateRangeMetadataGroup {}
345
346impl AVMutableDateRangeMetadataGroup {
347 extern_methods!(
348 #[unsafe(method(startDate))]
349 #[unsafe(method_family = none)]
350 pub unsafe fn startDate(&self) -> Retained<NSDate>;
351
352 #[unsafe(method(setStartDate:))]
354 #[unsafe(method_family = none)]
355 pub unsafe fn setStartDate(&self, start_date: &NSDate);
356
357 #[unsafe(method(endDate))]
358 #[unsafe(method_family = none)]
359 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
360
361 #[unsafe(method(setEndDate:))]
363 #[unsafe(method_family = none)]
364 pub unsafe fn setEndDate(&self, end_date: Option<&NSDate>);
365
366 #[cfg(feature = "AVMetadataItem")]
367 #[unsafe(method(items))]
368 #[unsafe(method_family = none)]
369 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
370
371 #[cfg(feature = "AVMetadataItem")]
372 #[unsafe(method(setItems:))]
374 #[unsafe(method_family = none)]
375 pub unsafe fn setItems(&self, items: &NSArray<AVMetadataItem>);
376 );
377}
378
379impl AVMutableDateRangeMetadataGroup {
381 extern_methods!(
382 #[cfg(feature = "AVMetadataItem")]
383 #[unsafe(method(initWithItems:startDate:endDate:))]
393 #[unsafe(method_family = init)]
394 pub unsafe fn initWithItems_startDate_endDate(
395 this: Allocated<Self>,
396 items: &NSArray<AVMetadataItem>,
397 start_date: &NSDate,
398 end_date: Option<&NSDate>,
399 ) -> Retained<Self>;
400 );
401}
402
403impl AVMutableDateRangeMetadataGroup {
405 extern_methods!(
406 #[unsafe(method(init))]
407 #[unsafe(method_family = init)]
408 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
409
410 #[unsafe(method(new))]
411 #[unsafe(method_family = new)]
412 pub unsafe fn new() -> Retained<Self>;
413 );
414}