objc2_video_toolbox/generated/
VTFrameProcessorConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-media")]
7use objc2_core_media::*;
8#[cfg(feature = "objc2-foundation")]
9use objc2_foundation::*;
10
11use crate::*;
12
13#[cfg(feature = "objc2")]
14extern_protocol!(
15    /// The protocol that describes the configuration of a processor for a video frame processing session.
16    ///
17    /// Use `VTFrameProcessorConfiguration` protocol conformance to start a frame processing session. You can query these
18    /// properties on an implementation conforming to `VTFrameProcessorConfiguration` without starting a session.
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/videotoolbox/vtframeprocessorconfiguration?language=objc)
21    #[cfg(feature = "objc2")]
22    pub unsafe trait VTFrameProcessorConfiguration: NSObjectProtocol + Send + Sync {
23        /// Returns a Boolean indicating whether the system supports this processor on the current configuration.
24        #[unsafe(method(isSupported))]
25        #[unsafe(method_family = none)]
26        unsafe fn isSupported() -> bool;
27
28        #[cfg(feature = "objc2-foundation")]
29        /// List of supported pixel formats for source frames for the current configuration.
30        ///
31        /// This property is not atomic.
32        ///
33        /// # Safety
34        ///
35        /// This might not be thread-safe.
36        #[unsafe(method(frameSupportedPixelFormats))]
37        #[unsafe(method_family = none)]
38        unsafe fn frameSupportedPixelFormats(&self) -> Retained<NSArray<NSNumber>>;
39
40        #[cfg(feature = "objc2-foundation")]
41        /// Pixel buffer attributes dictionary that describes requirements for pixel buffers which represent source frames and reference frames.
42        ///
43        /// Use ``CVPixelBufferCreateResolvedAttributesDictionary`` to combine this dictionary with your pixel buffer attributes dictionary.
44        ///
45        /// This property is not atomic.
46        ///
47        /// # Safety
48        ///
49        /// This might not be thread-safe.
50        #[unsafe(method(sourcePixelBufferAttributes))]
51        #[unsafe(method_family = none)]
52        unsafe fn sourcePixelBufferAttributes(&self)
53            -> Retained<NSDictionary<NSString, AnyObject>>;
54
55        #[cfg(feature = "objc2-foundation")]
56        /// Pixel buffer attributes dictionary that describes requirements for pixel buffers which represent destination frames.
57        ///
58        /// Use ``CVPixelBufferCreateResolvedAttributesDictionary`` to combine this dictionary with your pixel buffer attributes dictionary.
59        ///
60        /// This property is not atomic.
61        ///
62        /// # Safety
63        ///
64        /// This might not be thread-safe.
65        #[unsafe(method(destinationPixelBufferAttributes))]
66        #[unsafe(method_family = none)]
67        unsafe fn destinationPixelBufferAttributes(
68            &self,
69        ) -> Retained<NSDictionary<NSString, AnyObject>>;
70
71        /// Returns the number of "next" frames that this processor requires for processing.
72        ///
73        /// This property is not atomic.
74        ///
75        /// # Safety
76        ///
77        /// This might not be thread-safe.
78        #[optional]
79        #[unsafe(method(nextFrameCount))]
80        #[unsafe(method_family = none)]
81        unsafe fn nextFrameCount(&self) -> NSInteger;
82
83        /// Returns the number of "previous" frames that this processor requires for processing.
84        ///
85        /// This property is not atomic.
86        ///
87        /// # Safety
88        ///
89        /// This might not be thread-safe.
90        #[optional]
91        #[unsafe(method(previousFrameCount))]
92        #[unsafe(method_family = none)]
93        unsafe fn previousFrameCount(&self) -> NSInteger;
94
95        #[cfg(feature = "objc2-core-media")]
96        /// Returns the maximum dimensions for a `sourceFrame` for the processor.
97        #[optional]
98        #[unsafe(method(maximumDimensions))]
99        #[unsafe(method_family = none)]
100        unsafe fn maximumDimensions() -> CMVideoDimensions;
101
102        #[cfg(feature = "objc2-core-media")]
103        /// Returns the minimum dimensions for a `sourceFrame` for the processor.
104        #[optional]
105        #[unsafe(method(minimumDimensions))]
106        #[unsafe(method_family = none)]
107        unsafe fn minimumDimensions() -> CMVideoDimensions;
108    }
109);