objc2_vision/generated/
VNVideoProcessor.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-media")]
9use objc2_core_media::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14extern_class!(
15 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 pub struct VNVideoProcessorCadence;
21);
22
23unsafe impl NSCopying for VNVideoProcessorCadence {}
24
25unsafe impl CopyingHelper for VNVideoProcessorCadence {
26 type Result = Self;
27}
28
29unsafe impl NSObjectProtocol for VNVideoProcessorCadence {}
30
31impl VNVideoProcessorCadence {
32 extern_methods!();
33}
34
35impl VNVideoProcessorCadence {
37 extern_methods!(
38 #[unsafe(method(init))]
39 #[unsafe(method_family = init)]
40 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
41
42 #[unsafe(method(new))]
43 #[unsafe(method_family = new)]
44 pub unsafe fn new() -> Retained<Self>;
45 );
46}
47
48extern_class!(
49 #[unsafe(super(VNVideoProcessorCadence, NSObject))]
53 #[derive(Debug, PartialEq, Eq, Hash)]
54 pub struct VNVideoProcessorFrameRateCadence;
55);
56
57unsafe impl NSCopying for VNVideoProcessorFrameRateCadence {}
58
59unsafe impl CopyingHelper for VNVideoProcessorFrameRateCadence {
60 type Result = Self;
61}
62
63unsafe impl NSObjectProtocol for VNVideoProcessorFrameRateCadence {}
64
65impl VNVideoProcessorFrameRateCadence {
66 extern_methods!(
67 #[unsafe(method(init))]
68 #[unsafe(method_family = init)]
69 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
70
71 #[unsafe(method(initWithFrameRate:))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn initWithFrameRate(
74 this: Allocated<Self>,
75 frame_rate: NSInteger,
76 ) -> Retained<Self>;
77
78 #[unsafe(method(frameRate))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn frameRate(&self) -> NSInteger;
81 );
82}
83
84impl VNVideoProcessorFrameRateCadence {
86 extern_methods!(
87 #[unsafe(method(new))]
88 #[unsafe(method_family = new)]
89 pub unsafe fn new() -> Retained<Self>;
90 );
91}
92
93extern_class!(
94 #[unsafe(super(VNVideoProcessorCadence, NSObject))]
98 #[derive(Debug, PartialEq, Eq, Hash)]
99 pub struct VNVideoProcessorTimeIntervalCadence;
100);
101
102unsafe impl NSCopying for VNVideoProcessorTimeIntervalCadence {}
103
104unsafe impl CopyingHelper for VNVideoProcessorTimeIntervalCadence {
105 type Result = Self;
106}
107
108unsafe impl NSObjectProtocol for VNVideoProcessorTimeIntervalCadence {}
109
110impl VNVideoProcessorTimeIntervalCadence {
111 extern_methods!(
112 #[unsafe(method(init))]
113 #[unsafe(method_family = init)]
114 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
115
116 #[cfg(feature = "objc2-core-foundation")]
117 #[unsafe(method(initWithTimeInterval:))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn initWithTimeInterval(
120 this: Allocated<Self>,
121 time_interval: CFTimeInterval,
122 ) -> Retained<Self>;
123
124 #[cfg(feature = "objc2-core-foundation")]
125 #[unsafe(method(timeInterval))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn timeInterval(&self) -> CFTimeInterval;
128 );
129}
130
131impl VNVideoProcessorTimeIntervalCadence {
133 extern_methods!(
134 #[unsafe(method(new))]
135 #[unsafe(method_family = new)]
136 pub unsafe fn new() -> Retained<Self>;
137 );
138}
139
140extern_class!(
141 #[unsafe(super(NSObject))]
145 #[derive(Debug, PartialEq, Eq, Hash)]
146 pub struct VNVideoProcessorRequestProcessingOptions;
147);
148
149unsafe impl NSCopying for VNVideoProcessorRequestProcessingOptions {}
150
151unsafe impl CopyingHelper for VNVideoProcessorRequestProcessingOptions {
152 type Result = Self;
153}
154
155unsafe impl NSObjectProtocol for VNVideoProcessorRequestProcessingOptions {}
156
157impl VNVideoProcessorRequestProcessingOptions {
158 extern_methods!(
159 #[unsafe(method(cadence))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn cadence(&self) -> Option<Retained<VNVideoProcessorCadence>>;
165
166 #[unsafe(method(setCadence:))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn setCadence(&self, cadence: Option<&VNVideoProcessorCadence>);
170 );
171}
172
173impl VNVideoProcessorRequestProcessingOptions {
175 extern_methods!(
176 #[unsafe(method(init))]
177 #[unsafe(method_family = init)]
178 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
179
180 #[unsafe(method(new))]
181 #[unsafe(method_family = new)]
182 pub unsafe fn new() -> Retained<Self>;
183 );
184}
185
186extern_class!(
187 #[unsafe(super(NSObject))]
193 #[derive(Debug, PartialEq, Eq, Hash)]
194 pub struct VNVideoProcessor;
195);
196
197unsafe impl NSObjectProtocol for VNVideoProcessor {}
198
199impl VNVideoProcessor {
200 extern_methods!(
201 #[unsafe(method(init))]
202 #[unsafe(method_family = init)]
203 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
204
205 #[unsafe(method(initWithURL:))]
210 #[unsafe(method_family = init)]
211 pub unsafe fn initWithURL(this: Allocated<Self>, video_url: &NSURL) -> Retained<Self>;
212
213 #[cfg(feature = "VNRequest")]
214 #[unsafe(method(addRequest:processingOptions:error:_))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn addRequest_processingOptions_error(
231 &self,
232 request: &VNRequest,
233 processing_options: &VNVideoProcessorRequestProcessingOptions,
234 ) -> Result<(), Retained<NSError>>;
235
236 #[cfg(all(feature = "VNRequest", feature = "VNTypes"))]
237 #[deprecated]
238 #[unsafe(method(addRequest:withProcessingOptions:error:_))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn addRequest_withProcessingOptions_error(
241 &self,
242 request: &VNRequest,
243 processing_options: &NSDictionary<VNVideoProcessingOption, AnyObject>,
244 ) -> Result<(), Retained<NSError>>;
245
246 #[cfg(feature = "VNRequest")]
247 #[unsafe(method(removeRequest:error:_))]
258 #[unsafe(method_family = none)]
259 pub unsafe fn removeRequest_error(
260 &self,
261 request: &VNRequest,
262 ) -> Result<(), Retained<NSError>>;
263
264 #[cfg(feature = "objc2-core-media")]
265 #[unsafe(method(analyzeTimeRange:error:_))]
278 #[unsafe(method_family = none)]
279 pub unsafe fn analyzeTimeRange_error(
280 &self,
281 time_range: CMTimeRange,
282 ) -> Result<(), Retained<NSError>>;
283
284 #[cfg(feature = "objc2-core-media")]
285 #[deprecated]
286 #[unsafe(method(analyzeWithTimeRange:error:_))]
287 #[unsafe(method_family = none)]
288 pub unsafe fn analyzeWithTimeRange_error(
289 &self,
290 time_range: CMTimeRange,
291 ) -> Result<(), Retained<NSError>>;
292
293 #[unsafe(method(cancel))]
295 #[unsafe(method_family = none)]
296 pub unsafe fn cancel(&self);
297 );
298}
299
300impl VNVideoProcessor {
302 extern_methods!(
303 #[unsafe(method(new))]
304 #[unsafe(method_family = new)]
305 pub unsafe fn new() -> Retained<Self>;
306 );
307}