objc2-video-toolbox 0.3.2

Bindings to the VideoToolbox framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
#[cfg(feature = "objc2-core-video")]
use objc2_core_video::*;

use crate::*;

/// A reference to a Video Toolbox RAW Processing Session.
///
/// A RAW processing session supports processing of frames that have been output from decoders in camera native formats, for example RAW or bayer formats.
/// The session reference is a reference-counted CF object.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtrawprocessingsession?language=objc)
#[doc(alias = "VTRAWProcessingSessionRef")]
#[repr(C)]
pub struct VTRAWProcessingSession {
    inner: [u8; 0],
    _p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}

cf_type!(
    unsafe impl VTRAWProcessingSession {}
);
#[cfg(feature = "objc2")]
cf_objc2_type!(
    unsafe impl RefEncode<"OpaqueVTRAWProcessingSession"> for VTRAWProcessingSession {}
);

/// Block invoked when processing parameters change.
///
/// This block is called when available parameters or parameter values change without an explicit call to VTRAWProcessingSessionSetProcessingParameters.
/// This is intended to allow the client to update any UI driven by these parameters.
///
/// Parameter `newParameters`: A CFArrayRef contaiing the new parameter details.  This follows the same form as the array returned from VTRAWProcessingSessionCopyProcessingParameters.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtrawprocessingparameterchangehandler?language=objc)
#[cfg(feature = "block2")]
pub type VTRAWProcessingParameterChangeHandler = *mut block2::DynBlock<dyn Fn(*const CFArray)>;

impl VTRAWProcessingSession {
    /// Creates a RAW video frame processing session.
    ///
    /// .
    ///
    /// Parameter `allocator`: An allocator for the session.  Pass NULL to use the default allocator.
    ///
    /// Parameter `formatDescription`: The CMVideoFormatDescription corresponding to the original media samples, containing sequence-level processing parameters.
    ///
    /// Parameter `outputPixelBufferAttributes`: A CoreVideo pixel buffer attributes dictionary describing the client's requirements for pixel buffers for output frames.
    /// Pass NULL to receive the RAW processor's native output format.
    ///
    /// Parameter `processingSessionOptions`: A dictionary of creation-time options for the VTRAWProcessingSession.
    ///
    /// Parameter `processingSessionOut`: Points to a variable to receive the new RAW processing session.
    /// When you are done with the session, call VTRAWProcessingSessionInvalidate
    /// to tear it down and then CFRelease to release your object reference.
    ///
    /// # Safety
    ///
    /// - `output_pixel_buffer_attributes` generics must be of the correct type.
    /// - `processing_session_options` generics must be of the correct type.
    /// - `processing_session_out` must be a valid pointer.
    #[doc(alias = "VTRAWProcessingSessionCreate")]
    #[cfg(feature = "objc2-core-media")]
    #[inline]
    pub unsafe fn create(
        allocator: Option<&CFAllocator>,
        format_description: &CMVideoFormatDescription,
        output_pixel_buffer_attributes: Option<&CFDictionary>,
        processing_session_options: Option<&CFDictionary>,
        processing_session_out: NonNull<*mut VTRAWProcessingSession>,
    ) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionCreate(
                allocator: Option<&CFAllocator>,
                format_description: &CMVideoFormatDescription,
                output_pixel_buffer_attributes: Option<&CFDictionary>,
                processing_session_options: Option<&CFDictionary>,
                processing_session_out: NonNull<*mut VTRAWProcessingSession>,
            ) -> OSStatus;
        }
        unsafe {
            VTRAWProcessingSessionCreate(
                allocator,
                format_description,
                output_pixel_buffer_attributes,
                processing_session_options,
                processing_session_out,
            )
        }
    }

    /// Tears down a RAW processing session.
    ///
    /// When you are done with a decompression session you created, call VTRAWProcessingSessionInvalidate
    /// to tear it down and then CFRelease to release your object reference.
    /// When a  session's retain count reaches zero, it is automatically invalidated, but
    /// since sessions may be retained by multiple parties, it can be hard to predict when this will happen.
    /// Calling VTRAWProcessingSessionInvalidate ensures a deterministic, orderly teardown.
    #[doc(alias = "VTRAWProcessingSessionInvalidate")]
    #[inline]
    pub unsafe fn invalidate(&self) {
        extern "C-unwind" {
            fn VTRAWProcessingSessionInvalidate(session: &VTRAWProcessingSession);
        }
        unsafe { VTRAWProcessingSessionInvalidate(self) }
    }
}

unsafe impl ConcreteType for VTRAWProcessingSession {
    /// Returns the CFTypeID for RAW processing sessions.
    #[doc(alias = "VTRAWProcessingSessionGetTypeID")]
    #[inline]
    fn type_id() -> CFTypeID {
        extern "C-unwind" {
            fn VTRAWProcessingSessionGetTypeID() -> CFTypeID;
        }
        unsafe { VTRAWProcessingSessionGetTypeID() }
    }
}

impl VTRAWProcessingSession {
    /// Provides a block which will be called when the VTRAWProcessingPlugin changes the set of processing parameters..
    ///
    /// This block will be called the VTRAWProcessingPlugin either changes the set of available processing parameters, or changes the current value of parameters.
    /// The VTRAWProcessingPlugin may change parameters based on metadata associated with input frames, or in response to other parameters configured by VTRAWProcessingSessionSetProcessingParameters.
    /// This optional and does not need to be configured if the client is not driving UI based on these parameters, or otherwise does not need this.
    ///
    /// Parameter `session`: The RAW processing session.
    ///
    /// Parameter `parameterChangeHandler`: A VTRAWProcessingParameterChangeHandler block which will be called when the set of processing parameters changes, or the value of a parameter changes without the client explicitly requesting it.
    /// Setting this to NULL removes the current handler.
    ///
    /// # Safety
    ///
    /// `parameter_change_handler` must be a valid pointer or null.
    #[doc(alias = "VTRAWProcessingSessionSetParameterChangedHandler")]
    #[cfg(feature = "block2")]
    #[inline]
    pub unsafe fn set_parameter_changed_handler(
        &self,
        parameter_change_handler: VTRAWProcessingParameterChangeHandler,
    ) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionSetParameterChangedHandler(
                session: &VTRAWProcessingSession,
                parameter_change_handler: VTRAWProcessingParameterChangeHandler,
            ) -> OSStatus;
        }
        unsafe { VTRAWProcessingSessionSetParameterChangedHandler(self, parameter_change_handler) }
    }

    /// # Safety
    ///
    /// `parameter_change_handler` must be a valid pointer or null.
    #[doc(alias = "VTRAWProcessingSessionSetParameterChangedHander")]
    #[cfg(feature = "block2")]
    #[deprecated]
    #[inline]
    pub unsafe fn set_parameter_changed_hander(
        &self,
        parameter_change_handler: VTRAWProcessingParameterChangeHandler,
    ) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionSetParameterChangedHander(
                session: &VTRAWProcessingSession,
                parameter_change_handler: VTRAWProcessingParameterChangeHandler,
            ) -> OSStatus;
        }
        unsafe { VTRAWProcessingSessionSetParameterChangedHander(self, parameter_change_handler) }
    }
}

/// Block invoked when frame processing is complete.
///
/// On successful processing, will return a CVPixelBuffer conforming to the session's outputPixelBufferAttributes if any were provided.
///
/// Parameter `status`: noErr if processing request was successful; an error code if it was not successful.
///
/// Parameter `processedPixelBuffer`: A CVPixelBuffer containing the processed video frame if processing request was successful;
/// otherwise, NULL.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtrawprocessingoutputhandler?language=objc)
#[cfg(all(feature = "block2", feature = "objc2-core-video"))]
pub type VTRAWProcessingOutputHandler = *mut block2::DynBlock<dyn Fn(OSStatus, *mut CVPixelBuffer)>;

impl VTRAWProcessingSession {
    /// Call this function to submit RAW frames for format-specific processing using sequence and frame level parameters.
    ///
    /// Processed frames may or may not be output before the function returns,
    /// The client should not modify the input pixel data after making this call.
    /// The RAW Processor will retain the input pixel buffer as long as necessary.
    ///
    /// For any RAW processor, there is a finite number of frames that can be
    /// presented to VTRAWProcessingSessionProcessFrame before the function will block
    /// until the output callback is invoked.
    ///
    /// Parameter `session`: The RAW processing session.
    ///
    /// Parameter `inputPixelBuffer`: A CVPixelBuffer containing an input video frame to be processed.
    ///
    /// Parameter `frameOptions`: Contains key/value pairs specifying additional properties for processing this frame.
    /// No keys currently.  Pass NULL.
    ///
    /// Parameter `outputHandler`: A VTRAWProcessingOutputHandler block which will be called once when processing is complete.
    ///
    /// # Safety
    ///
    /// - `frame_options` generics must be of the correct type.
    /// - `output_handler` must be a valid pointer.
    #[doc(alias = "VTRAWProcessingSessionProcessFrame")]
    #[cfg(all(feature = "block2", feature = "objc2-core-video"))]
    #[inline]
    pub unsafe fn process_frame(
        &self,
        input_pixel_buffer: &CVPixelBuffer,
        frame_options: Option<&CFDictionary>,
        output_handler: VTRAWProcessingOutputHandler,
    ) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionProcessFrame(
                session: &VTRAWProcessingSession,
                input_pixel_buffer: &CVPixelBuffer,
                frame_options: Option<&CFDictionary>,
                output_handler: VTRAWProcessingOutputHandler,
            ) -> OSStatus;
        }
        unsafe {
            VTRAWProcessingSessionProcessFrame(
                self,
                input_pixel_buffer,
                frame_options,
                output_handler,
            )
        }
    }

    /// Forces the RAW Processor to complete processing frames.
    ///
    /// Call this after calling a set of VTRAWProcessingSessionProcessFrame calls to ensure that all frames have been processed.
    /// Before VTRAWProcessingSessionCompleteFrames returns, the output handler will be invoked for all pending frames.
    ///
    /// Parameter `session`: The RAW processing session.
    #[doc(alias = "VTRAWProcessingSessionCompleteFrames")]
    #[inline]
    pub unsafe fn complete_frames(&self) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionCompleteFrames(session: &VTRAWProcessingSession) -> OSStatus;
        }
        unsafe { VTRAWProcessingSessionCompleteFrames(self) }
    }

    /// Copies an array of dictionaries describing the parameters provided by the RAW Processor for frame processing
    ///
    /// This will return an array of dictionaries, one dictionary for each parameter that can be controlled in the RAW Processing operation.
    /// The dictionary for each parameter will contain a set of kVTRAWProcessingParameter keys whose values provide a name, value type,
    /// value range, and current value for each parameter.
    ///
    /// The returned values can be used to contruct dynamic UI presenting RAW Processing controls allowing the various knobs for this
    /// specific RAW Processor to be viewed and manipulated.
    ///
    /// Parameter `session`: The RAW processing session.
    ///
    /// Parameter `outParameterArray`: Pointer for receiving the RAW Processing parameter array..
    ///
    /// # Safety
    ///
    /// `out_parameter_array` must be a valid pointer.
    #[doc(alias = "VTRAWProcessingSessionCopyProcessingParameters")]
    #[inline]
    pub unsafe fn copy_processing_parameters(
        &self,
        out_parameter_array: NonNull<*const CFArray>,
    ) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionCopyProcessingParameters(
                session: &VTRAWProcessingSession,
                out_parameter_array: NonNull<*const CFArray>,
            ) -> OSStatus;
        }
        unsafe { VTRAWProcessingSessionCopyProcessingParameters(self, out_parameter_array) }
    }

    /// Sets a collection of RAW Processing parameters
    ///
    /// This call will set a collection of RAW Processing parameters on the RAW Processor.  These are set as a dictionary where the keys match
    /// kVTRAWProcessingParameter_Key values that were returned in VTRAWProcessingSessionCopyProcessingParameters and where values conform
    /// to the type and range defined in the kVTRAWProcessingParameter dictionary for each parameter.
    ///
    /// Not all parameters from the RAWProcessingParameter array need to be set at any given time.  Changining the parameters will not change
    /// processing on frames already submitted for processing, it will only impact frames where VTRAWProcessingSessionProcessFrame is called
    /// after VTRAWProcessingSessionSetProcessingParameters returns.
    ///
    /// If any parameters specified are not in the array reported by VTRAWProcessingSessionCopyProcessingParameters, or are the wrong type or are out of range,
    /// kVTParameterErr will be returned and none of the parameters will be applied.
    ///
    /// Parameter `session`: The RAW processing session.
    ///
    /// Parameter `processingParameters`: A dictionary of keys and values setting parameters reported by VTRAWProcessingSessionCopyProcessingParameters.
    ///
    /// Returns: Returns an error if any of the provided parameters are invalid, disabled or outside of the declared valid range.
    /// None of the provided parameters will be set on the processor if an error is returned.
    ///
    /// # Safety
    ///
    /// `processing_parameters` generics must be of the correct type.
    #[doc(alias = "VTRAWProcessingSessionSetProcessingParameters")]
    #[inline]
    pub unsafe fn set_processing_parameters(
        &self,
        processing_parameters: &CFDictionary,
    ) -> OSStatus {
        extern "C-unwind" {
            fn VTRAWProcessingSessionSetProcessingParameters(
                session: &VTRAWProcessingSession,
                processing_parameters: &CFDictionary,
            ) -> OSStatus;
        }
        unsafe { VTRAWProcessingSessionSetProcessingParameters(self, processing_parameters) }
    }
}

extern "C" {
    /// The value corresponding to this key is the string used when specifying this parameter when calling VTRAWProcessingSessionSetProcessingParameters.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_key?language=objc)
    pub static kVTRAWProcessingParameter_Key: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is a localized string  which can be displayed in UI representing this parameter.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_name?language=objc)
    pub static kVTRAWProcessingParameter_Name: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is a localized string with a description of the parameter suitable for display in a tooltip or other descriptive UI.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_description?language=objc)
    pub static kVTRAWProcessingParameter_Description: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is Boolean indicating whether the parameter is enabled and can be modified.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_enabled?language=objc)
    pub static kVTRAWProcessingParameter_Enabled: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is the type of the parameter - a Boolean, Integer, Float, List, or SubGroup.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_valuetype?language=objc)
    pub static kVTRAWProcessingParameter_ValueType: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparametervaluetype_boolean?language=objc)
    pub static kVTRAWProcessingParameterValueType_Boolean: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparametervaluetype_integer?language=objc)
    pub static kVTRAWProcessingParameterValueType_Integer: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparametervaluetype_float?language=objc)
    pub static kVTRAWProcessingParameterValueType_Float: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparametervaluetype_list?language=objc)
    pub static kVTRAWProcessingParameterValueType_List: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparametervaluetype_subgroup?language=objc)
    pub static kVTRAWProcessingParameterValueType_SubGroup: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is a CFArray of CFDictionaries describing each element in the list..
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_listarray?language=objc)
    pub static kVTRAWProcessingParameter_ListArray: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameterlistelement_label?language=objc)
    pub static kVTRAWProcessingParameterListElement_Label: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameterlistelement_description?language=objc)
    pub static kVTRAWProcessingParameterListElement_Description: &'static CFString;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameterlistelement_listelementid?language=objc)
    pub static kVTRAWProcessingParameterListElement_ListElementID: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is a CFArray of CFDictionaries representing the individual sub-parameters in this group.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_subgroup?language=objc)
    pub static kVTRAWProcessingParameter_SubGroup: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is the maximum value allowed for this parameter when calling VTRAWProcessingSessionSetProcessingParameters.
    /// This parameter is optional and not required for parameters where it is not appropriate (such as Boolean or List types).
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_maximumvalue?language=objc)
    pub static kVTRAWProcessingParameter_MaximumValue: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is the minimum value allowed for this parameter when calling VTRAWProcessingSessionSetProcessingParameters.
    /// This parameter is optional and not required for parameters where it is not appropriate (such as Boolean or List types).
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_minimumvalue?language=objc)
    pub static kVTRAWProcessingParameter_MinimumValue: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is the initial value for this parameter as defined by the container and metadata provided at creation time.
    /// For List types, this is the ListElementID for the List element.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_initialvalue?language=objc)
    pub static kVTRAWProcessingParameter_InitialValue: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is a neutral setting for the processor.
    /// For List types, this is the ListElementID for the List element.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_neutralvalue?language=objc)
    pub static kVTRAWProcessingParameter_NeutralValue: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is the "As Shot" value for this parameter as originally captured by the camera.
    /// For List types, this is the ListElementID for the List element.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_cameravalue?language=objc)
    pub static kVTRAWProcessingParameter_CameraValue: &'static CFString;
}

extern "C" {
    /// The value corresponding to this key is the currently configured value for this parameter.  For List types, this is the ListElementID for the List element.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/kvtrawprocessingparameter_currentvalue?language=objc)
    pub static kVTRAWProcessingParameter_CurrentValue: &'static CFString;
}

extern "C-unwind" {
    #[cfg(feature = "objc2-core-media")]
    #[deprecated = "renamed to `VTRAWProcessingSession::create`"]
    pub fn VTRAWProcessingSessionCreate(
        allocator: Option<&CFAllocator>,
        format_description: &CMVideoFormatDescription,
        output_pixel_buffer_attributes: Option<&CFDictionary>,
        processing_session_options: Option<&CFDictionary>,
        processing_session_out: NonNull<*mut VTRAWProcessingSession>,
    ) -> OSStatus;
}

extern "C-unwind" {
    #[deprecated = "renamed to `VTRAWProcessingSession::invalidate`"]
    pub fn VTRAWProcessingSessionInvalidate(session: &VTRAWProcessingSession);
}

extern "C-unwind" {
    #[cfg(feature = "block2")]
    #[deprecated = "renamed to `VTRAWProcessingSession::set_parameter_changed_handler`"]
    pub fn VTRAWProcessingSessionSetParameterChangedHandler(
        session: &VTRAWProcessingSession,
        parameter_change_handler: VTRAWProcessingParameterChangeHandler,
    ) -> OSStatus;
}

extern "C-unwind" {
    #[cfg(feature = "block2")]
    #[deprecated = "renamed to `VTRAWProcessingSession::set_parameter_changed_hander`"]
    pub fn VTRAWProcessingSessionSetParameterChangedHander(
        session: &VTRAWProcessingSession,
        parameter_change_handler: VTRAWProcessingParameterChangeHandler,
    ) -> OSStatus;
}

extern "C-unwind" {
    #[cfg(all(feature = "block2", feature = "objc2-core-video"))]
    #[deprecated = "renamed to `VTRAWProcessingSession::process_frame`"]
    pub fn VTRAWProcessingSessionProcessFrame(
        session: &VTRAWProcessingSession,
        input_pixel_buffer: &CVPixelBuffer,
        frame_options: Option<&CFDictionary>,
        output_handler: VTRAWProcessingOutputHandler,
    ) -> OSStatus;
}

extern "C-unwind" {
    #[deprecated = "renamed to `VTRAWProcessingSession::complete_frames`"]
    pub fn VTRAWProcessingSessionCompleteFrames(session: &VTRAWProcessingSession) -> OSStatus;
}

extern "C-unwind" {
    #[deprecated = "renamed to `VTRAWProcessingSession::copy_processing_parameters`"]
    pub fn VTRAWProcessingSessionCopyProcessingParameters(
        session: &VTRAWProcessingSession,
        out_parameter_array: NonNull<*const CFArray>,
    ) -> OSStatus;
}

extern "C-unwind" {
    #[deprecated = "renamed to `VTRAWProcessingSession::set_processing_parameters`"]
    pub fn VTRAWProcessingSessionSetProcessingParameters(
        session: &VTRAWProcessingSession,
        processing_parameters: &CFDictionary,
    ) -> OSStatus;
}