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
23extern_conformance!(
24 unsafe impl NSCopying for VNVideoProcessorCadence {}
25);
26
27unsafe impl CopyingHelper for VNVideoProcessorCadence {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for VNVideoProcessorCadence {}
33);
34
35impl VNVideoProcessorCadence {
36 extern_methods!();
37}
38
39impl VNVideoProcessorCadence {
41 extern_methods!(
42 #[unsafe(method(init))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
45
46 #[unsafe(method(new))]
47 #[unsafe(method_family = new)]
48 pub unsafe fn new() -> Retained<Self>;
49 );
50}
51
52extern_class!(
53 #[unsafe(super(VNVideoProcessorCadence, NSObject))]
57 #[derive(Debug, PartialEq, Eq, Hash)]
58 pub struct VNVideoProcessorFrameRateCadence;
59);
60
61extern_conformance!(
62 unsafe impl NSCopying for VNVideoProcessorFrameRateCadence {}
63);
64
65unsafe impl CopyingHelper for VNVideoProcessorFrameRateCadence {
66 type Result = Self;
67}
68
69extern_conformance!(
70 unsafe impl NSObjectProtocol for VNVideoProcessorFrameRateCadence {}
71);
72
73impl VNVideoProcessorFrameRateCadence {
74 extern_methods!(
75 #[unsafe(method(init))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79 #[unsafe(method(initWithFrameRate:))]
80 #[unsafe(method_family = init)]
81 pub unsafe fn initWithFrameRate(
82 this: Allocated<Self>,
83 frame_rate: NSInteger,
84 ) -> Retained<Self>;
85
86 #[unsafe(method(frameRate))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn frameRate(&self) -> NSInteger;
89 );
90}
91
92impl VNVideoProcessorFrameRateCadence {
94 extern_methods!(
95 #[unsafe(method(new))]
96 #[unsafe(method_family = new)]
97 pub unsafe fn new() -> Retained<Self>;
98 );
99}
100
101extern_class!(
102 #[unsafe(super(VNVideoProcessorCadence, NSObject))]
106 #[derive(Debug, PartialEq, Eq, Hash)]
107 pub struct VNVideoProcessorTimeIntervalCadence;
108);
109
110extern_conformance!(
111 unsafe impl NSCopying for VNVideoProcessorTimeIntervalCadence {}
112);
113
114unsafe impl CopyingHelper for VNVideoProcessorTimeIntervalCadence {
115 type Result = Self;
116}
117
118extern_conformance!(
119 unsafe impl NSObjectProtocol for VNVideoProcessorTimeIntervalCadence {}
120);
121
122impl VNVideoProcessorTimeIntervalCadence {
123 extern_methods!(
124 #[unsafe(method(init))]
125 #[unsafe(method_family = init)]
126 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
127
128 #[cfg(feature = "objc2-core-foundation")]
129 #[unsafe(method(initWithTimeInterval:))]
130 #[unsafe(method_family = init)]
131 pub unsafe fn initWithTimeInterval(
132 this: Allocated<Self>,
133 time_interval: CFTimeInterval,
134 ) -> Retained<Self>;
135
136 #[cfg(feature = "objc2-core-foundation")]
137 #[unsafe(method(timeInterval))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn timeInterval(&self) -> CFTimeInterval;
140 );
141}
142
143impl VNVideoProcessorTimeIntervalCadence {
145 extern_methods!(
146 #[unsafe(method(new))]
147 #[unsafe(method_family = new)]
148 pub unsafe fn new() -> Retained<Self>;
149 );
150}
151
152extern_class!(
153 #[unsafe(super(NSObject))]
157 #[derive(Debug, PartialEq, Eq, Hash)]
158 pub struct VNVideoProcessorRequestProcessingOptions;
159);
160
161extern_conformance!(
162 unsafe impl NSCopying for VNVideoProcessorRequestProcessingOptions {}
163);
164
165unsafe impl CopyingHelper for VNVideoProcessorRequestProcessingOptions {
166 type Result = Self;
167}
168
169extern_conformance!(
170 unsafe impl NSObjectProtocol for VNVideoProcessorRequestProcessingOptions {}
171);
172
173impl VNVideoProcessorRequestProcessingOptions {
174 extern_methods!(
175 #[unsafe(method(cadence))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn cadence(&self) -> Option<Retained<VNVideoProcessorCadence>>;
181
182 #[unsafe(method(setCadence:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn setCadence(&self, cadence: Option<&VNVideoProcessorCadence>);
186 );
187}
188
189impl VNVideoProcessorRequestProcessingOptions {
191 extern_methods!(
192 #[unsafe(method(init))]
193 #[unsafe(method_family = init)]
194 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
195
196 #[unsafe(method(new))]
197 #[unsafe(method_family = new)]
198 pub unsafe fn new() -> Retained<Self>;
199 );
200}
201
202extern_class!(
203 #[unsafe(super(NSObject))]
209 #[derive(Debug, PartialEq, Eq, Hash)]
210 pub struct VNVideoProcessor;
211);
212
213extern_conformance!(
214 unsafe impl NSObjectProtocol for VNVideoProcessor {}
215);
216
217impl VNVideoProcessor {
218 extern_methods!(
219 #[unsafe(method(init))]
220 #[unsafe(method_family = init)]
221 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
222
223 #[unsafe(method(initWithURL:))]
228 #[unsafe(method_family = init)]
229 pub unsafe fn initWithURL(this: Allocated<Self>, video_url: &NSURL) -> Retained<Self>;
230
231 #[cfg(feature = "VNRequest")]
232 #[unsafe(method(addRequest:processingOptions:error:_))]
247 #[unsafe(method_family = none)]
248 pub unsafe fn addRequest_processingOptions_error(
249 &self,
250 request: &VNRequest,
251 processing_options: &VNVideoProcessorRequestProcessingOptions,
252 ) -> Result<(), Retained<NSError>>;
253
254 #[cfg(all(feature = "VNRequest", feature = "VNTypes"))]
255 #[deprecated]
256 #[unsafe(method(addRequest:withProcessingOptions:error:_))]
257 #[unsafe(method_family = none)]
258 pub unsafe fn addRequest_withProcessingOptions_error(
259 &self,
260 request: &VNRequest,
261 processing_options: &NSDictionary<VNVideoProcessingOption, AnyObject>,
262 ) -> Result<(), Retained<NSError>>;
263
264 #[cfg(feature = "VNRequest")]
265 #[unsafe(method(removeRequest:error:_))]
276 #[unsafe(method_family = none)]
277 pub unsafe fn removeRequest_error(
278 &self,
279 request: &VNRequest,
280 ) -> Result<(), Retained<NSError>>;
281
282 #[cfg(feature = "objc2-core-media")]
283 #[unsafe(method(analyzeTimeRange:error:_))]
296 #[unsafe(method_family = none)]
297 pub unsafe fn analyzeTimeRange_error(
298 &self,
299 time_range: CMTimeRange,
300 ) -> Result<(), Retained<NSError>>;
301
302 #[cfg(feature = "objc2-core-media")]
303 #[deprecated]
304 #[unsafe(method(analyzeWithTimeRange:error:_))]
305 #[unsafe(method_family = none)]
306 pub unsafe fn analyzeWithTimeRange_error(
307 &self,
308 time_range: CMTimeRange,
309 ) -> Result<(), Retained<NSError>>;
310
311 #[unsafe(method(cancel))]
313 #[unsafe(method_family = none)]
314 pub unsafe fn cancel(&self);
315 );
316}
317
318impl VNVideoProcessor {
320 extern_methods!(
321 #[unsafe(method(new))]
322 #[unsafe(method_family = new)]
323 pub unsafe fn new() -> Retained<Self>;
324 );
325}