objc2_ar_kit/generated/
ARVideoFormat.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-av-foundation")]
7use objc2_av_foundation::*;
8#[cfg(feature = "objc2-core-foundation")]
9use objc2_core_foundation::*;
10#[cfg(feature = "objc2-foundation")]
11use objc2_foundation::*;
12
13use crate::*;
14
15#[cfg(feature = "objc2")]
16extern_class!(
17    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arvideoformat?language=objc)
18    #[unsafe(super(NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(feature = "objc2")]
21    pub struct ARVideoFormat;
22);
23
24#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
25extern_conformance!(
26    unsafe impl NSCopying for ARVideoFormat {}
27);
28
29#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
30unsafe impl CopyingHelper for ARVideoFormat {
31    type Result = Self;
32}
33
34#[cfg(feature = "objc2")]
35extern_conformance!(
36    unsafe impl NSObjectProtocol for ARVideoFormat {}
37);
38
39#[cfg(feature = "objc2")]
40impl ARVideoFormat {
41    extern_methods!(
42        #[cfg(feature = "objc2-av-foundation")]
43        /// Indicates the physical position of an AVCaptureDevice's hardware on the system.
44        #[unsafe(method(captureDevicePosition))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn captureDevicePosition(&self) -> AVCaptureDevicePosition;
47
48        #[cfg(feature = "objc2-av-foundation")]
49        /// Indicates the type of AVCaptureDevice.
50        #[unsafe(method(captureDeviceType))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn captureDeviceType(&self) -> Retained<AVCaptureDeviceType>;
53
54        #[cfg(feature = "objc2-core-foundation")]
55        /// Image resolution.
56        #[unsafe(method(imageResolution))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn imageResolution(&self) -> CGSize;
59
60        /// Frame rate.
61        #[unsafe(method(framesPerSecond))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn framesPerSecond(&self) -> NSInteger;
64
65        /// Indicates if the video format is recommended for capturing high resolution frames.
66        #[unsafe(method(isRecommendedForHighResolutionFrameCapturing))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn isRecommendedForHighResolutionFrameCapturing(&self) -> bool;
69
70        /// Indicates if the video format supports high dynamic range (HDR) streaming.
71        #[unsafe(method(isVideoHDRSupported))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn isVideoHDRSupported(&self) -> bool;
74
75        #[cfg(feature = "objc2-av-foundation")]
76        /// The color space ARKit uses to configure the capture session when this video format is selected.
77        #[unsafe(method(defaultColorSpace))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn defaultColorSpace(&self) -> AVCaptureColorSpace;
80
81        #[cfg(feature = "objc2-av-foundation")]
82        /// The default AVCapturePhotoSettings object that ARKit uses when capturing a high resolution frame using this video format.
83        ///
84        /// Calling this getter will return a new instance that may be mutated to customize settings. Pass that instance to
85        /// `captureHighResolutionFrameUsingPhotoSettings:completion:` to capture a high resolution frame with custom settings.
86        ///
87        /// See: [ARSession captureHighResolutionFrameUsingPhotoSettings:completion:]
88        ///
89        /// Returns: An AVCapturePhotoSettings object.
90        #[unsafe(method(defaultPhotoSettings))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn defaultPhotoSettings(&self) -> Retained<AVCapturePhotoSettings>;
93
94        /// Unavailable
95        #[unsafe(method(init))]
96        #[unsafe(method_family = init)]
97        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
98
99        #[unsafe(method(new))]
100        #[unsafe(method_family = new)]
101        pub unsafe fn new() -> Retained<Self>;
102    );
103}