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:))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn setCadence(&self, cadence: Option<&VNVideoProcessorCadence>);
188 );
189}
190
191impl VNVideoProcessorRequestProcessingOptions {
193 extern_methods!(
194 #[unsafe(method(init))]
195 #[unsafe(method_family = init)]
196 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
197
198 #[unsafe(method(new))]
199 #[unsafe(method_family = new)]
200 pub unsafe fn new() -> Retained<Self>;
201 );
202}
203
204extern_class!(
205 #[unsafe(super(NSObject))]
211 #[derive(Debug, PartialEq, Eq, Hash)]
212 pub struct VNVideoProcessor;
213);
214
215extern_conformance!(
216 unsafe impl NSObjectProtocol for VNVideoProcessor {}
217);
218
219impl VNVideoProcessor {
220 extern_methods!(
221 #[unsafe(method(init))]
222 #[unsafe(method_family = init)]
223 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
224
225 #[unsafe(method(initWithURL:))]
230 #[unsafe(method_family = init)]
231 pub unsafe fn initWithURL(this: Allocated<Self>, video_url: &NSURL) -> Retained<Self>;
232
233 #[cfg(feature = "VNRequest")]
234 #[unsafe(method(addRequest:processingOptions:error:_))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn addRequest_processingOptions_error(
251 &self,
252 request: &VNRequest,
253 processing_options: &VNVideoProcessorRequestProcessingOptions,
254 ) -> Result<(), Retained<NSError>>;
255
256 #[cfg(all(feature = "VNRequest", feature = "VNTypes"))]
257 #[deprecated]
261 #[unsafe(method(addRequest:withProcessingOptions:error:_))]
262 #[unsafe(method_family = none)]
263 pub unsafe fn addRequest_withProcessingOptions_error(
264 &self,
265 request: &VNRequest,
266 processing_options: &NSDictionary<VNVideoProcessingOption, AnyObject>,
267 ) -> Result<(), Retained<NSError>>;
268
269 #[cfg(feature = "VNRequest")]
270 #[unsafe(method(removeRequest:error:_))]
281 #[unsafe(method_family = none)]
282 pub unsafe fn removeRequest_error(
283 &self,
284 request: &VNRequest,
285 ) -> Result<(), Retained<NSError>>;
286
287 #[cfg(feature = "objc2-core-media")]
288 #[unsafe(method(analyzeTimeRange:error:_))]
301 #[unsafe(method_family = none)]
302 pub unsafe fn analyzeTimeRange_error(
303 &self,
304 time_range: CMTimeRange,
305 ) -> Result<(), Retained<NSError>>;
306
307 #[cfg(feature = "objc2-core-media")]
308 #[deprecated]
309 #[unsafe(method(analyzeWithTimeRange:error:_))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn analyzeWithTimeRange_error(
312 &self,
313 time_range: CMTimeRange,
314 ) -> Result<(), Retained<NSError>>;
315
316 #[unsafe(method(cancel))]
318 #[unsafe(method_family = none)]
319 pub unsafe fn cancel(&self);
320 );
321}
322
323impl VNVideoProcessor {
325 extern_methods!(
326 #[unsafe(method(new))]
327 #[unsafe(method_family = new)]
328 pub unsafe fn new() -> Retained<Self>;
329 );
330}