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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;
use crate::*;
#[cfg(feature = "objc2")]
extern_protocol!(
/// The protocol that describes the configuration of a processor for a video frame processing session.
///
/// Use `VTFrameProcessorConfiguration` protocol conformance to start a frame processing session. You can query these
/// properties on an implementation conforming to `VTFrameProcessorConfiguration` without starting a session.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtframeprocessorconfiguration?language=objc)
#[cfg(feature = "objc2")]
pub unsafe trait VTFrameProcessorConfiguration: NSObjectProtocol + Send + Sync {
/// Returns a Boolean indicating whether the system supports this processor on the current configuration.
#[unsafe(method(isSupported))]
#[unsafe(method_family = none)]
unsafe fn isSupported() -> bool;
#[cfg(feature = "objc2-foundation")]
/// List of supported pixel formats for source frames for the current configuration.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(frameSupportedPixelFormats))]
#[unsafe(method_family = none)]
unsafe fn frameSupportedPixelFormats(&self) -> Retained<NSArray<NSNumber>>;
#[cfg(feature = "objc2-foundation")]
/// Pixel buffer attributes dictionary that describes requirements for pixel buffers which represent source frames and reference frames.
///
/// Use ``CVPixelBufferCreateResolvedAttributesDictionary`` to combine this dictionary with your pixel buffer attributes dictionary.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(sourcePixelBufferAttributes))]
#[unsafe(method_family = none)]
unsafe fn sourcePixelBufferAttributes(&self)
-> Retained<NSDictionary<NSString, AnyObject>>;
#[cfg(feature = "objc2-foundation")]
/// Pixel buffer attributes dictionary that describes requirements for pixel buffers which represent destination frames.
///
/// Use ``CVPixelBufferCreateResolvedAttributesDictionary`` to combine this dictionary with your pixel buffer attributes dictionary.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(destinationPixelBufferAttributes))]
#[unsafe(method_family = none)]
unsafe fn destinationPixelBufferAttributes(
&self,
) -> Retained<NSDictionary<NSString, AnyObject>>;
/// Returns the number of "next" frames that this processor requires for processing.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[optional]
#[unsafe(method(nextFrameCount))]
#[unsafe(method_family = none)]
unsafe fn nextFrameCount(&self) -> NSInteger;
/// Returns the number of "previous" frames that this processor requires for processing.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[optional]
#[unsafe(method(previousFrameCount))]
#[unsafe(method_family = none)]
unsafe fn previousFrameCount(&self) -> NSInteger;
#[cfg(feature = "objc2-core-media")]
/// Returns the maximum dimensions for a `sourceFrame` for the processor.
#[optional]
#[unsafe(method(maximumDimensions))]
#[unsafe(method_family = none)]
unsafe fn maximumDimensions() -> CMVideoDimensions;
#[cfg(feature = "objc2-core-media")]
/// Returns the minimum dimensions for a `sourceFrame` for the processor.
#[optional]
#[unsafe(method(minimumDimensions))]
#[unsafe(method_family = none)]
unsafe fn minimumDimensions() -> CMVideoDimensions;
}
);