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 VTFrameProcessorConfiguration protocol describes the configuration of a processor to be used during a video processing session.
16    ///
17    ///
18    /// VTFrameProcessorConfiguration protocol conformance is used to start an frame processing session.  These properties can be  queried 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 {
23        /// Returns a Boolean indicating whether the processor supported on the current config.
24        #[unsafe(method(processorSupported))]
25        #[unsafe(method_family = none)]
26        unsafe fn processorSupported() -> Boolean;
27
28        #[cfg(feature = "objc2-foundation")]
29        /// Returns a list of supported pixel formats for the current configuration
30        #[unsafe(method(frameSupportedPixelFormats))]
31        #[unsafe(method_family = none)]
32        unsafe fn frameSupportedPixelFormats(&self) -> Retained<NSArray<NSNumber>>;
33
34        #[cfg(feature = "objc2-foundation")]
35        /// Returns a dictionary of CVPixelBuffer attributes which source and reference frames passed to the processor must conform to.
36        #[unsafe(method(sourcePixelBufferAttributes))]
37        #[unsafe(method_family = none)]
38        unsafe fn sourcePixelBufferAttributes(&self) -> Retained<NSDictionary>;
39
40        #[cfg(feature = "objc2-foundation")]
41        /// Returns a dictionary of CVPixelBuffer attributes which output frames passed to the processor must conform to.
42        #[unsafe(method(destinationPixelBufferAttributes))]
43        #[unsafe(method_family = none)]
44        unsafe fn destinationPixelBufferAttributes(&self) -> Retained<NSDictionary>;
45
46        /// returns the number of "next" frames that this processor requires for processing.
47        #[optional]
48        #[unsafe(method(nextFrameCount))]
49        #[unsafe(method_family = none)]
50        unsafe fn nextFrameCount(&self) -> NSInteger;
51
52        /// returns the number of "previous" frames that this processor requires for processing.
53        #[optional]
54        #[unsafe(method(previousFrameCount))]
55        #[unsafe(method_family = none)]
56        unsafe fn previousFrameCount(&self) -> NSInteger;
57
58        #[cfg(feature = "objc2-core-media")]
59        /// returns the maximum dimension for a sourceFrame for the processor
60        #[optional]
61        #[unsafe(method(maximumDimensions))]
62        #[unsafe(method_family = none)]
63        unsafe fn maximumDimensions() -> CMVideoDimensions;
64
65        #[cfg(feature = "objc2-core-media")]
66        /// returns the minimum dimension for a sourceFrame for the processor
67        #[optional]
68        #[unsafe(method(minimumDimensions))]
69        #[unsafe(method_family = none)]
70        unsafe fn minimumDimensions() -> CMVideoDimensions;
71    }
72);