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
21extern_conformance!(
22 unsafe impl NSObjectProtocol for AVMetadataGroup {}
23);
24
25impl AVMetadataGroup {
26 extern_methods!(
27 #[cfg(feature = "AVMetadataItem")]
28 #[unsafe(method(items))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
31 );
32}
33
34impl AVMetadataGroup {
36 extern_methods!(
37 #[unsafe(method(init))]
38 #[unsafe(method_family = init)]
39 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
40
41 #[unsafe(method(new))]
42 #[unsafe(method_family = new)]
43 pub unsafe fn new() -> Retained<Self>;
44 );
45}
46
47impl AVMetadataGroup {
49 extern_methods!(
50 #[unsafe(method(classifyingLabel))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn classifyingLabel(&self) -> Option<Retained<NSString>>;
53
54 #[unsafe(method(uniqueID))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn uniqueID(&self) -> Option<Retained<NSString>>;
57 );
58}
59
60extern_class!(
61 #[unsafe(super(AVMetadataGroup, NSObject))]
65 #[derive(Debug, PartialEq, Eq, Hash)]
66 pub struct AVTimedMetadataGroup;
67);
68
69extern_conformance!(
70 unsafe impl NSCopying for AVTimedMetadataGroup {}
71);
72
73unsafe impl CopyingHelper for AVTimedMetadataGroup {
74 type Result = Self;
75}
76
77extern_conformance!(
78 unsafe impl NSMutableCopying for AVTimedMetadataGroup {}
79);
80
81unsafe impl MutableCopyingHelper for AVTimedMetadataGroup {
82 type Result = AVMutableTimedMetadataGroup;
83}
84
85extern_conformance!(
86 unsafe impl NSObjectProtocol for AVTimedMetadataGroup {}
87);
88
89impl AVTimedMetadataGroup {
90 extern_methods!(
91 #[cfg(all(feature = "AVMetadataItem", feature = "objc2-core-media"))]
92 #[unsafe(method(initWithItems:timeRange:))]
100 #[unsafe(method_family = init)]
101 pub unsafe fn initWithItems_timeRange(
102 this: Allocated<Self>,
103 items: &NSArray<AVMetadataItem>,
104 time_range: CMTimeRange,
105 ) -> Retained<Self>;
106
107 #[cfg(feature = "objc2-core-media")]
108 #[unsafe(method(initWithSampleBuffer:))]
114 #[unsafe(method_family = init)]
115 pub unsafe fn initWithSampleBuffer(
116 this: Allocated<Self>,
117 sample_buffer: &CMSampleBuffer,
118 ) -> Option<Retained<Self>>;
119
120 #[cfg(feature = "objc2-core-media")]
121 #[unsafe(method(timeRange))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn timeRange(&self) -> CMTimeRange;
124
125 #[cfg(feature = "AVMetadataItem")]
126 #[unsafe(method(items))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
129 );
130}
131
132impl AVTimedMetadataGroup {
134 extern_methods!(
135 #[unsafe(method(init))]
136 #[unsafe(method_family = init)]
137 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139 #[unsafe(method(new))]
140 #[unsafe(method_family = new)]
141 pub unsafe fn new() -> Retained<Self>;
142 );
143}
144
145impl AVTimedMetadataGroup {
147 extern_methods!(
148 #[cfg(feature = "objc2-core-media")]
149 #[unsafe(method(copyFormatDescription))]
157 #[unsafe(method_family = copy)]
158 pub unsafe fn copyFormatDescription(&self)
159 -> Option<Retained<CMMetadataFormatDescription>>;
160 );
161}
162
163extern_class!(
164 #[unsafe(super(AVTimedMetadataGroup, AVMetadataGroup, NSObject))]
168 #[derive(Debug, PartialEq, Eq, Hash)]
169 pub struct AVMutableTimedMetadataGroup;
170);
171
172extern_conformance!(
173 unsafe impl NSCopying for AVMutableTimedMetadataGroup {}
174);
175
176unsafe impl CopyingHelper for AVMutableTimedMetadataGroup {
177 type Result = AVTimedMetadataGroup;
178}
179
180extern_conformance!(
181 unsafe impl NSMutableCopying for AVMutableTimedMetadataGroup {}
182);
183
184unsafe impl MutableCopyingHelper for AVMutableTimedMetadataGroup {
185 type Result = Self;
186}
187
188extern_conformance!(
189 unsafe impl NSObjectProtocol for AVMutableTimedMetadataGroup {}
190);
191
192impl AVMutableTimedMetadataGroup {
193 extern_methods!(
194 #[cfg(feature = "objc2-core-media")]
195 #[unsafe(method(timeRange))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn timeRange(&self) -> CMTimeRange;
198
199 #[cfg(feature = "objc2-core-media")]
200 #[unsafe(method(setTimeRange:))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn setTimeRange(&self, time_range: CMTimeRange);
204
205 #[cfg(feature = "AVMetadataItem")]
206 #[unsafe(method(items))]
207 #[unsafe(method_family = none)]
208 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
209
210 #[cfg(feature = "AVMetadataItem")]
211 #[unsafe(method(setItems:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn setItems(&self, items: &NSArray<AVMetadataItem>);
217 );
218}
219
220impl AVMutableTimedMetadataGroup {
222 extern_methods!(
223 #[cfg(all(feature = "AVMetadataItem", feature = "objc2-core-media"))]
224 #[unsafe(method(initWithItems:timeRange:))]
232 #[unsafe(method_family = init)]
233 pub unsafe fn initWithItems_timeRange(
234 this: Allocated<Self>,
235 items: &NSArray<AVMetadataItem>,
236 time_range: CMTimeRange,
237 ) -> Retained<Self>;
238
239 #[cfg(feature = "objc2-core-media")]
240 #[unsafe(method(initWithSampleBuffer:))]
246 #[unsafe(method_family = init)]
247 pub unsafe fn initWithSampleBuffer(
248 this: Allocated<Self>,
249 sample_buffer: &CMSampleBuffer,
250 ) -> Option<Retained<Self>>;
251 );
252}
253
254impl AVMutableTimedMetadataGroup {
256 extern_methods!(
257 #[unsafe(method(init))]
258 #[unsafe(method_family = init)]
259 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
260
261 #[unsafe(method(new))]
262 #[unsafe(method_family = new)]
263 pub unsafe fn new() -> Retained<Self>;
264 );
265}
266
267extern_class!(
268 #[unsafe(super(AVMetadataGroup, NSObject))]
272 #[derive(Debug, PartialEq, Eq, Hash)]
273 pub struct AVDateRangeMetadataGroup;
274);
275
276extern_conformance!(
277 unsafe impl NSCopying for AVDateRangeMetadataGroup {}
278);
279
280unsafe impl CopyingHelper for AVDateRangeMetadataGroup {
281 type Result = Self;
282}
283
284extern_conformance!(
285 unsafe impl NSMutableCopying for AVDateRangeMetadataGroup {}
286);
287
288unsafe impl MutableCopyingHelper for AVDateRangeMetadataGroup {
289 type Result = AVMutableDateRangeMetadataGroup;
290}
291
292extern_conformance!(
293 unsafe impl NSObjectProtocol for AVDateRangeMetadataGroup {}
294);
295
296impl AVDateRangeMetadataGroup {
297 extern_methods!(
298 #[cfg(feature = "AVMetadataItem")]
299 #[unsafe(method(initWithItems:startDate:endDate:))]
309 #[unsafe(method_family = init)]
310 pub unsafe fn initWithItems_startDate_endDate(
311 this: Allocated<Self>,
312 items: &NSArray<AVMetadataItem>,
313 start_date: &NSDate,
314 end_date: Option<&NSDate>,
315 ) -> Retained<Self>;
316
317 #[unsafe(method(startDate))]
318 #[unsafe(method_family = none)]
319 pub unsafe fn startDate(&self) -> Retained<NSDate>;
320
321 #[unsafe(method(endDate))]
322 #[unsafe(method_family = none)]
323 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
324
325 #[cfg(feature = "AVMetadataItem")]
326 #[unsafe(method(items))]
327 #[unsafe(method_family = none)]
328 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
329 );
330}
331
332impl AVDateRangeMetadataGroup {
334 extern_methods!(
335 #[unsafe(method(init))]
336 #[unsafe(method_family = init)]
337 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
338
339 #[unsafe(method(new))]
340 #[unsafe(method_family = new)]
341 pub unsafe fn new() -> Retained<Self>;
342 );
343}
344
345extern_class!(
346 #[unsafe(super(AVDateRangeMetadataGroup, AVMetadataGroup, NSObject))]
350 #[derive(Debug, PartialEq, Eq, Hash)]
351 pub struct AVMutableDateRangeMetadataGroup;
352);
353
354extern_conformance!(
355 unsafe impl NSCopying for AVMutableDateRangeMetadataGroup {}
356);
357
358unsafe impl CopyingHelper for AVMutableDateRangeMetadataGroup {
359 type Result = AVDateRangeMetadataGroup;
360}
361
362extern_conformance!(
363 unsafe impl NSMutableCopying for AVMutableDateRangeMetadataGroup {}
364);
365
366unsafe impl MutableCopyingHelper for AVMutableDateRangeMetadataGroup {
367 type Result = Self;
368}
369
370extern_conformance!(
371 unsafe impl NSObjectProtocol for AVMutableDateRangeMetadataGroup {}
372);
373
374impl AVMutableDateRangeMetadataGroup {
375 extern_methods!(
376 #[unsafe(method(startDate))]
377 #[unsafe(method_family = none)]
378 pub unsafe fn startDate(&self) -> Retained<NSDate>;
379
380 #[unsafe(method(setStartDate:))]
384 #[unsafe(method_family = none)]
385 pub unsafe fn setStartDate(&self, start_date: &NSDate);
386
387 #[unsafe(method(endDate))]
388 #[unsafe(method_family = none)]
389 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
390
391 #[unsafe(method(setEndDate:))]
395 #[unsafe(method_family = none)]
396 pub unsafe fn setEndDate(&self, end_date: Option<&NSDate>);
397
398 #[cfg(feature = "AVMetadataItem")]
399 #[unsafe(method(items))]
400 #[unsafe(method_family = none)]
401 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
402
403 #[cfg(feature = "AVMetadataItem")]
404 #[unsafe(method(setItems:))]
408 #[unsafe(method_family = none)]
409 pub unsafe fn setItems(&self, items: &NSArray<AVMetadataItem>);
410 );
411}
412
413impl AVMutableDateRangeMetadataGroup {
415 extern_methods!(
416 #[cfg(feature = "AVMetadataItem")]
417 #[unsafe(method(initWithItems:startDate:endDate:))]
427 #[unsafe(method_family = init)]
428 pub unsafe fn initWithItems_startDate_endDate(
429 this: Allocated<Self>,
430 items: &NSArray<AVMetadataItem>,
431 start_date: &NSDate,
432 end_date: Option<&NSDate>,
433 ) -> Retained<Self>;
434 );
435}
436
437impl AVMutableDateRangeMetadataGroup {
439 extern_methods!(
440 #[unsafe(method(init))]
441 #[unsafe(method_family = init)]
442 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
443
444 #[unsafe(method(new))]
445 #[unsafe(method_family = new)]
446 pub unsafe fn new() -> Retained<Self>;
447 );
448}