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:))]
213 #[unsafe(method_family = none)]
214 pub unsafe fn setItems(&self, items: &NSArray<AVMetadataItem>);
215 );
216}
217
218impl AVMutableTimedMetadataGroup {
220 extern_methods!(
221 #[cfg(all(feature = "AVMetadataItem", feature = "objc2-core-media"))]
222 #[unsafe(method(initWithItems:timeRange:))]
230 #[unsafe(method_family = init)]
231 pub unsafe fn initWithItems_timeRange(
232 this: Allocated<Self>,
233 items: &NSArray<AVMetadataItem>,
234 time_range: CMTimeRange,
235 ) -> Retained<Self>;
236
237 #[cfg(feature = "objc2-core-media")]
238 #[unsafe(method(initWithSampleBuffer:))]
244 #[unsafe(method_family = init)]
245 pub unsafe fn initWithSampleBuffer(
246 this: Allocated<Self>,
247 sample_buffer: &CMSampleBuffer,
248 ) -> Option<Retained<Self>>;
249 );
250}
251
252impl AVMutableTimedMetadataGroup {
254 extern_methods!(
255 #[unsafe(method(init))]
256 #[unsafe(method_family = init)]
257 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
258
259 #[unsafe(method(new))]
260 #[unsafe(method_family = new)]
261 pub unsafe fn new() -> Retained<Self>;
262 );
263}
264
265extern_class!(
266 #[unsafe(super(AVMetadataGroup, NSObject))]
270 #[derive(Debug, PartialEq, Eq, Hash)]
271 pub struct AVDateRangeMetadataGroup;
272);
273
274extern_conformance!(
275 unsafe impl NSCopying for AVDateRangeMetadataGroup {}
276);
277
278unsafe impl CopyingHelper for AVDateRangeMetadataGroup {
279 type Result = Self;
280}
281
282extern_conformance!(
283 unsafe impl NSMutableCopying for AVDateRangeMetadataGroup {}
284);
285
286unsafe impl MutableCopyingHelper for AVDateRangeMetadataGroup {
287 type Result = AVMutableDateRangeMetadataGroup;
288}
289
290extern_conformance!(
291 unsafe impl NSObjectProtocol for AVDateRangeMetadataGroup {}
292);
293
294impl AVDateRangeMetadataGroup {
295 extern_methods!(
296 #[cfg(feature = "AVMetadataItem")]
297 #[unsafe(method(initWithItems:startDate:endDate:))]
307 #[unsafe(method_family = init)]
308 pub unsafe fn initWithItems_startDate_endDate(
309 this: Allocated<Self>,
310 items: &NSArray<AVMetadataItem>,
311 start_date: &NSDate,
312 end_date: Option<&NSDate>,
313 ) -> Retained<Self>;
314
315 #[unsafe(method(startDate))]
316 #[unsafe(method_family = none)]
317 pub unsafe fn startDate(&self) -> Retained<NSDate>;
318
319 #[unsafe(method(endDate))]
320 #[unsafe(method_family = none)]
321 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
322
323 #[cfg(feature = "AVMetadataItem")]
324 #[unsafe(method(items))]
325 #[unsafe(method_family = none)]
326 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
327 );
328}
329
330impl AVDateRangeMetadataGroup {
332 extern_methods!(
333 #[unsafe(method(init))]
334 #[unsafe(method_family = init)]
335 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
336
337 #[unsafe(method(new))]
338 #[unsafe(method_family = new)]
339 pub unsafe fn new() -> Retained<Self>;
340 );
341}
342
343extern_class!(
344 #[unsafe(super(AVDateRangeMetadataGroup, AVMetadataGroup, NSObject))]
348 #[derive(Debug, PartialEq, Eq, Hash)]
349 pub struct AVMutableDateRangeMetadataGroup;
350);
351
352extern_conformance!(
353 unsafe impl NSCopying for AVMutableDateRangeMetadataGroup {}
354);
355
356unsafe impl CopyingHelper for AVMutableDateRangeMetadataGroup {
357 type Result = AVDateRangeMetadataGroup;
358}
359
360extern_conformance!(
361 unsafe impl NSMutableCopying for AVMutableDateRangeMetadataGroup {}
362);
363
364unsafe impl MutableCopyingHelper for AVMutableDateRangeMetadataGroup {
365 type Result = Self;
366}
367
368extern_conformance!(
369 unsafe impl NSObjectProtocol for AVMutableDateRangeMetadataGroup {}
370);
371
372impl AVMutableDateRangeMetadataGroup {
373 extern_methods!(
374 #[unsafe(method(startDate))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn startDate(&self) -> Retained<NSDate>;
377
378 #[unsafe(method(setStartDate:))]
380 #[unsafe(method_family = none)]
381 pub unsafe fn setStartDate(&self, start_date: &NSDate);
382
383 #[unsafe(method(endDate))]
384 #[unsafe(method_family = none)]
385 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
386
387 #[unsafe(method(setEndDate:))]
389 #[unsafe(method_family = none)]
390 pub unsafe fn setEndDate(&self, end_date: Option<&NSDate>);
391
392 #[cfg(feature = "AVMetadataItem")]
393 #[unsafe(method(items))]
394 #[unsafe(method_family = none)]
395 pub unsafe fn items(&self) -> Retained<NSArray<AVMetadataItem>>;
396
397 #[cfg(feature = "AVMetadataItem")]
398 #[unsafe(method(setItems:))]
400 #[unsafe(method_family = none)]
401 pub unsafe fn setItems(&self, items: &NSArray<AVMetadataItem>);
402 );
403}
404
405impl AVMutableDateRangeMetadataGroup {
407 extern_methods!(
408 #[cfg(feature = "AVMetadataItem")]
409 #[unsafe(method(initWithItems:startDate:endDate:))]
419 #[unsafe(method_family = init)]
420 pub unsafe fn initWithItems_startDate_endDate(
421 this: Allocated<Self>,
422 items: &NSArray<AVMetadataItem>,
423 start_date: &NSDate,
424 end_date: Option<&NSDate>,
425 ) -> Retained<Self>;
426 );
427}
428
429impl AVMutableDateRangeMetadataGroup {
431 extern_methods!(
432 #[unsafe(method(init))]
433 #[unsafe(method_family = init)]
434 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
435
436 #[unsafe(method(new))]
437 #[unsafe(method_family = new)]
438 pub unsafe fn new() -> Retained<Self>;
439 );
440}