objc2_av_foundation/generated/
AVSpatialVideoConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-media")]
7use objc2_core_media::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// An AVSpatialVideoConfiguration specifies spatial video properties.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avspatialvideoconfiguration?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct AVSpatialVideoConfiguration;
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for AVSpatialVideoConfiguration {}
23);
24
25impl AVSpatialVideoConfiguration {
26    extern_methods!(
27        /// Specifies intrinsic and extrinsic parameters for single or multiple lenses.
28        ///
29        /// The property value is an array of dictionaries describing the camera calibration data for each lens. The camera calibration data includes intrinsics and extrinics with other parameters.  This property is only applicable when the projection kind is kCMTagProjectionTypeParametricImmersive.  Can be nil if the value is unknown.
30        #[unsafe(method(cameraCalibrationDataLensCollection))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn cameraCalibrationDataLensCollection(
33            &self,
34        ) -> Option<Retained<NSArray<NSDictionary<NSString, AnyObject>>>>;
35
36        /// Setter for [`cameraCalibrationDataLensCollection`][Self::cameraCalibrationDataLensCollection].
37        ///
38        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
39        ///
40        /// # Safety
41        ///
42        /// `camera_calibration_data_lens_collection` generic generic should be of the correct type.
43        #[unsafe(method(setCameraCalibrationDataLensCollection:))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn setCameraCalibrationDataLensCollection(
46            &self,
47            camera_calibration_data_lens_collection: Option<
48                &NSArray<NSDictionary<NSString, AnyObject>>,
49            >,
50        );
51
52        /// Specifies horizontal field of view in thousandths of a degree. Can be nil if the value is unknown.
53        #[unsafe(method(horizontalFieldOfView))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn horizontalFieldOfView(&self) -> Option<Retained<NSNumber>>;
56
57        /// Setter for [`horizontalFieldOfView`][Self::horizontalFieldOfView].
58        ///
59        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
60        #[unsafe(method(setHorizontalFieldOfView:))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn setHorizontalFieldOfView(&self, horizontal_field_of_view: Option<&NSNumber>);
63
64        /// Specifies the distance between centers of the lenses of the camera system that created the video.
65        ///
66        /// The distance is in micrometers or thousandths of a millimeter. Can be nil if the value is unknown.
67        #[unsafe(method(cameraSystemBaseline))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn cameraSystemBaseline(&self) -> Option<Retained<NSNumber>>;
70
71        /// Setter for [`cameraSystemBaseline`][Self::cameraSystemBaseline].
72        ///
73        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
74        #[unsafe(method(setCameraSystemBaseline:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn setCameraSystemBaseline(&self, camera_system_baseline: Option<&NSNumber>);
77
78        /// Specifies a relative shift of the left and right images, which changes the zero parallax plane.
79        ///
80        /// The value is in normalized image space and measured over the range of -10000 to 10000 mapping to the uniform range [-1.0...1.0]. The interval of 0.0 to 1.0 or 0 to 10000 maps onto the stereo eye view image width. The negative interval 0.0 to -1.0 or 0 to -10000 similarly map onto the stereo eye view image width. Can be nil if the value is unknown.
81        #[unsafe(method(disparityAdjustment))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn disparityAdjustment(&self) -> Option<Retained<NSNumber>>;
84
85        /// Setter for [`disparityAdjustment`][Self::disparityAdjustment].
86        ///
87        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
88        #[unsafe(method(setDisparityAdjustment:))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn setDisparityAdjustment(&self, disparity_adjustment: Option<&NSNumber>);
91
92        #[unsafe(method(init))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95
96        #[cfg(feature = "objc2-core-media")]
97        /// Initializes an AVSpatialVideoConfiguration with a format description.
98        ///
99        /// The format description is not stored.
100        /// - Parameter formatDescription: Format description to use to initialize the AVSpatialVideoConfiguration.
101        ///
102        /// - Returns: An instance of AVSpatialVideoConfiguration
103        #[unsafe(method(initWithFormatDescription:))]
104        #[unsafe(method_family = init)]
105        pub unsafe fn initWithFormatDescription(
106            this: Allocated<Self>,
107            format_description: &CMFormatDescription,
108        ) -> Retained<Self>;
109    );
110}
111
112/// Methods declared on superclass `NSObject`.
113impl AVSpatialVideoConfiguration {
114    extern_methods!(
115        #[unsafe(method(new))]
116        #[unsafe(method_family = new)]
117        pub unsafe fn new() -> Retained<Self>;
118    );
119}