objc2_av_foundation/generated/
AVCapturePhotoOutput.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-graphics")]
7use objc2_core_graphics::*;
8#[cfg(feature = "objc2-core-media")]
9use objc2_core_media::*;
10#[cfg(feature = "objc2-core-video")]
11use objc2_core_video::*;
12use objc2_foundation::*;
13
14use crate::*;
15
16/// Constants indicating how photo quality should be prioritized against speed.
17///
18///
19/// Indicates that speed of photo delivery is most important, even at the expense of quality.
20///
21/// Indicates that photo quality and speed of delivery are balanced in priority.
22///
23/// Indicates that photo quality is paramount, even at the expense of shot-to-shot time.
24///
25/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotoqualityprioritization?language=objc)
26// NS_ENUM
27#[repr(transparent)]
28#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
29pub struct AVCapturePhotoQualityPrioritization(pub NSInteger);
30impl AVCapturePhotoQualityPrioritization {
31    #[doc(alias = "AVCapturePhotoQualityPrioritizationSpeed")]
32    pub const Speed: Self = Self(1);
33    #[doc(alias = "AVCapturePhotoQualityPrioritizationBalanced")]
34    pub const Balanced: Self = Self(2);
35    #[doc(alias = "AVCapturePhotoQualityPrioritizationQuality")]
36    pub const Quality: Self = Self(3);
37}
38
39unsafe impl Encode for AVCapturePhotoQualityPrioritization {
40    const ENCODING: Encoding = NSInteger::ENCODING;
41}
42
43unsafe impl RefEncode for AVCapturePhotoQualityPrioritization {
44    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
45}
46
47/// Constants indicating whether the output is ready to receive capture requests.
48///
49///
50/// Indicates that the session is not running and the output is not ready to receive requests.
51///
52/// Indicates that the output is ready to receive new requests.
53///
54/// Indicates that the output is not ready to receive requests and may be ready shortly.
55///
56/// Indicates that the output is not ready to receive requests for a longer duration because it is busy capturing.
57///
58/// Indicates that the output is not ready to receive requests for a longer duration because it is busy processing.
59///
60/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutputcapturereadiness?language=objc)
61// NS_ENUM
62#[repr(transparent)]
63#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
64pub struct AVCapturePhotoOutputCaptureReadiness(pub NSInteger);
65impl AVCapturePhotoOutputCaptureReadiness {
66    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessSessionNotRunning")]
67    pub const SessionNotRunning: Self = Self(0);
68    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessReady")]
69    pub const Ready: Self = Self(1);
70    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessNotReadyMomentarily")]
71    pub const NotReadyMomentarily: Self = Self(2);
72    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessNotReadyWaitingForCapture")]
73    pub const NotReadyWaitingForCapture: Self = Self(3);
74    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessNotReadyWaitingForProcessing")]
75    pub const NotReadyWaitingForProcessing: Self = Self(4);
76}
77
78unsafe impl Encode for AVCapturePhotoOutputCaptureReadiness {
79    const ENCODING: Encoding = NSInteger::ENCODING;
80}
81
82unsafe impl RefEncode for AVCapturePhotoOutputCaptureReadiness {
83    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
84}
85
86extern_class!(
87    /// AVCapturePhotoOutput is a concrete subclass of AVCaptureOutput that supersedes AVCaptureStillImageOutput as the preferred interface for capturing photos. In addition to capturing all flavors of still image supported by AVCaptureStillImageOutput, it supports Live Photo capture, preview-sized image delivery, wide color, RAW, RAW+JPG and RAW+DNG formats.
88    ///
89    ///
90    /// Taking a photo is multi-step process. Clients wishing to build a responsive UI need to know about the progress of a photo capture request as it advances from capture to processing to finished delivery. AVCapturePhotoOutput informs clients of photo capture progress through a delegate protocol. To take a picture, a client instantiates and configures an AVCapturePhotoSettings object, then calls AVCapturePhotoOutput's -capturePhotoWithSettings:delegate:, passing a delegate to be informed when events relating to the photo capture occur (e.g., the photo is about to be captured, the photo has been captured but not processed yet, the Live Photo movie is ready, etc.).
91    ///
92    /// Some AVCapturePhotoSettings properties can be set to "Auto", such as flashMode. When set to AVCaptureFlashModeAuto, the photo output decides at capture time whether the current scene and lighting conditions require use of the flash. Thus the client doesn't know with certainty which features will be enabled when making the capture request. With the first and each subsequent delegate callback, the client is provided an AVCaptureResolvedPhotoSettings instance that indicates the settings that were applied to the capture. All "Auto" features have now been resolved to on or off. The AVCaptureResolvedPhotoSettings object passed in the client's delegate callbacks has a uniqueID identical to the AVCapturePhotoSettings request. This uniqueID allows clients to pair unresolved and resolved settings objects. See AVCapturePhotoCaptureDelegate below for a detailed discussion of the delegate callbacks.
93    ///
94    /// Enabling certain photo features (Live Photo capture and high resolution capture) requires a reconfiguration of the capture render pipeline. Clients wishing to opt in for these features should call -setLivePhotoCaptureEnabled: and/or -setHighResolutionCaptureEnabled: before calling -startRunning on the AVCaptureSession. Changing any of these properties while the session is running requires a disruptive reconfiguration of the capture render pipeline. Live Photo captures in progress will be ended immediately; unfulfilled photo requests will be aborted; video preview will temporarily freeze. If you wish to capture Live Photos containing sound, you must add an audio AVCaptureDeviceInput to your AVCaptureSession.
95    ///
96    /// Simultaneous Live Photo capture and MovieFileOutput capture is not supported. If an AVCaptureMovieFileOutput is added to your session, AVCapturePhotoOutput's livePhotoCaptureSupported property returns NO. Note that simultaneous Live Photo capture and AVCaptureVideoDataOutput is supported.
97    ///
98    /// AVCaptureStillImageOutput and AVCapturePhotoOutput may not both be added to a capture session. You must use one or the other. If you add both to a session, a NSInvalidArgumentException is thrown.
99    ///
100    /// AVCapturePhotoOutput implicitly supports wide color photo capture, following the activeColorSpace of the source AVCaptureDevice. If the source device's activeColorSpace is AVCaptureColorSpace_P3_D65, photos are encoded with wide color information, unless you've specified an output format of '420v', which does not support wide color.
101    ///
102    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutput?language=objc)
103    #[unsafe(super(AVCaptureOutput, NSObject))]
104    #[derive(Debug, PartialEq, Eq, Hash)]
105    #[cfg(feature = "AVCaptureOutputBase")]
106    pub struct AVCapturePhotoOutput;
107);
108
109#[cfg(feature = "AVCaptureOutputBase")]
110unsafe impl NSObjectProtocol for AVCapturePhotoOutput {}
111
112#[cfg(feature = "AVCaptureOutputBase")]
113impl AVCapturePhotoOutput {
114    extern_methods!(
115        #[unsafe(method(init))]
116        #[unsafe(method_family = init)]
117        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
118
119        #[unsafe(method(new))]
120        #[unsafe(method_family = new)]
121        pub unsafe fn new() -> Retained<Self>;
122
123        /// Method for initiating a photo capture request with progress monitoring through the supplied delegate.
124        ///
125        ///
126        /// Parameter `settings`: An AVCapturePhotoSettings object you have configured. May not be nil.
127        ///
128        /// Parameter `delegate`: An object conforming to the AVCapturePhotoCaptureDelegate protocol. This object's delegate methods are called back as the photo advances from capture to processing to finished delivery. May not be nil.
129        ///
130        ///
131        /// This method initiates a photo capture. The receiver copies your provided settings to prevent unintentional mutation. It is illegal to re-use settings. The receiver throws a NSInvalidArgumentException if your settings.uniqueID matches that of any previously used settings. This method is used to initiate all flavors of photo capture: single photo, RAW capture with or without a processed image (such as a JPEG), bracketed capture, and Live Photo.
132        ///
133        /// Clients need not wait for a capture photo request to complete before issuing another request. This is true for single photo captures as well as Live Photos, where movie complements of adjacent photo captures are allowed to overlap.
134        ///
135        /// This method validates your settings and enforces the following rules in order to ensure deterministic behavior. If any of these rules are violated, a NSInvalidArgumentException is thrown.
136        /// RAW rules:
137        /// See +isBayerRAWPixelFormat: and +isAppleProRAWPixelFormat: on the difference between Bayer RAW and Apple ProRAW pixel formats.
138        /// Common RAW rules:
139        /// - If rawPhotoPixelFormatType is non-zero, it must be present in the receiver's -availableRawPhotoPixelFormatTypes array.
140        /// - If rawPhotoPixelFormatType is non-zero, your delegate must respond to -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:.
141        /// - If rawPhotoPixelFormatType is non-zero, highResolutionPhotoEnabled may be YES or NO, but the setting only applies to the processed image, if you've specified one.
142        /// - If rawPhotoPixelFormatType is non-zero, constantColorEnabled must be set to NO.
143        /// - If rawFileType is specified, it must be present in -availableRawPhotoFileTypes and must support the rawPhotoPixelFormatType specified using -supportedRawPhotoPixelFormatTypesForFileType:.
144        /// Bayer RAW rules (isBayerRAWPixelFormat: returns yes for rawPhotoPixelFormatType):
145        /// - photoQualityPrioritization must be set to AVCapturePhotoQualityPrioritizationSpeed (deprecated autoStillImageStabilizationEnabled must be set to NO).
146        /// - the videoZoomFactor of the source device and the videoScaleAndCropFactor of the photo output's video connection must both be 1.0. Ensure no zoom is applied before requesting a RAW capture, and don't change the zoom during RAW capture.
147        /// Apple ProRAW rules (isAppleProRAWPixelFormat: returns yes for rawPhotoPixelFormatType):
148        /// - livePhotoMovieFileURL must be nil in AVCapturePhotoSettings settings
149        /// - autoContentAwareDistortionCorrectionEnabled will automatically be disabled in AVCapturePhotoSettings
150        /// - autoRedEyeReductionEnabled will automatically be disabled in AVCapturePhotoSettings
151        /// - portraitEffectsMatteDeliveryEnabled will automatically be disabled in AVCapturePhotoSettings
152        /// - enabledSemanticSegmentationMatteTypes will automatically be cleared in AVCapturePhotoSettings
153        /// Processed Format rules:
154        /// - If format is non-nil, a kCVPixelBufferPixelFormatTypeKey or AVVideoCodecKey must be present, and both may not be present.
155        /// - If format has a kCVPixelBufferPixelFormatTypeKey, its value must be present in the receiver's -availablePhotoPixelFormatTypes array.
156        /// - If format has a AVVideoCodecKey, its value must be present in the receiver's -availablePhotoCodecTypes array.
157        /// - If format is non-nil, your delegate must respond to -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:.
158        /// - If processedFileType is specified, it must be present in -availablePhotoFileTypes and must support the format's specified kCVPixelBufferPixelFormatTypeKey (using -supportedPhotoPixelFormatTypesForFileType:) or AVVideoCodecKey (using -supportedPhotoCodecTypesForFileType:).
159        /// - The photoQualityPrioritization you specify may not be a greater number than the photo output's maxPhotoQualityPrioritization. You must set your AVCapturePhotoOutput maxPhotoQualityPrioritization up front.
160        /// Flash rules:
161        /// - The specified flashMode must be present in the receiver's -supportedFlashModes array.
162        /// Live Photo rules:
163        /// - The receiver's livePhotoCaptureEnabled must be YES if settings.livePhotoMovieURL is non-nil.
164        /// - If settings.livePhotoMovieURL is non-nil, the receiver's livePhotoCaptureSuspended property must be set to NO.
165        /// - If settings.livePhotoMovieURL is non-nil, it must be a file URL that's accessible to your app's sandbox.
166        /// - If settings.livePhotoMovieURL is non-nil, your delegate must respond to -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:.
167        /// Bracketed capture rules:
168        /// - bracketedSettings.count must be
169        /// <
170        /// = the receiver's maxBracketedCapturePhotoCount property.
171        /// - For manual exposure brackets, ISO value must be within the source device activeFormat's minISO and maxISO values.
172        /// - For manual exposure brackets, exposureDuration value must be within the source device activeFormat's minExposureDuration and maxExposureDuration values.
173        /// - For auto exposure brackets, exposureTargetBias value must be within the source device's minExposureTargetBias and maxExposureTargetBias values.
174        /// Deferred Photo Delivery rules:
175        /// - If the receiver's autoDeferredPhotoDeliveryEnabled is YES, your delegate must respond to -captureOutput:didFinishCapturingDeferredPhotoProxy:error:.
176        /// - The maxPhotoDimensions setting for 24MP (5712, 4284), when supported, is only serviced as 24MP via deferred photo delivery.
177        /// Color space rules:
178        /// - Photo capture is not supported when AVCaptureDevice has selected AVCaptureColorSpace_AppleLog as color space.
179        #[unsafe(method(capturePhotoWithSettings:delegate:))]
180        #[unsafe(method_family = none)]
181        pub unsafe fn capturePhotoWithSettings_delegate(
182            &self,
183            settings: &AVCapturePhotoSettings,
184            delegate: &ProtocolObject<dyn AVCapturePhotoCaptureDelegate>,
185        );
186
187        /// An array of AVCapturePhotoSettings instances for which the receiver is prepared to capture.
188        ///
189        ///
190        /// See also setPreparedPhotoSettingsArray:completionHandler:
191        /// Some types of photo capture, such as bracketed captures and RAW captures, require the receiver to allocate additional buffers or prepare other resources. To prevent photo capture requests from executing slowly due to lazy resource allocation, you may call -setPreparedPhotoSettingsArray:completionHandler: with an array of settings objects representative of the types of capture you will be performing (e.g., settings for a bracketed capture, RAW capture, and/or still image stabilization capture). By default, the receiver prepares sufficient resources to capture photos with default settings, +[AVCapturePhotoSettings photoSettings].
192        #[unsafe(method(preparedPhotoSettingsArray))]
193        #[unsafe(method_family = none)]
194        pub unsafe fn preparedPhotoSettingsArray(
195            &self,
196        ) -> Retained<NSArray<AVCapturePhotoSettings>>;
197
198        #[cfg(feature = "block2")]
199        /// Method allowing the receiver to prepare resources in advance for future -capturePhotoWithSettings:delegate: requests.
200        ///
201        ///
202        /// Parameter `preparedPhotoSettingsArray`: An array of AVCapturePhotoSettings instances indicating the types of capture for which the receiver should prepare resources.
203        ///
204        /// Parameter `completionHandler`: A completion block to be fired on a serial dispatch queue once the receiver has finished preparing. You may pass nil to indicate you do not wish to be called back when preparation is complete.
205        ///
206        ///
207        /// Some types of photo capture, such as bracketed captures and RAW captures, require the receiver to allocate additional buffers or prepare other resources. To prevent photo capture requests from executing slowly due to lazy resource allocation, you may call this method with an array of settings objects representative of the types of capture you will be performing (e.g., settings for a bracketed capture, RAW capture, and/or still image stabilization capture). You may call this method even before calling -[AVCaptureSession startRunning] in order to hint the receiver up front which features you'll be utilizing. Each time you call this method with an array of settings, the receiver evaluates what additional resources it needs to allocate, as well as existing resources that can be reclaimed, and calls back your completionHandler when it has finished preparing (and possibly reclaiming) needed resources. By default, the receiver prepares sufficient resources to capture photos with default settings, +[AVCapturePhotoSettings photoSettings]. If you wish to reclaim all possible resources, you may call this method with an empty array.
208        ///
209        /// Preparation for photo capture is always optional. You may call -capturePhotoWithSettings:delegate: without first calling -setPreparedPhotoSettingsArray:completionHandler:, but be advised that some of your photo captures may execute slowly as additional resources are allocated just-in-time.
210        ///
211        /// If you call this method while your AVCaptureSession is not running, your completionHandler does not fire immediately. It only fires once you've called -[AVCaptureSession startRunning], and the needed resources have actually been prepared. If you call -setPreparedPhotoSettingsArray:completionHandler: with an array of settings, and then call it a second time, your first prepare call's completionHandler fires immediately with prepared == NO.
212        ///
213        /// Prepared settings persist across session starts/stops and committed configuration changes. This property participates in -[AVCaptureSession beginConfiguration] / -[AVCaptureSession commitConfiguration] deferred work behavior. That is, if you call -[AVCaptureSession beginConfiguration], change your session's input/output topology, and call this method, preparation is deferred until you call -[AVCaptureSession commitConfiguration], enabling you to atomically commit a new configuration as well as prepare to take photos in that new configuration.
214        #[unsafe(method(setPreparedPhotoSettingsArray:completionHandler:))]
215        #[unsafe(method_family = none)]
216        pub unsafe fn setPreparedPhotoSettingsArray_completionHandler(
217            &self,
218            prepared_photo_settings_array: &NSArray<AVCapturePhotoSettings>,
219            completion_handler: Option<&block2::Block<dyn Fn(Bool, *mut NSError)>>,
220        );
221
222        /// An array of kCVPixelBufferPixelFormatTypeKey values that are currently supported by the receiver.
223        ///
224        ///
225        /// If you wish to capture a photo in an uncompressed format, such as 420f, 420v, or BGRA, you must ensure that the format you want is present in the receiver's availablePhotoPixelFormatTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no pixel format types are available. This property is key-value observable.
226        #[unsafe(method(availablePhotoPixelFormatTypes))]
227        #[unsafe(method_family = none)]
228        pub unsafe fn availablePhotoPixelFormatTypes(&self) -> Retained<NSArray<NSNumber>>;
229
230        #[cfg(feature = "AVVideoSettings")]
231        /// An array of AVVideoCodecKey values that are currently supported by the receiver.
232        ///
233        ///
234        /// If you wish to capture a photo in a compressed format, such as JPEG, you must ensure that the format you want is present in the receiver's availablePhotoCodecTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no codec types are available. This property is key-value observable.
235        #[unsafe(method(availablePhotoCodecTypes))]
236        #[unsafe(method_family = none)]
237        pub unsafe fn availablePhotoCodecTypes(&self) -> Retained<NSArray<AVVideoCodecType>>;
238
239        #[cfg(feature = "AVVideoSettings")]
240        /// An array of available AVVideoCodecType values that may be used for the raw photo.
241        ///
242        ///
243        /// Not all codecs can be used for all rawPixelFormatType values and this call will show all of the possible codecs available. To check if a codec is available for a specific rawPixelFormatType and rawFileType, one should use supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:.
244        #[unsafe(method(availableRawPhotoCodecTypes))]
245        #[unsafe(method_family = none)]
246        pub unsafe fn availableRawPhotoCodecTypes(&self) -> Retained<NSArray<AVVideoCodecType>>;
247
248        /// Indicates whether the current configuration supports Apple ProRAW pixel formats.
249        ///
250        ///
251        /// The AVCapturePhotoSettings appleProRAWEnabled property may only be set to YES if this property returns YES. This property is key-value observable.
252        #[unsafe(method(isAppleProRAWSupported))]
253        #[unsafe(method_family = none)]
254        pub unsafe fn isAppleProRAWSupported(&self) -> bool;
255
256        /// Indicates whether the photo output is configured for delivery of Apple ProRAW pixel formats as well as Bayer RAW formats.
257        ///
258        ///
259        /// Setting this property to YES will enable support for taking photos in Apple ProRAW pixel formats. These formats will be added to -availableRawPhotoPixelFormatTypes after any existing Bayer RAW formats. Compared to photos taken with a Bayer RAW format, these photos will be demosaiced and partially processed. They are still scene-referred, and allow capturing RAW photos in modes where there is no traditional sensor/Bayer RAW available. Examples are any modes that rely on fusion of multiple captures. Use +isBayerRAWPixelFormat: to determine if a pixel format in -availableRawPhotoPixelFormatTypes is a Bayer RAW format, and +isAppleProRAWPixelFormat: to determine if it is an Apple ProRAW format. When writing an Apple ProRAW buffer to a DNG file, the resulting file is known as "Linear DNG". Apple ProRAW formats are not supported on all platforms and devices. This property may only be set to YES if appleProRAWSupported returns YES. This property is key-value observable.
260        ///
261        /// Enabling this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning].
262        #[unsafe(method(isAppleProRAWEnabled))]
263        #[unsafe(method_family = none)]
264        pub unsafe fn isAppleProRAWEnabled(&self) -> bool;
265
266        /// Setter for [`isAppleProRAWEnabled`][Self::isAppleProRAWEnabled].
267        #[unsafe(method(setAppleProRAWEnabled:))]
268        #[unsafe(method_family = none)]
269        pub unsafe fn setAppleProRAWEnabled(&self, apple_pro_raw_enabled: bool);
270
271        /// Returns YES if the given pixel format is a Bayer RAW format.
272        ///
273        ///
274        /// May be used to distinguish Bayer RAW from Apple ProRAW pixel formats in -availableRawPhotoPixelFormatTypes once appleProRAWEnabled has been set to YES.
275        #[unsafe(method(isBayerRAWPixelFormat:))]
276        #[unsafe(method_family = none)]
277        pub unsafe fn isBayerRAWPixelFormat(pixel_format: OSType) -> bool;
278
279        /// Returns YES if the given pixel format is an Apple ProRAW format.
280        ///
281        ///
282        /// May be used to distinguish Bayer RAW from Apple ProRAW pixel formats in -availableRawPhotoPixelFormatTypes once appleProRAWEnabled has been set to YES.
283        ///
284        /// See appleProRAWEnabled for more information on Apple ProRAW.
285        #[unsafe(method(isAppleProRAWPixelFormat:))]
286        #[unsafe(method_family = none)]
287        pub unsafe fn isAppleProRAWPixelFormat(pixel_format: OSType) -> bool;
288
289        /// An array of RAW CVPixelBufferPixelFormatTypeKey values that are currently supported by the receiver.
290        ///
291        ///
292        /// If you wish to capture a RAW photo, you must ensure that the RAW format you want is present in the receiver's availableRawPhotoPixelFormatTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no RAW formats are available. See AVCapturePhotoOutput.appleProRAWEnabled on how to enable support for partially processed RAW formats. This property is key-value observable. RAW capture is not supported on all platforms.
293        #[unsafe(method(availableRawPhotoPixelFormatTypes))]
294        #[unsafe(method_family = none)]
295        pub unsafe fn availableRawPhotoPixelFormatTypes(&self) -> Retained<NSArray<NSNumber>>;
296
297        #[cfg(feature = "AVMediaFormat")]
298        /// An array of AVFileType values that are currently supported by the receiver.
299        ///
300        ///
301        /// If you wish to capture a photo that is formatted for a particular file container, such as HEIF, you must ensure that the fileType you desire is present in the receiver's availablePhotoFileTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no file types are available. This property is key-value observable.
302        #[unsafe(method(availablePhotoFileTypes))]
303        #[unsafe(method_family = none)]
304        pub unsafe fn availablePhotoFileTypes(&self) -> Retained<NSArray<AVFileType>>;
305
306        #[cfg(feature = "AVMediaFormat")]
307        /// An array of AVFileType values that are currently supported by the receiver for RAW capture.
308        ///
309        ///
310        /// If you wish to capture a RAW photo that is formatted for a particular file container, such as DNG, you must ensure that the fileType you desire is present in the receiver's availableRawPhotoFileTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no file types are available. This property is key-value observable.
311        #[unsafe(method(availableRawPhotoFileTypes))]
312        #[unsafe(method_family = none)]
313        pub unsafe fn availableRawPhotoFileTypes(&self) -> Retained<NSArray<AVFileType>>;
314
315        #[cfg(feature = "AVMediaFormat")]
316        /// An array of pixel format type values that are currently supported by the receiver for a particular file container.
317        ///
318        ///
319        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo.
320        ///
321        /// Returns: An array of CVPixelBufferPixelFormatTypeKey values supported by the receiver for the file type in question.
322        ///
323        ///
324        /// If you wish to capture a photo for storage in a particular file container, such as TIFF, you must ensure that the photo pixel format type you request is valid for that file type. If no pixel format types are supported for a given fileType, an empty array is returned. If you've not yet added your receiver to an AVCaptureSession with a video source, no pixel format types are supported.
325        #[unsafe(method(supportedPhotoPixelFormatTypesForFileType:))]
326        #[unsafe(method_family = none)]
327        pub unsafe fn supportedPhotoPixelFormatTypesForFileType(
328            &self,
329            file_type: &AVFileType,
330        ) -> Retained<NSArray<NSNumber>>;
331
332        #[cfg(all(feature = "AVMediaFormat", feature = "AVVideoSettings"))]
333        /// An array of AVVideoCodecKey values that are currently supported by the receiver for a particular file container.
334        ///
335        ///
336        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo.
337        ///
338        /// Returns: An array of AVVideoCodecKey values supported by the receiver for the file type in question.
339        ///
340        ///
341        /// If you wish to capture a photo for storage in a particular file container, such as HEIF, you must ensure that the photo codec type you request is valid for that file type. If no codec types are supported for a given fileType, an empty array is returned. If you've not yet added your receiver to an AVCaptureSession with a video source, no codec types are supported.
342        #[unsafe(method(supportedPhotoCodecTypesForFileType:))]
343        #[unsafe(method_family = none)]
344        pub unsafe fn supportedPhotoCodecTypesForFileType(
345            &self,
346            file_type: &AVFileType,
347        ) -> Retained<NSArray<AVVideoCodecType>>;
348
349        #[cfg(all(feature = "AVMediaFormat", feature = "AVVideoSettings"))]
350        /// An array of AVVideoCodecType values that are currently supported by the receiver for a particular file container and raw pixel format.
351        ///
352        ///
353        /// Parameter `pixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
354        ///
355        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo which can be retrieved from -availableRawPhotoFileTypes.
356        ///
357        /// Returns: An array of AVVideoCodecType values supported by the receiver for the file type and and raw pixel format in question.
358        ///
359        ///
360        /// If you wish to capture a raw photo for storage using a Bayer RAW or Apple ProRAW pixel format and to be stored in a file container, such as DNG, you must ensure that the codec type you request is valid for that file and pixel format type. If no RAW codec types are supported for a given file type and/or pixel format type, an empty array is returned. If you have not yet added your receiver to an AVCaptureSession with a video source, an empty array is returned.
361        #[unsafe(method(supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:))]
362        #[unsafe(method_family = none)]
363        pub unsafe fn supportedRawPhotoCodecTypesForRawPhotoPixelFormatType_fileType(
364            &self,
365            pixel_format_type: OSType,
366            file_type: &AVFileType,
367        ) -> Retained<NSArray<AVVideoCodecType>>;
368
369        #[cfg(feature = "AVMediaFormat")]
370        /// An array of CVPixelBufferPixelFormatType values that are currently supported by the receiver for a particular file container.
371        ///
372        ///
373        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo.
374        ///
375        /// Returns: An array of CVPixelBufferPixelFormatType values supported by the receiver for the file type in question.
376        ///
377        ///
378        /// If you wish to capture a photo for storage in a particular file container, such as DNG, you must ensure that the RAW pixel format type you request is valid for that file type. If no RAW pixel format types are supported for a given fileType, an empty array is returned. If you've not yet added your receiver to an AVCaptureSession with a video source, no pixel format types are supported.
379        #[unsafe(method(supportedRawPhotoPixelFormatTypesForFileType:))]
380        #[unsafe(method_family = none)]
381        pub unsafe fn supportedRawPhotoPixelFormatTypesForFileType(
382            &self,
383            file_type: &AVFileType,
384        ) -> Retained<NSArray<NSNumber>>;
385
386        /// Indicates the highest quality the receiver should be prepared to output on a capture-by-capture basis.
387        ///
388        ///
389        /// Default value is AVCapturePhotoQualityPrioritizationBalanced when attached to an AVCaptureSession, and AVCapturePhotoQualityPrioritizationSpeed when attached to an AVCaptureMultiCamSession. The AVCapturePhotoOutput is capable of applying a variety of techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc). Some techniques improve image quality at the expense of speed (shot-to-shot time). Before starting your session, you may set this property to indicate the highest quality prioritization you intend to request when calling -capturePhotoWithSettings:delegate:. When configuring an AVCapturePhotoSettings object, you may not exceed this quality prioritization level, but you may select a lower (speedier) prioritization level.
390        ///
391        /// Changing the maxPhotoQualityPrioritization while the session is running can result in a lengthy rebuild of the session in which video preview is disrupted.
392        ///
393        /// Setting the maxPhotoQualityPrioritization to .quality will turn on optical image stabilization if the -isHighPhotoQualitySupported of the source device's -activeFormat is true.
394        #[unsafe(method(maxPhotoQualityPrioritization))]
395        #[unsafe(method_family = none)]
396        pub unsafe fn maxPhotoQualityPrioritization(&self) -> AVCapturePhotoQualityPrioritization;
397
398        /// Setter for [`maxPhotoQualityPrioritization`][Self::maxPhotoQualityPrioritization].
399        #[unsafe(method(setMaxPhotoQualityPrioritization:))]
400        #[unsafe(method_family = none)]
401        pub unsafe fn setMaxPhotoQualityPrioritization(
402            &self,
403            max_photo_quality_prioritization: AVCapturePhotoQualityPrioritization,
404        );
405
406        /// Specifies whether fast capture prioritization is supported.
407        ///
408        ///
409        /// Fast capture prioritization allows capture quality to be automatically reduced from the selected AVCapturePhotoQualityPrioritization to ensure the photo output can keep up when captures are requested in rapid succession. Fast capture prioritization is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats and only when responsiveCaptureEnabled is YES. When switching cameras or formats this property may change. When this property changes from YES to NO, fastCapturePrioritizationEnabled also reverts to NO. If you've previously opted in for fast capture prioritization and then change configurations, you may need to set fastCapturePrioritizationEnabled = YES again.
410        #[unsafe(method(isFastCapturePrioritizationSupported))]
411        #[unsafe(method_family = none)]
412        pub unsafe fn isFastCapturePrioritizationSupported(&self) -> bool;
413
414        /// Setter for [`isFastCapturePrioritizationSupported`][Self::isFastCapturePrioritizationSupported].
415        #[unsafe(method(setFastCapturePrioritizationSupported:))]
416        #[unsafe(method_family = none)]
417        pub unsafe fn setFastCapturePrioritizationSupported(
418            &self,
419            fast_capture_prioritization_supported: bool,
420        );
421
422        /// Specifies whether fast capture prioritization is enabled.
423        ///
424        ///
425        /// This property defaults to NO. This property may only be set to YES if fastCapturePrioritizationSupported is YES, otherwise an NSInvalidArgumentException is thrown. By setting this property to YES, the photo output prepares itself to automatically reduce capture quality from the selected AVCapturePhotoQualityPrioritization when needed to keep up with rapid capture requests. In many cases the slightly reduced quality is preferable to missing the moment entirely. If you intend to use fast capture prioritization, you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
426        #[unsafe(method(isFastCapturePrioritizationEnabled))]
427        #[unsafe(method_family = none)]
428        pub unsafe fn isFastCapturePrioritizationEnabled(&self) -> bool;
429
430        /// Setter for [`isFastCapturePrioritizationEnabled`][Self::isFastCapturePrioritizationEnabled].
431        #[unsafe(method(setFastCapturePrioritizationEnabled:))]
432        #[unsafe(method_family = none)]
433        pub unsafe fn setFastCapturePrioritizationEnabled(
434            &self,
435            fast_capture_prioritization_enabled: bool,
436        );
437
438        /// Indicates whether the deferred photo delivery feature is supported by the receiver.
439        ///
440        ///
441        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When deferred photo delivery is not supported, your capture requests always resolve their AVCaptureResolvedPhotoSettings.deferredPhotoProxyDimensions to { 0, 0 }. This property is key-value observable.
442        ///
443        /// Automatic deferred photo delivery can produce a lightweight photo representation, called a "proxy", at the time of capture that can later be processed to completion while improving camera responsiveness.  When it's appropriate for the receiver to deliver a photo proxy for deferred processing, the delegate callback -captureOutput:didFinishCapturingDeferredPhotoProxy:error: will be invoked instead of -captureOutput:didFinishProcessingPhoto:error:.  See the documentation for AVCaptureDeferredPhotoProxy for more details.
444        #[unsafe(method(isAutoDeferredPhotoDeliverySupported))]
445        #[unsafe(method_family = none)]
446        pub unsafe fn isAutoDeferredPhotoDeliverySupported(&self) -> bool;
447
448        /// Specifies whether automatic deferred photo delivery is enabled.
449        ///
450        ///
451        /// Setting this value to either YES or NO requires a lengthy reconfiguration of the capture pipeline, so you should set this property before calling -[AVCaptureSession startRunning].  Setting this property to YES throws an NSInvalidArgumentException if autoDeferredPhotoDeliverySupported is NO.
452        #[unsafe(method(isAutoDeferredPhotoDeliveryEnabled))]
453        #[unsafe(method_family = none)]
454        pub unsafe fn isAutoDeferredPhotoDeliveryEnabled(&self) -> bool;
455
456        /// Setter for [`isAutoDeferredPhotoDeliveryEnabled`][Self::isAutoDeferredPhotoDeliveryEnabled].
457        #[unsafe(method(setAutoDeferredPhotoDeliveryEnabled:))]
458        #[unsafe(method_family = none)]
459        pub unsafe fn setAutoDeferredPhotoDeliveryEnabled(
460            &self,
461            auto_deferred_photo_delivery_enabled: bool,
462        );
463
464        /// Indicates whether the still image stabilization feature is supported by the receiver.
465        ///
466        ///
467        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When still image stabilization is not supported, your capture requests always resolve stillImageStabilizationEnabled to NO. This property is key-value observable.
468        ///
469        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -maxPhotoQualityPrioritization to indicate the highest quality prioritization level you might request in a photo capture, understanding that the higher the quality, the longer the potential wait. You may also use AVCapturePhotoSettings' photoQualityPrioritization property to specify a prioritization level for a particular photo capture, and then query the AVCaptureResolvedPhotoSettings photoProcessingTimeRange property to find out how long it might take to receive the resulting photo in your delegate callback.
470        #[deprecated]
471        #[unsafe(method(isStillImageStabilizationSupported))]
472        #[unsafe(method_family = none)]
473        pub unsafe fn isStillImageStabilizationSupported(&self) -> bool;
474
475        /// Indicates whether the current scene is dark enough to warrant use of still image stabilization.
476        ///
477        ///
478        /// This property reports whether the current scene being previewed by the camera is dark enough to benefit from still image stabilization. You can influence this property's answers by setting the photoSettingsForSceneMonitoring property, indicating whether autoStillImageStabilization monitoring should be on or off. If you set autoStillImageStabilization to NO, isStillImageStabilizationScene always reports NO. If you set it to YES, this property returns YES or NO depending on the current scene's lighting conditions. Note that some very dark scenes do not benefit from still image stabilization, but do benefit from flash. By default, this property always returns NO unless you set photoSettingsForSceneMonitoring to a non-nil value. This property may be key-value observed.
479        ///
480        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -maxPhotoQualityPrioritization to indicate the highest quality prioritization level you might request in a photo capture, understanding that the higher the quality, the longer the potential wait. You may also use AVCapturePhotoSettings' photoQualityPrioritization property to specify a prioritization level for a particular photo capture, and then query the AVCaptureResolvedPhotoSettings photoProcessingTimeRange property to find out how long it might take to receive the resulting photo in your delegate callback.
481        #[deprecated]
482        #[unsafe(method(isStillImageStabilizationScene))]
483        #[unsafe(method_family = none)]
484        pub unsafe fn isStillImageStabilizationScene(&self) -> bool;
485
486        /// Indicates whether the virtual device image fusion feature is supported by the receiver.
487        ///
488        ///
489        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When using a virtual AVCaptureDevice, its constituent camera images can be fused together to improve image quality when this property answers YES. When virtual device fusion is not supported by the current configuration, your capture requests always resolve virtualDeviceFusionEnabled to NO. This property is key-value observable.
490        #[unsafe(method(isVirtualDeviceFusionSupported))]
491        #[unsafe(method_family = none)]
492        pub unsafe fn isVirtualDeviceFusionSupported(&self) -> bool;
493
494        /// Indicates whether the DualCamera image fusion feature is supported by the receiver.
495        ///
496        ///
497        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When using the AVCaptureDevice with deviceType AVCaptureDeviceTypeBuiltInDualCamera, the wide-angle and telephoto camera images can be fused together to improve image quality in some configurations. When DualCamera image fusion is not supported by the current configuration, your capture requests always resolve dualCameraFusionEnabled to NO. This property is key-value observable. As of iOS 13, this property is deprecated in favor of virtualDeviceFusionSupported.
498        #[deprecated]
499        #[unsafe(method(isDualCameraFusionSupported))]
500        #[unsafe(method_family = none)]
501        pub unsafe fn isDualCameraFusionSupported(&self) -> bool;
502
503        /// Specifies whether the photo output's current configuration supports delivery of photos from constituent cameras of a virtual device.
504        ///
505        ///
506        /// Virtual device constituent photo delivery is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats. When switching cameras or formats this property may change. When this property changes from YES to NO, virtualDeviceConstituentPhotoDeliveryEnabled also reverts to NO. If you've previously opted in for virtual device constituent photo delivery and then change configurations, you may need to set virtualDeviceConstituentPhotoDeliveryEnabled = YES again. This property is key-value observable.
507        #[unsafe(method(isVirtualDeviceConstituentPhotoDeliverySupported))]
508        #[unsafe(method_family = none)]
509        pub unsafe fn isVirtualDeviceConstituentPhotoDeliverySupported(&self) -> bool;
510
511        /// Specifies whether the photo output's current configuration supports delivery of both telephoto and wide images from the DualCamera.
512        ///
513        ///
514        /// DualCamera dual photo delivery is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats. When switching cameras or formats this property may change. When this property changes from YES to NO, dualCameraDualPhotoDeliveryEnabled also reverts to NO. If you've previously opted in for DualCamera dual photo delivery and then change configurations, you may need to set dualCameraDualPhotoDeliveryEnabled = YES again. This property is key-value observable. As of iOS 13, this property is deprecated in favor of virtualDeviceConstituentPhotoDeliverySupported.
515        #[deprecated]
516        #[unsafe(method(isDualCameraDualPhotoDeliverySupported))]
517        #[unsafe(method_family = none)]
518        pub unsafe fn isDualCameraDualPhotoDeliverySupported(&self) -> bool;
519
520        /// Indicates whether the photo output is configured for delivery of photos from constituent cameras of a virtual device.
521        ///
522        ///
523        /// Default value is NO. This property may only be set to YES if virtualDeviceConstituentPhotoDeliverySupported is YES. Virtual device constituent photo delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to do any constituent photo delivery captures, you should set this property to YES before calling -[AVCaptureSession startRunning]. See also -[AVCapturePhotoSettings virtualDeviceConstituentPhotoDeliveryEnabledDevices].
524        #[unsafe(method(isVirtualDeviceConstituentPhotoDeliveryEnabled))]
525        #[unsafe(method_family = none)]
526        pub unsafe fn isVirtualDeviceConstituentPhotoDeliveryEnabled(&self) -> bool;
527
528        /// Setter for [`isVirtualDeviceConstituentPhotoDeliveryEnabled`][Self::isVirtualDeviceConstituentPhotoDeliveryEnabled].
529        #[unsafe(method(setVirtualDeviceConstituentPhotoDeliveryEnabled:))]
530        #[unsafe(method_family = none)]
531        pub unsafe fn setVirtualDeviceConstituentPhotoDeliveryEnabled(
532            &self,
533            virtual_device_constituent_photo_delivery_enabled: bool,
534        );
535
536        /// Indicates whether the photo output is configured for delivery of both the telephoto and wide images from the DualCamera.
537        ///
538        ///
539        /// Default value is NO. This property may only be set to YES if dualCameraDualPhotoDeliverySupported is YES. DualCamera dual photo delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to do any dual photo delivery captures, you should set this property to YES before calling -[AVCaptureSession startRunning]. See also -[AVCapturePhotoSettings dualCameraDualPhotoDeliveryEnabled]. As of iOS 13, this property is deprecated in favor of virtualDeviceConstituentPhotoDeliveryEnabled.
540        #[deprecated]
541        #[unsafe(method(isDualCameraDualPhotoDeliveryEnabled))]
542        #[unsafe(method_family = none)]
543        pub unsafe fn isDualCameraDualPhotoDeliveryEnabled(&self) -> bool;
544
545        /// Setter for [`isDualCameraDualPhotoDeliveryEnabled`][Self::isDualCameraDualPhotoDeliveryEnabled].
546        #[deprecated]
547        #[unsafe(method(setDualCameraDualPhotoDeliveryEnabled:))]
548        #[unsafe(method_family = none)]
549        pub unsafe fn setDualCameraDualPhotoDeliveryEnabled(
550            &self,
551            dual_camera_dual_photo_delivery_enabled: bool,
552        );
553
554        /// Specifies whether the photo output's current configuration supports delivery of AVCameraCalibrationData in the resultant AVCapturePhoto.
555        ///
556        ///
557        /// Camera calibration data delivery (intrinsics, extrinsics, lens distortion characteristics, etc.) is only supported if virtualDeviceConstituentPhotoDeliveryEnabled is YES and contentAwareDistortionCorrectionEnabled is NO and the source device's geometricDistortionCorrectionEnabled property is set to NO. This property is key-value observable.
558        #[unsafe(method(isCameraCalibrationDataDeliverySupported))]
559        #[unsafe(method_family = none)]
560        pub unsafe fn isCameraCalibrationDataDeliverySupported(&self) -> bool;
561
562        /// An array of AVCaptureFlashMode constants for the current capture session configuration.
563        ///
564        ///
565        /// This property supersedes AVCaptureDevice's isFlashModeSupported: It returns an array of AVCaptureFlashMode constants. To test whether a particular flash mode is supported, use NSArray's containsObject API: [photoOutput.supportedFlashModes containsObject:
566        /// @
567        /// (AVCaptureFlashModeAuto)]. This property is key-value observable.
568        #[unsafe(method(supportedFlashModes))]
569        #[unsafe(method_family = none)]
570        pub unsafe fn supportedFlashModes(&self) -> Retained<NSArray<NSNumber>>;
571
572        /// Indicates whether the receiver supports automatic red-eye reduction for flash captures.
573        ///
574        ///
575        /// Flash images may cause subjects' eyes to appear red, golden, or white. Automatic red-eye reduction detects and corrects for reflected light in eyes, at the cost of additional processing time per image. This property may change as the session's -sessionPreset or source device's -activeFormat change. When red-eye reduction is not supported, your capture requests always resolve redEyeReductionEnabled to NO. This property is key-value observable.
576        #[unsafe(method(isAutoRedEyeReductionSupported))]
577        #[unsafe(method_family = none)]
578        pub unsafe fn isAutoRedEyeReductionSupported(&self) -> bool;
579
580        /// Indicates whether the current scene is dark enough to warrant use of the flash.
581        ///
582        ///
583        /// This property reports whether the current scene being previewed by the camera is dark enough to need the flash. If -supportedFlashModes only contains AVCaptureFlashModeOff, isFlashScene always reports NO. You can influence this property's answers by setting the photoSettingsForSceneMonitoring property, indicating the flashMode you wish to monitor. If you set flashMode to AVCaptureFlashModeOff, isFlashScene always reports NO. If you set it to AVCaptureFlashModeAuto or AVCaptureFlashModeOn, isFlashScene answers YES or NO based on the current scene's lighting conditions. By default, this property always returns NO unless you set photoSettingsForSceneMonitoring to a non-nil value. Note that there is some overlap in the light level ranges that benefit from still image stabilization and flash. If your photoSettingsForSceneMonitoring indicate that both still image stabilization and flash scenes should be monitored, still image stabilization takes precedence, and isFlashScene becomes YES at lower overall light levels. This property may be key-value observed.
584        #[unsafe(method(isFlashScene))]
585        #[unsafe(method_family = none)]
586        pub unsafe fn isFlashScene(&self) -> bool;
587
588        /// Settings that govern the behavior of isFlashScene and isStillImageStabilizationScene.
589        ///
590        ///
591        /// You can influence the return values of isFlashScene and isStillImageStabilizationScene by setting this property, indicating the flashMode and photoQualityPrioritization values that should be considered for scene monitoring. For instance, if you set flashMode to AVCaptureFlashModeOff, isFlashScene always reports NO. If you set it to AVCaptureFlashModeAuto or AVCaptureFlashModeOn, isFlashScene answers YES or NO based on the current scene's lighting conditions. Note that there is some overlap in the light level ranges that benefit from still image stabilization and flash. If your photoSettingsForSceneMonitoring indicate that both still image stabilization and flash scenes should be monitored, still image stabilization takes precedence, and isFlashScene becomes YES at lower overall light levels. The default value for this property is nil. See isStillImageStabilizationScene and isFlashScene for further discussion.
592        #[unsafe(method(photoSettingsForSceneMonitoring))]
593        #[unsafe(method_family = none)]
594        pub unsafe fn photoSettingsForSceneMonitoring(
595            &self,
596        ) -> Option<Retained<AVCapturePhotoSettings>>;
597
598        /// Setter for [`photoSettingsForSceneMonitoring`][Self::photoSettingsForSceneMonitoring].
599        #[unsafe(method(setPhotoSettingsForSceneMonitoring:))]
600        #[unsafe(method_family = none)]
601        pub unsafe fn setPhotoSettingsForSceneMonitoring(
602            &self,
603            photo_settings_for_scene_monitoring: Option<&AVCapturePhotoSettings>,
604        );
605
606        /// Indicates whether the photo render pipeline should be configured to deliver high resolution still images.
607        ///
608        ///
609        /// Some AVCaptureDeviceFormats support outputting higher resolution stills than their streaming resolution (See AVCaptureDeviceFormat.highResolutionStillImageDimensions). Under some conditions, AVCaptureSession needs to set up the photo render pipeline differently to support high resolution still image capture. If you intend to take high resolution still images at all, you should set this property to YES before calling -[AVCaptureSession startRunning]. Once you've opted in for high resolution capture, you are free to issue photo capture requests with or without highResolutionCaptureEnabled in the AVCapturePhotoSettings. If you have not set this property to YES and call capturePhotoWithSettings:delegate: with settings.highResolutionCaptureEnabled set to YES, an NSInvalidArgumentException will be thrown.
610        #[deprecated = "Use maxPhotoDimensions instead."]
611        #[unsafe(method(isHighResolutionCaptureEnabled))]
612        #[unsafe(method_family = none)]
613        pub unsafe fn isHighResolutionCaptureEnabled(&self) -> bool;
614
615        /// Setter for [`isHighResolutionCaptureEnabled`][Self::isHighResolutionCaptureEnabled].
616        #[deprecated = "Use maxPhotoDimensions instead."]
617        #[unsafe(method(setHighResolutionCaptureEnabled:))]
618        #[unsafe(method_family = none)]
619        pub unsafe fn setHighResolutionCaptureEnabled(&self, high_resolution_capture_enabled: bool);
620
621        #[cfg(feature = "objc2-core-media")]
622        /// Indicates the maximum resolution of the requested photo.
623        ///
624        ///
625        /// Set this property to enable requesting of images up to as large as the specified dimensions. Images returned by AVCapturePhotoOutput may be smaller than these dimensions but will never be larger. Once set, images can be requested with any valid maximum photo dimensions by setting AVCapturePhotoSettings.maxPhotoDimensions on a per photo basis. The dimensions set must match one of the dimensions returned by AVCaptureDeviceFormat.supportedMaxPhotoDimensions for the current active format. Changing this property may trigger a lengthy reconfiguration of the capture render pipeline so it is recommended that this is set before calling -[AVCaptureSession startRunning].
626        /// Note: When supported, the 24MP setting (5712, 4284) is only serviced as 24MP when opted-in to autoDeferredPhotoDeliveryEnabled.
627        #[unsafe(method(maxPhotoDimensions))]
628        #[unsafe(method_family = none)]
629        pub unsafe fn maxPhotoDimensions(&self) -> CMVideoDimensions;
630
631        #[cfg(feature = "objc2-core-media")]
632        /// Setter for [`maxPhotoDimensions`][Self::maxPhotoDimensions].
633        #[unsafe(method(setMaxPhotoDimensions:))]
634        #[unsafe(method_family = none)]
635        pub unsafe fn setMaxPhotoDimensions(&self, max_photo_dimensions: CMVideoDimensions);
636
637        /// Specifies the maximum number of photos that may be taken in a single bracket.
638        ///
639        ///
640        /// AVCapturePhotoOutput can only satisfy a limited number of image requests in a single bracket without exhausting system resources. The maximum number of photos that may be taken in a single bracket depends on the size and format of the images being captured, and consequently may vary with AVCaptureSession -sessionPreset and AVCaptureDevice -activeFormat. Some formats do not support bracketed capture at all, and thus this property may return a value of 0. This read-only property is key-value observable. If you call -capturePhotoWithSettings:delegate: with a bracketedSettings whose count exceeds -maxBracketedCapturePhotoCount, an NSInvalidArgumentException is thrown.
641        #[unsafe(method(maxBracketedCapturePhotoCount))]
642        #[unsafe(method_family = none)]
643        pub unsafe fn maxBracketedCapturePhotoCount(&self) -> NSUInteger;
644
645        /// Indicates whether the receiver supports lens stabilization during bracketed captures.
646        ///
647        ///
648        /// The AVCapturePhotoBracketSettings lensStabilizationEnabled property may only be set if this property returns YES. Its value may change as the session's -sessionPreset or input device's -activeFormat changes. This read-only property is key-value observable.
649        #[unsafe(method(isLensStabilizationDuringBracketedCaptureSupported))]
650        #[unsafe(method_family = none)]
651        pub unsafe fn isLensStabilizationDuringBracketedCaptureSupported(&self) -> bool;
652
653        /// Indicates whether the receiver supports Live Photo capture.
654        ///
655        ///
656        /// Live Photo capture is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats. When switching cameras or formats this property may change. When this property changes from YES to NO, livePhotoCaptureEnabled also reverts to NO. If you've previously opted in for Live Photo capture and then change configurations, you may need to set livePhotoCaptureEnabled = YES again.
657        #[unsafe(method(isLivePhotoCaptureSupported))]
658        #[unsafe(method_family = none)]
659        pub unsafe fn isLivePhotoCaptureSupported(&self) -> bool;
660
661        /// Indicates whether the receiver is configured for Live Photo capture.
662        ///
663        ///
664        /// Default value is NO. This property may only be set to YES if livePhotoCaptureSupported is YES. Live Photo capture requires a lengthy reconfiguration of the capture render pipeline, so if you intend to do any Live Photo captures at all, you should set livePhotoCaptureEnabled to YES before calling -[AVCaptureSession startRunning].
665        #[unsafe(method(isLivePhotoCaptureEnabled))]
666        #[unsafe(method_family = none)]
667        pub unsafe fn isLivePhotoCaptureEnabled(&self) -> bool;
668
669        /// Setter for [`isLivePhotoCaptureEnabled`][Self::isLivePhotoCaptureEnabled].
670        #[unsafe(method(setLivePhotoCaptureEnabled:))]
671        #[unsafe(method_family = none)]
672        pub unsafe fn setLivePhotoCaptureEnabled(&self, live_photo_capture_enabled: bool);
673
674        /// Indicates whether Live Photo capture is enabled, but currently suspended.
675        ///
676        ///
677        /// This property allows you to cut current Live Photo movie captures short (for instance, if you suddenly need to do something that you don't want to show up in the Live Photo movie, such as take a non Live Photo capture that makes a shutter sound). By default, livePhotoCaptureSuspended is NO. When you set livePhotoCaptureSuspended = YES, any Live Photo movie captures in progress are trimmed to the current time. Likewise, when you toggle livePhotoCaptureSuspended from YES to NO, subsequent Live Photo movie captures will not contain any samples earlier than the time you un-suspended Live Photo capture. Setting this property to YES throws an NSInvalidArgumentException if livePhotoCaptureEnabled is NO. By default, this property resets to NO when the AVCaptureSession stops. This behavior can be prevented by setting preservesLivePhotoCaptureSuspendedOnSessionStop to YES before stopping the session.
678        #[unsafe(method(isLivePhotoCaptureSuspended))]
679        #[unsafe(method_family = none)]
680        pub unsafe fn isLivePhotoCaptureSuspended(&self) -> bool;
681
682        /// Setter for [`isLivePhotoCaptureSuspended`][Self::isLivePhotoCaptureSuspended].
683        #[unsafe(method(setLivePhotoCaptureSuspended:))]
684        #[unsafe(method_family = none)]
685        pub unsafe fn setLivePhotoCaptureSuspended(&self, live_photo_capture_suspended: bool);
686
687        /// By default, Live Photo capture is resumed when the session stops. This property allows clients to opt out of this and preserve the value of livePhotoCaptureSuspended.
688        ///
689        ///
690        /// Defaults to NO.
691        #[unsafe(method(preservesLivePhotoCaptureSuspendedOnSessionStop))]
692        #[unsafe(method_family = none)]
693        pub unsafe fn preservesLivePhotoCaptureSuspendedOnSessionStop(&self) -> bool;
694
695        /// Setter for [`preservesLivePhotoCaptureSuspendedOnSessionStop`][Self::preservesLivePhotoCaptureSuspendedOnSessionStop].
696        #[unsafe(method(setPreservesLivePhotoCaptureSuspendedOnSessionStop:))]
697        #[unsafe(method_family = none)]
698        pub unsafe fn setPreservesLivePhotoCaptureSuspendedOnSessionStop(
699            &self,
700            preserves_live_photo_capture_suspended_on_session_stop: bool,
701        );
702
703        /// Indicates whether Live Photo movies are trimmed in real time to avoid excessive movement.
704        ///
705        ///
706        /// This property defaults to YES when livePhotoCaptureSupported is YES. Changing this property's value while your session is running will cause a lengthy reconfiguration of the session. You should set livePhotoAutoTrimmingEnabled to YES or NO before calling -[AVCaptureSession startRunning]. When set to YES, Live Photo movies are analyzed in real time and trimmed if there's excessive movement before or after the photo is taken. Nominally, Live Photos are approximately 3 seconds long. With trimming enabled, they may be shorter, depending on movement. This feature prevents common problems such as Live Photo movies containing shoe or pocket shots.
707        #[unsafe(method(isLivePhotoAutoTrimmingEnabled))]
708        #[unsafe(method_family = none)]
709        pub unsafe fn isLivePhotoAutoTrimmingEnabled(&self) -> bool;
710
711        /// Setter for [`isLivePhotoAutoTrimmingEnabled`][Self::isLivePhotoAutoTrimmingEnabled].
712        #[unsafe(method(setLivePhotoAutoTrimmingEnabled:))]
713        #[unsafe(method_family = none)]
714        pub unsafe fn setLivePhotoAutoTrimmingEnabled(
715            &self,
716            live_photo_auto_trimming_enabled: bool,
717        );
718
719        #[cfg(feature = "AVVideoSettings")]
720        /// An array of AVVideoCodecKey values that are currently supported by the receiver for use in the movie complement of a Live Photo.
721        ///
722        ///
723        /// Prior to iOS 11, all Live Photo movie video tracks are compressed using H.264. Beginning in iOS 11, you can select the Live Photo movie video compression format using one of the AVVideoCodecKey strings presented in this property. The system's default (preferred) video codec is always presented first in the list. If you've not yet added your receiver to an AVCaptureSession with a video source, no codecs are available. This property is key-value observable.
724        #[unsafe(method(availableLivePhotoVideoCodecTypes))]
725        #[unsafe(method_family = none)]
726        pub unsafe fn availableLivePhotoVideoCodecTypes(
727            &self,
728        ) -> Retained<NSArray<AVVideoCodecType>>;
729
730        #[cfg(feature = "objc2-core-media")]
731        /// A class method that writes a JPEG sample buffer to an NSData in the JPEG file format.
732        ///
733        ///
734        /// Parameter `JPEGSampleBuffer`: A CMSampleBuffer containing JPEG compressed data.
735        ///
736        /// Parameter `previewPhotoSampleBuffer`: An optional CMSampleBuffer containing pixel buffer image data to be written as a thumbnail image.
737        ///
738        /// Returns: An NSData containing bits in the JPEG file format. May return nil if the re-packaging process fails.
739        ///
740        ///
741        /// AVCapturePhotoOutput's depecrated -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback delivers JPEG photos to clients as CMSampleBuffers. To re-package these buffers in a data format suitable for writing to a JPEG file, you may call this class method, optionally inserting your own metadata into the JPEG CMSampleBuffer first, and optionally passing a preview image to be written to the JPEG file format as a thumbnail image.
742        #[deprecated]
743        #[unsafe(method(JPEGPhotoDataRepresentationForJPEGSampleBuffer:previewPhotoSampleBuffer:))]
744        #[unsafe(method_family = none)]
745        pub unsafe fn JPEGPhotoDataRepresentationForJPEGSampleBuffer_previewPhotoSampleBuffer(
746            jpeg_sample_buffer: &CMSampleBuffer,
747            preview_photo_sample_buffer: Option<&CMSampleBuffer>,
748        ) -> Option<Retained<NSData>>;
749
750        #[cfg(feature = "objc2-core-media")]
751        /// A class method that writes a RAW sample buffer to an NSData containing bits in the DNG file format.
752        ///
753        ///
754        /// Parameter `rawSampleBuffer`: A CMSampleBuffer containing Bayer RAW data.
755        ///
756        /// Parameter `previewPhotoSampleBuffer`: An optional CMSampleBuffer containing pixel buffer image data to be written as a thumbnail image.
757        ///
758        /// Returns: An NSData containing bits in the DNG file format. May return nil if the re-packaging process fails.
759        ///
760        ///
761        /// AVCapturePhotoOutput's deprecated -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback delivers RAW photos to clients as CMSampleBuffers. To re-package these buffers in a data format suitable for writing to a DNG file, you may call this class method, optionally inserting your own metadata into the RAW CMSampleBuffer first, and optionally passing a preview image to be written to the DNG file format as a thumbnail image. Only RAW images from Apple built-in cameras are supported.
762        #[deprecated]
763        #[unsafe(method(DNGPhotoDataRepresentationForRawSampleBuffer:previewPhotoSampleBuffer:))]
764        #[unsafe(method_family = none)]
765        pub unsafe fn DNGPhotoDataRepresentationForRawSampleBuffer_previewPhotoSampleBuffer(
766            raw_sample_buffer: &CMSampleBuffer,
767            preview_photo_sample_buffer: Option<&CMSampleBuffer>,
768        ) -> Option<Retained<NSData>>;
769
770        /// A BOOL value specifying whether content aware distortion correction is supported.
771        ///
772        ///
773        /// The rectilinear model used in optical design and by geometric distortion correction only preserves lines but not area, angles, or distance. Thus the wider the field of view of a lens, the greater the areal distortion at the edges of images. Content aware distortion correction, when enabled, intelligently corrects distortions by taking content into consideration, such as faces near the edges of the image. This property returns YES if the session's current configuration allows photos to be captured with content aware distortion correction. When switching cameras or formats or enabling depth data delivery this property may change. When this property changes from YES to NO, contentAwareDistortionCorrectionEnabled also reverts to NO. This property is key-value observable.
774        #[unsafe(method(isContentAwareDistortionCorrectionSupported))]
775        #[unsafe(method_family = none)]
776        pub unsafe fn isContentAwareDistortionCorrectionSupported(&self) -> bool;
777
778        /// A BOOL value specifying whether the photo render pipeline is set up to perform content aware distortion correction.
779        ///
780        ///
781        /// Default is NO. Set to YES if you wish content aware distortion correction to be performed on your AVCapturePhotos. This property may only be set to YES if contentAwareDistortionCorrectionSupported is YES. Note that warping the photos to preserve more natural looking content may result in a small change in field of view compared to what you see in the AVCaptureVideoPreviewLayer. The amount of field of view lost or gained is content specific and may vary from photo to photo. Enabling this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning].
782        #[unsafe(method(isContentAwareDistortionCorrectionEnabled))]
783        #[unsafe(method_family = none)]
784        pub unsafe fn isContentAwareDistortionCorrectionEnabled(&self) -> bool;
785
786        /// Setter for [`isContentAwareDistortionCorrectionEnabled`][Self::isContentAwareDistortionCorrectionEnabled].
787        #[unsafe(method(setContentAwareDistortionCorrectionEnabled:))]
788        #[unsafe(method_family = none)]
789        pub unsafe fn setContentAwareDistortionCorrectionEnabled(
790            &self,
791            content_aware_distortion_correction_enabled: bool,
792        );
793
794        /// A BOOL value specifying whether zero shutter lag is supported.
795        ///
796        ///
797        /// This property returns YES if the session's current configuration allows zero shutter lag. When switching cameras or formats, setting depthDataDeliveryEnabled, or setting virtualDeviceConstituentPhotoDeliveryEnabled this property may change. When this property changes from YES to NO, zeroShutterLagEnabled also reverts to NO. This property is key-value observable.
798        #[unsafe(method(isZeroShutterLagSupported))]
799        #[unsafe(method_family = none)]
800        pub unsafe fn isZeroShutterLagSupported(&self) -> bool;
801
802        /// A BOOL value specifying whether the output is set up to support zero shutter lag.
803        ///
804        ///
805        /// This property may only be set to YES if zeroShutterLagSupported is YES, otherwise an NSInvalidArgumentException is thrown. For apps linked on or after iOS 17 zero shutter lag is automatically enabled when supported. Enabling zero shutter lag reduces or eliminates shutter lag when using AVCapturePhotoQualityPrioritizationBalanced or Quality at the cost of additional memory usage by the photo output. The timestamp of the AVCapturePhoto may be slightly earlier than when -capturePhotoWithSettings:delegate: was called. To minimize camera shake from the user's tapping gesture it is recommended that -capturePhotoWithSettings:delegate: be called as early as possible when handling the touch down event. Zero shutter lag isn't available when using manual exposure or bracketed capture. Changing this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
806        #[unsafe(method(isZeroShutterLagEnabled))]
807        #[unsafe(method_family = none)]
808        pub unsafe fn isZeroShutterLagEnabled(&self) -> bool;
809
810        /// Setter for [`isZeroShutterLagEnabled`][Self::isZeroShutterLagEnabled].
811        #[unsafe(method(setZeroShutterLagEnabled:))]
812        #[unsafe(method_family = none)]
813        pub unsafe fn setZeroShutterLagEnabled(&self, zero_shutter_lag_enabled: bool);
814
815        /// A BOOL value specifying whether responsive capture is supported.
816        ///
817        ///
818        /// Enabling responsive capture increases peak and sustained capture rates, and reduces shutter lag at the cost of additional memory usage by the photo output. This property returns YES if the session's current configuration allows responsive capture. When switching cameras or formats, enabling depth data delivery, or enabling zero shutter lag this property may change. Responsive capture is only supported when zero shutter lag is enabled. When this property changes from YES to NO, responsiveCaptureEnabled also reverts to NO. This property is key-value observable.
819        #[unsafe(method(isResponsiveCaptureSupported))]
820        #[unsafe(method_family = none)]
821        pub unsafe fn isResponsiveCaptureSupported(&self) -> bool;
822
823        /// A BOOL value specifying whether the photo output is set up to support responsive capture.
824        ///
825        ///
826        /// This property may only be set to YES if responsiveCaptureSupported is YES, otherwise an NSInvalidArgumentException is thrown. When responsiveCaptureEnabled is YES the captureReadiness property should be used to determine whether new capture requests can be serviced in a reasonable time and whether the shutter control should be available to the user. Responsive capture adds buffering between the capture and photo processing stages which allows a new capture to start before processing has completed for the previous capture, so be prepared to handle -captureOutput:willBeginCaptureForResolvedSettings: being called before the -captureOutput:didFinishProcessingPhoto: for the prior requests. Processed photos continue to be delivered in the order they were captured. To minimize camera shake from the user's tapping gesture it is recommended that -capturePhotoWithSettings:delegate: be called as early as possible when handling the touch down event. Enabling responsive capture allows the fast capture prioritization feature to be used, which further increases capture rates and reduces preview and recording disruptions. See the fastCapturePrioritizationEnabled property. When requesting uncompressed output using kCVPixelBufferPixelFormatTypeKey in AVCapturePhotoSetting.format the AVCapturePhoto's pixelBuffer is allocated from a pool with enough capacity for that request only, and overlap between capture and processing is disabled. The client must release the AVCapturePhoto and references to the pixelBuffer before capturing again and the pixelBuffer's IOSurface must also no longer be in use. Changing this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
827        #[unsafe(method(isResponsiveCaptureEnabled))]
828        #[unsafe(method_family = none)]
829        pub unsafe fn isResponsiveCaptureEnabled(&self) -> bool;
830
831        /// Setter for [`isResponsiveCaptureEnabled`][Self::isResponsiveCaptureEnabled].
832        #[unsafe(method(setResponsiveCaptureEnabled:))]
833        #[unsafe(method_family = none)]
834        pub unsafe fn setResponsiveCaptureEnabled(&self, responsive_capture_enabled: bool);
835
836        /// A value specifying whether the photo output is ready to respond to new capture requests in a timely manner.
837        ///
838        ///
839        /// This property can be key-value observed to enable and disable shutter button UI depending on whether the output is ready to capture, which is especially important when the responsiveCaptureEnabled property is YES. When interacting with AVCapturePhotoOutput on a background queue AVCapturePhotoOutputReadinessCoordinator should instead be used to observe readiness changes and perform UI updates. Capturing only when the output is ready limits the number of requests inflight to minimize shutter lag while maintaining the fastest shot to shot time. When the property returns a value other than Ready the output is not ready to capture and the shutter button should be disabled to prevent the user from initiating new requests. The output continues to accept requests when the captureReadiness property returns a value other than Ready, but the request may not be serviced for a longer period. The visual presentation of the shutter button can be customized based on the readiness value. When the user rapidly taps the shutter button the property may transition to NotReadyMomentarily for a brief period. Although the shutter button should be disabled during this period it is short lived enough that dimming or changing the appearance of the shutter is not recommended as it would be visually distracting to the user. Longer running capture types like flash or captures with AVCapturePhotoQualityPrioritizationQuality may prevent the output from capturing for an extended period, indicated by NotReadyWaitingForCapture or NotReadyWaitingForProcessing, which is appropriate to show by dimming or disabling the shutter button. For NotReadyWaitingForProcessing it is also appropriate to show a spinner or other indication that the shutter is busy.
840        #[unsafe(method(captureReadiness))]
841        #[unsafe(method_family = none)]
842        pub unsafe fn captureReadiness(&self) -> AVCapturePhotoOutputCaptureReadiness;
843
844        /// A BOOL value specifying whether constant color capture is supported.
845        ///
846        ///
847        /// An object's color in a photograph is affected by the light sources illuminating the scene, so the color of the same object photographed in warm light might look markedly different than in colder light. In some use cases, such ambient light induced color variation is undesirable, and the user may prefer an estimate of what these materials would look like under a standard light such as daylight (D65), regardless of the lighting conditions at the time the photograph was taken. Some devices are capable of producing such constant color photos.
848        ///
849        /// Constant color captures require the flash to be fired and may require pre-flash sequence to determine the correct focus and exposure, therefore it might take several seconds to acquire a constant color photo. Due to this flash requirement, a constant color capture can only be taken with AVCaptureFlashModeAuto or AVCaptureFlashModeOn as the flash mode, otherwise an exception is thrown.
850        ///
851        /// Constant color can only be achieved when the flash has a discernible effect on the scene so it may not perform well in bright conditions such as direct sunlight. Use the constantColorConfidenceMap property to examine the confidence level, and therefore the usefulness, of each region of a constant color photo.
852        ///
853        /// Constant color should not be used in conjunction with locked or manual white balance.
854        ///
855        /// This property returns YES if the session's current configuration allows photos to be captured with constant color. When switching cameras or formats this property may change. When this property changes from YES to NO, constantColorEnabled also reverts to NO. If you've previously opted in for constant color and then change configurations, you may need to set constantColorEnabled = YES again. This property is key-value observable.
856        #[unsafe(method(isConstantColorSupported))]
857        #[unsafe(method_family = none)]
858        pub unsafe fn isConstantColorSupported(&self) -> bool;
859
860        /// A BOOL value specifying whether the photo render pipeline is set up to perform constant color captures.
861        ///
862        ///
863        /// Default is NO. Set to YES to enable support for taking constant color photos. This property may only be set to YES if constantColorSupported is YES. Enabling constant color requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture constant color photos, you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
864        #[unsafe(method(isConstantColorEnabled))]
865        #[unsafe(method_family = none)]
866        pub unsafe fn isConstantColorEnabled(&self) -> bool;
867
868        /// Setter for [`isConstantColorEnabled`][Self::isConstantColorEnabled].
869        #[unsafe(method(setConstantColorEnabled:))]
870        #[unsafe(method_family = none)]
871        pub unsafe fn setConstantColorEnabled(&self, constant_color_enabled: bool);
872
873        /// Specifies whether suppressing the shutter sound is supported.
874        ///
875        ///
876        /// On iOS, this property returns NO in jurisdictions where shutter sound production cannot be disabled. On all other platforms, it always returns NO.
877        #[unsafe(method(isShutterSoundSuppressionSupported))]
878        #[unsafe(method_family = none)]
879        pub unsafe fn isShutterSoundSuppressionSupported(&self) -> bool;
880    );
881}
882
883extern_class!(
884    /// AVCapturePhotoOutputReadinessCoordinator notifies its delegate of changes in an AVCapturePhotoOutput's captureReadiness property and can be used to coordinate UI updates on the main queue with use of AVCapturePhotoOutput on a background queue.
885    ///
886    ///
887    /// AVCapturePhotoOutputReadinessCoordinator tracks its output's captureReadiness and incorporates additional requests registered via -startTrackingCaptureRequestUsingPhotoSettings:. This allows clients to synchronously update shutter button availability and appearance and on the main thread while calling -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] asynchronously on a background queue.
888    ///
889    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutputreadinesscoordinator?language=objc)
890    #[unsafe(super(NSObject))]
891    #[derive(Debug, PartialEq, Eq, Hash)]
892    pub struct AVCapturePhotoOutputReadinessCoordinator;
893);
894
895unsafe impl NSObjectProtocol for AVCapturePhotoOutputReadinessCoordinator {}
896
897impl AVCapturePhotoOutputReadinessCoordinator {
898    extern_methods!(
899        #[unsafe(method(init))]
900        #[unsafe(method_family = init)]
901        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
902
903        #[unsafe(method(new))]
904        #[unsafe(method_family = new)]
905        pub unsafe fn new() -> Retained<Self>;
906
907        #[cfg(feature = "AVCaptureOutputBase")]
908        #[unsafe(method(initWithPhotoOutput:))]
909        #[unsafe(method_family = init)]
910        pub unsafe fn initWithPhotoOutput(
911            this: Allocated<Self>,
912            photo_output: &AVCapturePhotoOutput,
913        ) -> Retained<Self>;
914
915        /// The receiver's delegate, called on the main queue.
916        ///
917        ///
918        /// The value of this property is an object conforming to the AVCapturePhotoOutputReadinessCoordinatorDelegate protocol that will receive a callback when the captureReadiness property changes. Callbacks are delivered on the main queue, allowing UI updates to be done directly in the callback. A callback with the initial value of captureReadiness is delivered when delegate is set.
919        #[unsafe(method(delegate))]
920        #[unsafe(method_family = none)]
921        pub unsafe fn delegate(
922            &self,
923        ) -> Option<Retained<ProtocolObject<dyn AVCapturePhotoOutputReadinessCoordinatorDelegate>>>;
924
925        /// This is a [weak property][objc2::topics::weak_property].
926        /// Setter for [`delegate`][Self::delegate].
927        #[unsafe(method(setDelegate:))]
928        #[unsafe(method_family = none)]
929        pub unsafe fn setDelegate(
930            &self,
931            delegate: Option<&ProtocolObject<dyn AVCapturePhotoOutputReadinessCoordinatorDelegate>>,
932        );
933
934        /// A value specifying whether the coordinator's photo output is ready to respond to new capture requests in a timely manner.
935        ///
936        ///
937        /// The value incorporates the photo output's captureReadiness and any requests registered using -startTrackingCaptureRequestUsingPhotoSettings:. The value is updated before calling the -readinessCoordinator:captureReadinessDidChange: callback. See AVCapturePhotoOutput's captureReadiness documentation for a discussion of how to update shutter availability and appearance based on the captureReadiness value. This property is key-value observable and all change notifications are delivered on the main queue, allowing UI updates to be done directly in the callback.
938        #[unsafe(method(captureReadiness))]
939        #[unsafe(method_family = none)]
940        pub unsafe fn captureReadiness(&self) -> AVCapturePhotoOutputCaptureReadiness;
941
942        /// Track the capture request represented by the specified photo settings until it is enqueued to the photo output and update captureReadiness to include this request.
943        ///
944        ///
945        /// Parameter `settings`: The AVCapturePhotoSettings which will be passed to -[AVCapturePhotoOutput capturePhotoWithSettings:delegate] for this capture request.
946        ///
947        ///
948        /// The captureReadiness property is updated to include the tracked request until the the photo output receives a settings object with the same or a newer uniqueID. It is recommended that the same photo settings be passed to -[AVCapturePhotoOutput capturePhotoWithSettings:delegate] to ensure the captureReadiness value is consistent once the capture begins. When called on the main queue the delegate callback is invoked synchronously before returning to ensure shutter availability is updated immediately and prevent queued touch events from initiating unwanted captures. The -startTrackingCaptureRequestUsingPhotoSettings: method can be called while in the SessionNotRunning state to allow the shutter button to be interactive while the session is being started on a background queue. An NSInvalidArgumentException is thrown if the photo settings are invalid.
949        #[unsafe(method(startTrackingCaptureRequestUsingPhotoSettings:))]
950        #[unsafe(method_family = none)]
951        pub unsafe fn startTrackingCaptureRequestUsingPhotoSettings(
952            &self,
953            settings: &AVCapturePhotoSettings,
954        );
955
956        /// Stop tracking the capture request represented by the specified photo settings uniqueID and update captureReadiness to no longer include this request.
957        ///
958        ///
959        /// Parameter `settingsUniqueID`: The AVCapturePhotoSettings.uniqueID of the settings passed to -startTrackingCaptureRequestUsingPhotoSettings:.
960        ///
961        ///
962        /// Tracking automatically stops when -[AVCapturePhotoOutput capturePhotoWithSettings:delegate] is called with a photo settings objects with the same or a newer uniqueID, but in cases where an error or other condition prevents calling -capturePhotoWithSettings:delegate tracking should be explictly stopped to ensure the captureReadiness value is up to date. When called on the main queue the delegate callback is invoked synchronously before returning to ensure shutter availability is updated immediately.
963        #[unsafe(method(stopTrackingCaptureRequestUsingPhotoSettingsUniqueID:))]
964        #[unsafe(method_family = none)]
965        pub unsafe fn stopTrackingCaptureRequestUsingPhotoSettingsUniqueID(
966            &self,
967            settings_unique_id: i64,
968        );
969    );
970}
971
972extern_protocol!(
973    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutputreadinesscoordinatordelegate?language=objc)
974    pub unsafe trait AVCapturePhotoOutputReadinessCoordinatorDelegate:
975        NSObjectProtocol
976    {
977        /// A callback delivered on the main queue whenever the captureReadiness property changes.
978        ///
979        ///
980        /// Parameter `coordinator`: The calling instance of AVCapturePhotoOutputReadinessCoordinator.
981        ///
982        /// Parameter `captureReadiness`: The updated captureReadiness value which can be used to update shutter button availability and appearance.
983        ///
984        ///
985        /// This callback is always delivered on the main queue and is suitable for updating shutter button availability and appearance.
986        #[optional]
987        #[unsafe(method(readinessCoordinator:captureReadinessDidChange:))]
988        #[unsafe(method_family = none)]
989        unsafe fn readinessCoordinator_captureReadinessDidChange(
990            &self,
991            coordinator: &AVCapturePhotoOutputReadinessCoordinator,
992            capture_readiness: AVCapturePhotoOutputCaptureReadiness,
993        );
994    }
995);
996
997/// AVCapturePhotoOutputDepthDataDeliverySupport.
998#[cfg(feature = "AVCaptureOutputBase")]
999impl AVCapturePhotoOutput {
1000    extern_methods!(
1001        /// A BOOL value specifying whether depth data delivery is supported.
1002        ///
1003        ///
1004        /// Some cameras and configurations support the delivery of depth data (e.g. disparity maps) along with the photo. This property returns YES if the session's current configuration allows photos to be captured with depth data, from which depth-related filters may be applied. When switching cameras or formats this property may change. When this property changes from YES to NO, depthDataDeliveryEnabled also reverts to NO. If you've previously opted in for depth data delivery and then change configurations, you may need to set depthDataDeliveryEnabled = YES again. This property is key-value observable.
1005        #[unsafe(method(isDepthDataDeliverySupported))]
1006        #[unsafe(method_family = none)]
1007        pub unsafe fn isDepthDataDeliverySupported(&self) -> bool;
1008
1009        /// A BOOL specifying whether the photo render pipeline is prepared for depth data delivery.
1010        ///
1011        ///
1012        /// Default is NO. Set to YES if you wish depth data to be delivered with your AVCapturePhotos. This property may only be set to YES if depthDataDeliverySupported is YES. Enabling depth data delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture depth data, you should set this property to YES before calling -[AVCaptureSession startRunning].
1013        #[unsafe(method(isDepthDataDeliveryEnabled))]
1014        #[unsafe(method_family = none)]
1015        pub unsafe fn isDepthDataDeliveryEnabled(&self) -> bool;
1016
1017        /// Setter for [`isDepthDataDeliveryEnabled`][Self::isDepthDataDeliveryEnabled].
1018        #[unsafe(method(setDepthDataDeliveryEnabled:))]
1019        #[unsafe(method_family = none)]
1020        pub unsafe fn setDepthDataDeliveryEnabled(&self, depth_data_delivery_enabled: bool);
1021
1022        /// A BOOL value specifying whether portrait effects matte delivery is supported.
1023        ///
1024        ///
1025        /// Some cameras and configurations support the delivery of a matting image to augment depth data and aid in high quality portrait effect rendering (see AVPortraitEffectsMatte.h). This property returns YES if the session's current configuration allows photos to be captured with a portrait effects matte. When switching cameras or formats this property may change. When this property changes from YES to NO, portraitEffectsMatteDeliveryEnabled also reverts to NO. If you've previously opted in for portrait effects matte delivery and then change configurations, you may need to set portraitEffectsMatteDeliveryEnabled = YES again. This property is key-value observable.
1026        #[unsafe(method(isPortraitEffectsMatteDeliverySupported))]
1027        #[unsafe(method_family = none)]
1028        pub unsafe fn isPortraitEffectsMatteDeliverySupported(&self) -> bool;
1029
1030        /// A BOOL specifying whether the photo render pipeline is prepared for portrait effects matte delivery.
1031        ///
1032        ///
1033        /// Default is NO. Set to YES if you wish portrait effects mattes to be delivered with your AVCapturePhotos. This property may only be set to YES if portraitEffectsMatteDeliverySupported is YES. Portrait effects matte generation requires depth to be present, so when enabling portrait effects matte delivery, you must also set depthDataDeliveryEnabled to YES. Enabling portrait effects matte delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture portrait effects mattes, you should set this property to YES before calling -[AVCaptureSession startRunning].
1034        #[unsafe(method(isPortraitEffectsMatteDeliveryEnabled))]
1035        #[unsafe(method_family = none)]
1036        pub unsafe fn isPortraitEffectsMatteDeliveryEnabled(&self) -> bool;
1037
1038        /// Setter for [`isPortraitEffectsMatteDeliveryEnabled`][Self::isPortraitEffectsMatteDeliveryEnabled].
1039        #[unsafe(method(setPortraitEffectsMatteDeliveryEnabled:))]
1040        #[unsafe(method_family = none)]
1041        pub unsafe fn setPortraitEffectsMatteDeliveryEnabled(
1042            &self,
1043            portrait_effects_matte_delivery_enabled: bool,
1044        );
1045
1046        #[cfg(feature = "AVSemanticSegmentationMatte")]
1047        /// An array of supported semantic segmentation matte types that may be captured and delivered along with your AVCapturePhotos.
1048        ///
1049        ///
1050        /// Some cameras and configurations support the delivery of semantic segmentation matting images (e.g. segmentations of the hair, skin, or teeth in the photo). This property returns an array of AVSemanticSegmentationMatteTypes available given the session's current configuration. When switching cameras or formats this property may change. When this property changes, enabledSemanticSegmentationMatteTypes reverts to an empty array. If you've previously opted in for delivery of one or more semantic segmentation mattes and then change configurations, you need to set up your enabledSemanticSegmentationMatteTypes again. This property is key-value observable.
1051        #[unsafe(method(availableSemanticSegmentationMatteTypes))]
1052        #[unsafe(method_family = none)]
1053        pub unsafe fn availableSemanticSegmentationMatteTypes(
1054            &self,
1055        ) -> Retained<NSArray<AVSemanticSegmentationMatteType>>;
1056
1057        #[cfg(feature = "AVSemanticSegmentationMatte")]
1058        /// An array of semantic segmentation matte types which the photo render pipeline is prepared to deliver.
1059        ///
1060        ///
1061        /// Default is empty array. You may set this to the array of matte types you'd like to be delivered with your AVCapturePhotos. The array may only contain values present in availableSemanticSegmentationMatteTypes. Enabling semantic segmentation matte delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture semantic segmentation mattes, you should set this property to YES before calling -[AVCaptureSession startRunning].
1062        #[unsafe(method(enabledSemanticSegmentationMatteTypes))]
1063        #[unsafe(method_family = none)]
1064        pub unsafe fn enabledSemanticSegmentationMatteTypes(
1065            &self,
1066        ) -> Retained<NSArray<AVSemanticSegmentationMatteType>>;
1067
1068        #[cfg(feature = "AVSemanticSegmentationMatte")]
1069        /// Setter for [`enabledSemanticSegmentationMatteTypes`][Self::enabledSemanticSegmentationMatteTypes].
1070        #[unsafe(method(setEnabledSemanticSegmentationMatteTypes:))]
1071        #[unsafe(method_family = none)]
1072        pub unsafe fn setEnabledSemanticSegmentationMatteTypes(
1073            &self,
1074            enabled_semantic_segmentation_matte_types: &NSArray<AVSemanticSegmentationMatteType>,
1075        );
1076    );
1077}
1078
1079extern_protocol!(
1080    /// A set of delegate callbacks to be implemented by a client who calls AVCapturePhotoOutput's -capturePhotoWithSettings:delegate.
1081    ///
1082    ///
1083    /// AVCapturePhotoOutput invokes the AVCapturePhotoCaptureDelegate callbacks on a common dispatch queue — not necessarily the main queue. While the -captureOutput:willBeginCaptureForResolvedSettings: callback always comes first and the -captureOutput:didFinishCaptureForResolvedSettings: callback always comes last, none of the other callbacks can be assumed to come in any particular order. The AVCaptureResolvedPhotoSettings instance passed to the client with each callback has the same uniqueID as the AVCapturePhotoSettings instance passed in -capturePhotoWithSettings:delegate:. All callbacks are marked optional, but depending on the features you've specified in your AVCapturePhotoSettings, some callbacks become mandatory and are validated in -capturePhotoWithSettings:delegate:. If your delegate does not implement the mandatory callbacks, an NSInvalidArgumentException is thrown.
1084    ///
1085    /// - If you initialize your photo settings with a format dictionary, or use one of the default constructors (that is, if you're not requesting a RAW-only capture), your delegate must respond to either - captureOutput:didFinishProcessingPhoto:error: or the deprecated -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:. If your delegate responds to both of these callbacks, only the undeprecated variant will be called.
1086    /// - If you initialize your photo settings with a rawPhotoPixelFormatType, your delegate must respond to either -captureOutput:didFinishProcessingPhoto:error: or the deprecated -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:. If your delegate responds to both of these callbacks, only the undeprecated variant will be called.
1087    /// - If you set livePhotoMovieFileURL to non-nil, your delegate must respond to -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:.
1088    ///
1089    /// In the event of an error, all expected callbacks are fired with an appropriate error.
1090    ///
1091    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotocapturedelegate?language=objc)
1092    pub unsafe trait AVCapturePhotoCaptureDelegate: NSObjectProtocol {
1093        #[cfg(feature = "AVCaptureOutputBase")]
1094        /// A callback fired as soon as the capture settings have been resolved.
1095        ///
1096        ///
1097        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1098        ///
1099        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
1100        ///
1101        ///
1102        /// This callback is always delivered first for a particular capture request. It is delivered as soon as possible after you call -capturePhotoWithSettings:delegate:, so you can know what to expect in the remainder of your callbacks.
1103        #[optional]
1104        #[unsafe(method(captureOutput:willBeginCaptureForResolvedSettings:))]
1105        #[unsafe(method_family = none)]
1106        unsafe fn captureOutput_willBeginCaptureForResolvedSettings(
1107            &self,
1108            output: &AVCapturePhotoOutput,
1109            resolved_settings: &AVCaptureResolvedPhotoSettings,
1110        );
1111
1112        #[cfg(feature = "AVCaptureOutputBase")]
1113        /// A callback fired just as the photo is being taken.
1114        ///
1115        ///
1116        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1117        ///
1118        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
1119        ///
1120        ///
1121        /// The timing of this callback is analogous to AVCaptureStillImageOutput's capturingStillImage property changing from NO to YES. The callback is delivered right after the shutter sound is heard (note that shutter sounds are suppressed when Live Photos are being captured).
1122        #[optional]
1123        #[unsafe(method(captureOutput:willCapturePhotoForResolvedSettings:))]
1124        #[unsafe(method_family = none)]
1125        unsafe fn captureOutput_willCapturePhotoForResolvedSettings(
1126            &self,
1127            output: &AVCapturePhotoOutput,
1128            resolved_settings: &AVCaptureResolvedPhotoSettings,
1129        );
1130
1131        #[cfg(feature = "AVCaptureOutputBase")]
1132        /// A callback fired just after the photo is taken.
1133        ///
1134        ///
1135        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1136        ///
1137        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
1138        ///
1139        ///
1140        /// The timing of this callback is analogous to AVCaptureStillImageOutput's capturingStillImage property changing from YES to NO.
1141        #[optional]
1142        #[unsafe(method(captureOutput:didCapturePhotoForResolvedSettings:))]
1143        #[unsafe(method_family = none)]
1144        unsafe fn captureOutput_didCapturePhotoForResolvedSettings(
1145            &self,
1146            output: &AVCapturePhotoOutput,
1147            resolved_settings: &AVCaptureResolvedPhotoSettings,
1148        );
1149
1150        #[cfg(feature = "AVCaptureOutputBase")]
1151        /// A callback fired when photos are ready to be delivered to you (RAW or processed).
1152        ///
1153        ///
1154        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1155        ///
1156        /// Parameter `photo`: An instance of AVCapturePhoto.
1157        ///
1158        /// Parameter `error`: An error indicating what went wrong. If the photo was processed successfully, nil is returned.
1159        ///
1160        ///
1161        /// This callback fires resolvedSettings.expectedPhotoCount number of times for a given capture request. Note that the photo parameter is always non nil, even if an error is returned. The delivered AVCapturePhoto's rawPhoto property can be queried to know if it's a RAW image or processed image.
1162        #[optional]
1163        #[unsafe(method(captureOutput:didFinishProcessingPhoto:error:))]
1164        #[unsafe(method_family = none)]
1165        unsafe fn captureOutput_didFinishProcessingPhoto_error(
1166            &self,
1167            output: &AVCapturePhotoOutput,
1168            photo: &AVCapturePhoto,
1169            error: Option<&NSError>,
1170        );
1171
1172        #[cfg(feature = "AVCaptureOutputBase")]
1173        /// A callback fired just after the photo proxy has been taken.
1174        ///
1175        ///
1176        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1177        ///
1178        /// Parameter `deferredPhotoProxy`: The AVCaptureDeferredPhotoProxy instance which contains a proxy CVPixelBuffer as a placeholder for the final image.  The fileDataRepresentation from this object may be used with PHAssetCreation to eventually produce the final, processed photo into the user's Photo Library.  The in-memory proxy fileDataRepresentation should be added to the photo library as quickly as possible after receipt to ensure that the photo library can begin background processing and also so that the intermediates are not removed by a periodic clean-up job looking for abandoned intermediates produced by using the deferred photo processing APIs.
1179        ///
1180        ///
1181        /// Parameter `error`: An error indicating what went wrong if the photo proxy or any of the underlying intermediate files couldn't be created.
1182        ///
1183        ///
1184        /// Delegates are required to implement this method if they opt in for deferred photo processing, otherwise an NSInvalidArgumentException will be thrown from the -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] method.
1185        #[optional]
1186        #[unsafe(method(captureOutput:didFinishCapturingDeferredPhotoProxy:error:))]
1187        #[unsafe(method_family = none)]
1188        unsafe fn captureOutput_didFinishCapturingDeferredPhotoProxy_error(
1189            &self,
1190            output: &AVCapturePhotoOutput,
1191            deferred_photo_proxy: Option<&AVCaptureDeferredPhotoProxy>,
1192            error: Option<&NSError>,
1193        );
1194
1195        #[cfg(feature = "AVCaptureOutputBase")]
1196        /// A callback fired when the Live Photo movie has captured all its media data, though all media has not yet been written to file.
1197        ///
1198        ///
1199        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1200        ///
1201        /// Parameter `outputFileURL`: The URL to which the movie file will be written. This URL is equal to your AVCapturePhotoSettings.livePhotoMovieURL.
1202        ///
1203        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
1204        ///
1205        ///
1206        /// When this callback fires, no new media is being written to the file. If you are displaying a "Live" badge, this is an appropriate time to dismiss it. The movie file itself is not done being written until the -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error: callback fires.
1207        #[optional]
1208        #[unsafe(method(captureOutput:didFinishRecordingLivePhotoMovieForEventualFileAtURL:resolvedSettings:))]
1209        #[unsafe(method_family = none)]
1210        unsafe fn captureOutput_didFinishRecordingLivePhotoMovieForEventualFileAtURL_resolvedSettings(
1211            &self,
1212            output: &AVCapturePhotoOutput,
1213            output_file_url: &NSURL,
1214            resolved_settings: &AVCaptureResolvedPhotoSettings,
1215        );
1216
1217        #[cfg(all(feature = "AVCaptureOutputBase", feature = "objc2-core-media"))]
1218        /// A callback fired when the Live Photo movie is finished being written to disk.
1219        ///
1220        ///
1221        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1222        ///
1223        /// Parameter `outputFileURL`: The URL where the movie file resides. This URL is equal to your AVCapturePhotoSettings.livePhotoMovieURL.
1224        ///
1225        /// Parameter `duration`: A CMTime indicating the duration of the movie file.
1226        ///
1227        /// Parameter `photoDisplayTime`: A CMTime indicating the time in the movie at which the still photo should be displayed.
1228        ///
1229        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
1230        ///
1231        /// Parameter `error`: An error indicating what went wrong if the outputFileURL is damaged.
1232        ///
1233        ///
1234        /// When this callback fires, the movie on disk is fully finished and ready for consumption.
1235        #[optional]
1236        #[unsafe(method(captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:))]
1237        #[unsafe(method_family = none)]
1238        unsafe fn captureOutput_didFinishProcessingLivePhotoToMovieFileAtURL_duration_photoDisplayTime_resolvedSettings_error(
1239            &self,
1240            output: &AVCapturePhotoOutput,
1241            output_file_url: &NSURL,
1242            duration: CMTime,
1243            photo_display_time: CMTime,
1244            resolved_settings: &AVCaptureResolvedPhotoSettings,
1245            error: Option<&NSError>,
1246        );
1247
1248        #[cfg(feature = "AVCaptureOutputBase")]
1249        /// A callback fired when the photo capture is completed and no more callbacks will be fired.
1250        ///
1251        ///
1252        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
1253        ///
1254        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features were selected.
1255        ///
1256        /// Parameter `error`: An error indicating whether the capture was unsuccessful. Nil if there were no problems.
1257        ///
1258        ///
1259        /// This callback always fires last and when it does, you may clean up any state relating to this photo capture.
1260        #[optional]
1261        #[unsafe(method(captureOutput:didFinishCaptureForResolvedSettings:error:))]
1262        #[unsafe(method_family = none)]
1263        unsafe fn captureOutput_didFinishCaptureForResolvedSettings_error(
1264            &self,
1265            output: &AVCapturePhotoOutput,
1266            resolved_settings: &AVCaptureResolvedPhotoSettings,
1267            error: Option<&NSError>,
1268        );
1269    }
1270);
1271
1272extern_class!(
1273    /// A mutable settings object encapsulating all the desired properties of a photo capture.
1274    ///
1275    ///
1276    /// To take a picture, a client instantiates and configures an AVCapturePhotoSettings object, then calls AVCapturePhotoOutput's -capturePhotoWithSettings:delegate:, passing the settings and a delegate to be informed when events relating to the photo capture occur. Since AVCapturePhotoSettings has no reference to the AVCapturePhotoOutput instance with which it will be used, minimal validation occurs while you configure an AVCapturePhotoSettings instance. The bulk of the validation is executed when you call AVCapturePhotoOutput's -capturePhotoWithSettings:delegate:.
1277    ///
1278    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotosettings?language=objc)
1279    #[unsafe(super(NSObject))]
1280    #[derive(Debug, PartialEq, Eq, Hash)]
1281    pub struct AVCapturePhotoSettings;
1282);
1283
1284unsafe impl NSCopying for AVCapturePhotoSettings {}
1285
1286unsafe impl CopyingHelper for AVCapturePhotoSettings {
1287    type Result = Self;
1288}
1289
1290unsafe impl NSObjectProtocol for AVCapturePhotoSettings {}
1291
1292impl AVCapturePhotoSettings {
1293    extern_methods!(
1294        /// Creates a default instance of AVCapturePhotoSettings.
1295        ///
1296        ///
1297        /// Returns: An instance of AVCapturePhotoSettings.
1298        ///
1299        ///
1300        /// A default AVCapturePhotoSettings object has a format of AVVideoCodecTypeJPEG, a fileType of AVFileTypeJPEG, and photoQualityPrioritization set to AVCapturePhotoQualityPrioritizationBalanced.
1301        #[unsafe(method(photoSettings))]
1302        #[unsafe(method_family = none)]
1303        pub unsafe fn photoSettings() -> Retained<Self>;
1304
1305        /// Creates an instance of AVCapturePhotoSettings with a user-specified output format.
1306        ///
1307        ///
1308        /// Parameter `format`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
1309        ///
1310        /// Returns: An instance of AVCapturePhotoSettings.
1311        ///
1312        ///
1313        /// If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil format dictionary is analogous to calling +photoSettings.
1314        #[unsafe(method(photoSettingsWithFormat:))]
1315        #[unsafe(method_family = none)]
1316        pub unsafe fn photoSettingsWithFormat(
1317            format: Option<&NSDictionary<NSString, AnyObject>>,
1318        ) -> Retained<Self>;
1319
1320        /// Creates an instance of AVCapturePhotoSettings specifying RAW only output.
1321        ///
1322        ///
1323        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
1324        ///
1325        /// Returns: An instance of AVCapturePhotoSettings.
1326        ///
1327        ///
1328        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
1329        #[unsafe(method(photoSettingsWithRawPixelFormatType:))]
1330        #[unsafe(method_family = none)]
1331        pub unsafe fn photoSettingsWithRawPixelFormatType(
1332            raw_pixel_format_type: OSType,
1333        ) -> Retained<Self>;
1334
1335        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG).
1336        ///
1337        ///
1338        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
1339        ///
1340        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
1341        ///
1342        /// Returns: An instance of AVCapturePhotoSettings.
1343        ///
1344        ///
1345        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil processedFormat dictionary is analogous to calling +photoSettingsWithRawPixelFormatType:. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
1346        #[unsafe(method(photoSettingsWithRawPixelFormatType:processedFormat:))]
1347        #[unsafe(method_family = none)]
1348        pub unsafe fn photoSettingsWithRawPixelFormatType_processedFormat(
1349            raw_pixel_format_type: OSType,
1350            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
1351        ) -> Retained<Self>;
1352
1353        #[cfg(feature = "AVMediaFormat")]
1354        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG) and a file container to which it will be written.
1355        ///
1356        ///
1357        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h). Pass 0 if you do not desire a RAW photo callback.
1358        ///
1359        /// Parameter `rawFileType`: The file container for which the RAW image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
1360        ///
1361        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. Pass nil if you do not desire a processed photo callback.
1362        ///
1363        /// Parameter `processedFileType`: The file container for which the processed image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
1364        ///
1365        /// Returns: An instance of AVCapturePhotoSettings.
1366        ///
1367        ///
1368        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. Set rawPixelFormatType to 0 if you do not desire a RAW photo callback. If you are specifying a rawFileType, it must be present in AVCapturePhotoOutput's -availableRawPhotoFileTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you are specifying a processedFileType, it must be present in AVCapturePhotoOutput's -availablePhotoFileTypes array. Pass a nil processedFormat dictionary if you only desire a RAW photo capture. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
1369        #[unsafe(method(photoSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:))]
1370        #[unsafe(method_family = none)]
1371        pub unsafe fn photoSettingsWithRawPixelFormatType_rawFileType_processedFormat_processedFileType(
1372            raw_pixel_format_type: OSType,
1373            raw_file_type: Option<&AVFileType>,
1374            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
1375            processed_file_type: Option<&AVFileType>,
1376        ) -> Retained<Self>;
1377
1378        /// Creates an instance of AVCapturePhotoSettings with a new uniqueID from an existing instance of AVCapturePhotoSettings.
1379        ///
1380        ///
1381        /// Parameter `photoSettings`: An existing AVCapturePhotoSettings instance.
1382        ///
1383        /// Returns: An new instance of AVCapturePhotoSettings with new uniqueID.
1384        ///
1385        ///
1386        /// Use this factory method to create a clone of an existing photo settings instance, but with a new uniqueID that can safely be passed to AVCapturePhotoOutput -capturePhotoWithSettings:delegate:.
1387        #[unsafe(method(photoSettingsFromPhotoSettings:))]
1388        #[unsafe(method_family = none)]
1389        pub unsafe fn photoSettingsFromPhotoSettings(
1390            photo_settings: &AVCapturePhotoSettings,
1391        ) -> Retained<Self>;
1392
1393        /// A 64-bit number that uniquely identifies this instance.
1394        ///
1395        ///
1396        /// When you create an instance of AVCapturePhotoSettings, a uniqueID is generated automatically. This uniqueID is guaranteed to be unique for the life time of your process.
1397        #[unsafe(method(uniqueID))]
1398        #[unsafe(method_family = none)]
1399        pub unsafe fn uniqueID(&self) -> i64;
1400
1401        /// A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
1402        ///
1403        ///
1404        /// The format dictionary you passed to one of the creation methods. May be nil if you've specified RAW-only capture.
1405        #[unsafe(method(format))]
1406        #[unsafe(method_family = none)]
1407        pub unsafe fn format(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
1408
1409        /// A dictionary of AVVideoSettings keys specifying the RAW file format to be used for the RAW photo.
1410        ///
1411        /// One can specify desired format properties of the RAW file that will be created. Currently only the key AVVideoAppleProRAWBitDepthKey is allowed and the value to which it can be set should be from 8-16.  The AVVideoCodecKey must be present in the receiver's -availableRawPhotoCodecTypes array as well as in -supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:. AVVideoQualityKey (NSNumber in range [0.0,1.0]) can be optionally set and a value between [0.0,1.0] will use lossy compression with lower values being more lossy resulting in smaller file sizes but lower image quality, while a value of 1.0 will use lossless compression resulting in the largest file size but also the best quality.
1412        #[unsafe(method(rawFileFormat))]
1413        #[unsafe(method_family = none)]
1414        pub unsafe fn rawFileFormat(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
1415
1416        /// Setter for [`rawFileFormat`][Self::rawFileFormat].
1417        #[unsafe(method(setRawFileFormat:))]
1418        #[unsafe(method_family = none)]
1419        pub unsafe fn setRawFileFormat(
1420            &self,
1421            raw_file_format: Option<&NSDictionary<NSString, AnyObject>>,
1422        );
1423
1424        #[cfg(feature = "AVMediaFormat")]
1425        /// The file container for which the processed photo is formatted to be stored.
1426        ///
1427        ///
1428        /// The formatting of data within a photo buffer is often dependent on the file format intended for storage. For instance, a JPEG encoded photo buffer intended for storage in a JPEG (JPEG File Interchange Format) file differs from JPEG to be stored in HEIF. The HEIF-containerized JPEG buffer is tiled for readback efficiency and partitioned into the box structure dictated by the HEIF file format. Some codecs are only supported by AVCapturePhotoOutput if containerized. For instance, the AVVideoCodecTypeHEVC is only supported with AVFileTypeHEIF and AVFileTypeHEIC formatting. To discover which photo pixel format types and video codecs are supported for a given file type, you may query AVCapturePhotoOutput's -supportedPhotoPixelFormatTypesForFileType:, or -supportedPhotoCodecTypesForFileType: respectively.
1429        #[unsafe(method(processedFileType))]
1430        #[unsafe(method_family = none)]
1431        pub unsafe fn processedFileType(&self) -> Option<Retained<AVFileType>>;
1432
1433        /// A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
1434        ///
1435        ///
1436        /// The rawPixelFormatType you specified in one of the creation methods. Returns 0 if you did not specify RAW capture. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
1437        #[unsafe(method(rawPhotoPixelFormatType))]
1438        #[unsafe(method_family = none)]
1439        pub unsafe fn rawPhotoPixelFormatType(&self) -> OSType;
1440
1441        #[cfg(feature = "AVMediaFormat")]
1442        /// The file container for which the RAW photo is formatted to be stored.
1443        ///
1444        ///
1445        /// The formatting of data within a RAW photo buffer may be dependent on the file format intended for storage. To discover which RAW photo pixel format types are supported for a given file type, you may query AVCapturePhotoOutput's -supportedRawPhotoPixelFormatTypesForFileType:.
1446        #[unsafe(method(rawFileType))]
1447        #[unsafe(method_family = none)]
1448        pub unsafe fn rawFileType(&self) -> Option<Retained<AVFileType>>;
1449
1450        #[cfg(feature = "AVCaptureDevice")]
1451        /// Specifies whether the flash should be on, off, or chosen automatically by AVCapturePhotoOutput.
1452        ///
1453        ///
1454        /// flashMode takes the place of the deprecated AVCaptureDevice -flashMode API. Setting AVCaptureDevice.flashMode has no effect on AVCapturePhotoOutput, which only pays attention to the flashMode specified in your AVCapturePhotoSettings. The default value is AVCaptureFlashModeOff. Flash modes are defined in AVCaptureDevice.h. If you specify a flashMode of AVCaptureFlashModeOn, it wins over autoStillImageStabilizationEnabled=YES. When the device becomes very hot, the flash becomes temporarily unavailable until the device cools down (see AVCaptureDevice's -flashAvailable). While the flash is unavailable, AVCapturePhotoOutput's -supportedFlashModes property still reports AVCaptureFlashModeOn and AVCaptureFlashModeAuto as being available, thus allowing you to specify a flashMode of AVCaptureModeOn. You should always check the AVCaptureResolvedPhotoSettings provided to you in the AVCapturePhotoCaptureDelegate callbacks, as the resolved flashEnabled property will tell you definitively if the flash is being used.
1455        #[unsafe(method(flashMode))]
1456        #[unsafe(method_family = none)]
1457        pub unsafe fn flashMode(&self) -> AVCaptureFlashMode;
1458
1459        #[cfg(feature = "AVCaptureDevice")]
1460        /// Setter for [`flashMode`][Self::flashMode].
1461        #[unsafe(method(setFlashMode:))]
1462        #[unsafe(method_family = none)]
1463        pub unsafe fn setFlashMode(&self, flash_mode: AVCaptureFlashMode);
1464
1465        /// Specifies whether red-eye reduction should be applied automatically on flash captures.
1466        ///
1467        ///
1468        /// Default is YES on platforms that support automatic red-eye reduction unless you are capturing a bracket using AVCapturePhotoBracketSettings or a RAW photo without a processed photo.  For RAW photos with a processed photo the red-eye reduction will be applied to the processed photo only (RAW photos by definition are not processed). When set to YES, red-eye reduction is applied as needed for flash captures if the photo output's autoRedEyeReductionSupported property returns YES.
1469        #[unsafe(method(isAutoRedEyeReductionEnabled))]
1470        #[unsafe(method_family = none)]
1471        pub unsafe fn isAutoRedEyeReductionEnabled(&self) -> bool;
1472
1473        /// Setter for [`isAutoRedEyeReductionEnabled`][Self::isAutoRedEyeReductionEnabled].
1474        #[unsafe(method(setAutoRedEyeReductionEnabled:))]
1475        #[unsafe(method_family = none)]
1476        pub unsafe fn setAutoRedEyeReductionEnabled(&self, auto_red_eye_reduction_enabled: bool);
1477
1478        /// Indicates how photo quality should be prioritized against speed of photo delivery.
1479        ///
1480        ///
1481        /// Default value is AVCapturePhotoQualityPrioritizationBalanced. The AVCapturePhotoOutput is capable of applying a variety of techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), depending on the source device's activeFormat. Some of these techniques can take significant processing time before the photo is returned to your delegate callback. The photoQualityPrioritization property allows you to specify your preferred quality vs speed of delivery. By default, speed and quality are considered to be of equal importance. When you specify AVCapturePhotoQualityPrioritizationSpeed, you indicate that speed should be prioritized at the expense of quality. Likewise, when you choose AVCapturePhotoQualityPrioritizationQuality, you signal your willingness to prioritize the very best quality at the expense of speed, and your readiness to wait (perhaps significantly) longer for the photo to be returned to your delegate.
1482        #[unsafe(method(photoQualityPrioritization))]
1483        #[unsafe(method_family = none)]
1484        pub unsafe fn photoQualityPrioritization(&self) -> AVCapturePhotoQualityPrioritization;
1485
1486        /// Setter for [`photoQualityPrioritization`][Self::photoQualityPrioritization].
1487        #[unsafe(method(setPhotoQualityPrioritization:))]
1488        #[unsafe(method_family = none)]
1489        pub unsafe fn setPhotoQualityPrioritization(
1490            &self,
1491            photo_quality_prioritization: AVCapturePhotoQualityPrioritization,
1492        );
1493
1494        /// Specifies whether still image stabilization should be used automatically.
1495        ///
1496        ///
1497        /// Default is YES unless you are capturing a Bayer RAW photo (Bayer RAW photos may not be processed by definition) or a bracket using AVCapturePhotoBracketSettings. When set to YES, still image stabilization is applied automatically in low light to counteract hand shake. If the device has optical image stabilization, autoStillImageStabilizationEnabled makes use of lens stabilization as well.
1498        ///
1499        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -photoQualityPrioritization to indicate your preferred quality vs speed.
1500        #[deprecated]
1501        #[unsafe(method(isAutoStillImageStabilizationEnabled))]
1502        #[unsafe(method_family = none)]
1503        pub unsafe fn isAutoStillImageStabilizationEnabled(&self) -> bool;
1504
1505        /// Setter for [`isAutoStillImageStabilizationEnabled`][Self::isAutoStillImageStabilizationEnabled].
1506        #[deprecated]
1507        #[unsafe(method(setAutoStillImageStabilizationEnabled:))]
1508        #[unsafe(method_family = none)]
1509        pub unsafe fn setAutoStillImageStabilizationEnabled(
1510            &self,
1511            auto_still_image_stabilization_enabled: bool,
1512        );
1513
1514        /// Specifies whether virtual device image fusion should be used automatically.
1515        ///
1516        ///
1517        /// Default is YES unless you are capturing a RAW photo (RAW photos may not be processed by definition) or a bracket using AVCapturePhotoBracketSettings. When set to YES, and -[AVCapturePhotoOutput isVirtualDeviceFusionSupported] is also YES, constituent camera images of a virtual device may be fused to improve still image quality, depending on the current zoom factor, light levels, and focus position. You may determine whether virtual device fusion is enabled for a particular capture request by inspecting the virtualDeviceFusionEnabled property of the AVCaptureResolvedPhotoSettings. Note that when using the deprecated AVCaptureStillImageOutput interface with a virtual device, autoVirtualDeviceFusionEnabled fusion is always enabled if supported, and may not be turned off.
1518        #[unsafe(method(isAutoVirtualDeviceFusionEnabled))]
1519        #[unsafe(method_family = none)]
1520        pub unsafe fn isAutoVirtualDeviceFusionEnabled(&self) -> bool;
1521
1522        /// Setter for [`isAutoVirtualDeviceFusionEnabled`][Self::isAutoVirtualDeviceFusionEnabled].
1523        #[unsafe(method(setAutoVirtualDeviceFusionEnabled:))]
1524        #[unsafe(method_family = none)]
1525        pub unsafe fn setAutoVirtualDeviceFusionEnabled(
1526            &self,
1527            auto_virtual_device_fusion_enabled: bool,
1528        );
1529
1530        /// Specifies whether DualCamera image fusion should be used automatically.
1531        ///
1532        ///
1533        /// Default is YES unless you are capturing a RAW photo (RAW photos may not be processed by definition) or a bracket using AVCapturePhotoBracketSettings. When set to YES, and -[AVCapturePhotoOutput isDualCameraFusionSupported] is also YES, wide-angle and telephoto images may be fused to improve still image quality, depending on the current zoom factor, light levels, and focus position. You may determine whether DualCamera fusion is enabled for a particular capture request by inspecting the dualCameraFusionEnabled property of the AVCaptureResolvedPhotoSettings. Note that when using the deprecated AVCaptureStillImageOutput interface with the DualCamera, auto DualCamera fusion is always enabled and may not be turned off. As of iOS 13, this property is deprecated in favor of autoVirtualDeviceFusionEnabled.
1534        #[deprecated]
1535        #[unsafe(method(isAutoDualCameraFusionEnabled))]
1536        #[unsafe(method_family = none)]
1537        pub unsafe fn isAutoDualCameraFusionEnabled(&self) -> bool;
1538
1539        /// Setter for [`isAutoDualCameraFusionEnabled`][Self::isAutoDualCameraFusionEnabled].
1540        #[deprecated]
1541        #[unsafe(method(setAutoDualCameraFusionEnabled:))]
1542        #[unsafe(method_family = none)]
1543        pub unsafe fn setAutoDualCameraFusionEnabled(&self, auto_dual_camera_fusion_enabled: bool);
1544
1545        #[cfg(feature = "AVCaptureDevice")]
1546        /// Specifies the constituent devices for which the virtual device should deliver photos.
1547        ///
1548        ///
1549        /// Default is empty array. To opt in for constituent device photo delivery, you may set this property to any subset of 2 or more of the devices in virtualDevice.constituentDevices. Your captureOutput:didFinishProcessingPhoto:error: callback will be called n times -- one for each of the devices you include in the array. You may only set this property to a non-nil array if you've set your AVCapturePhotoOutput's virtualDeviceConstituentPhotoDeliveryEnabled property to YES, and your delegate responds to the captureOutput:didFinishProcessingPhoto:error: selector.
1550        #[unsafe(method(virtualDeviceConstituentPhotoDeliveryEnabledDevices))]
1551        #[unsafe(method_family = none)]
1552        pub unsafe fn virtualDeviceConstituentPhotoDeliveryEnabledDevices(
1553            &self,
1554        ) -> Retained<NSArray<AVCaptureDevice>>;
1555
1556        #[cfg(feature = "AVCaptureDevice")]
1557        /// Setter for [`virtualDeviceConstituentPhotoDeliveryEnabledDevices`][Self::virtualDeviceConstituentPhotoDeliveryEnabledDevices].
1558        #[unsafe(method(setVirtualDeviceConstituentPhotoDeliveryEnabledDevices:))]
1559        #[unsafe(method_family = none)]
1560        pub unsafe fn setVirtualDeviceConstituentPhotoDeliveryEnabledDevices(
1561            &self,
1562            virtual_device_constituent_photo_delivery_enabled_devices: &NSArray<AVCaptureDevice>,
1563        );
1564
1565        /// Specifies whether the DualCamera should return both the telephoto and wide image.
1566        ///
1567        ///
1568        /// Default is NO. When set to YES, your captureOutput:didFinishProcessingPhoto:error: callback will receive twice the number of callbacks, as both the telephoto image(s) and wide-angle image(s) are delivered. You may only set this property to YES if you've set your AVCapturePhotoOutput's dualCameraDualPhotoDeliveryEnabled property to YES, and your delegate responds to the captureOutput:didFinishProcessingPhoto:error: selector. As of iOS 13, this property is deprecated in favor of virtualDeviceConstituentPhotoDeliveryEnabledDevices.
1569        #[deprecated]
1570        #[unsafe(method(isDualCameraDualPhotoDeliveryEnabled))]
1571        #[unsafe(method_family = none)]
1572        pub unsafe fn isDualCameraDualPhotoDeliveryEnabled(&self) -> bool;
1573
1574        /// Setter for [`isDualCameraDualPhotoDeliveryEnabled`][Self::isDualCameraDualPhotoDeliveryEnabled].
1575        #[deprecated]
1576        #[unsafe(method(setDualCameraDualPhotoDeliveryEnabled:))]
1577        #[unsafe(method_family = none)]
1578        pub unsafe fn setDualCameraDualPhotoDeliveryEnabled(
1579            &self,
1580            dual_camera_dual_photo_delivery_enabled: bool,
1581        );
1582
1583        /// Specifies whether photos should be captured at the highest resolution supported by the source AVCaptureDevice's activeFormat.
1584        ///
1585        ///
1586        /// Default is NO. By default, AVCapturePhotoOutput emits images with the same dimensions as its source AVCaptureDevice's activeFormat.formatDescription. However, if you set this property to YES, the AVCapturePhotoOutput emits images at its source AVCaptureDevice's activeFormat.highResolutionStillImageDimensions. Note that if you enable video stabilization (see AVCaptureConnection's preferredVideoStabilizationMode) for any output, the high resolution photos emitted by AVCapturePhotoOutput may be smaller by 10 or more percent. You may inspect your AVCaptureResolvedPhotoSettings in the delegate callbacks to discover the exact dimensions of the capture photo(s).
1587        ///
1588        /// Starting in iOS 14.5 if you disable geometric distortion correction, the high resolution photo emitted by AVCapturePhotoOutput may be is smaller depending on the format.
1589        #[deprecated = "Use maxPhotoDimensions instead."]
1590        #[unsafe(method(isHighResolutionPhotoEnabled))]
1591        #[unsafe(method_family = none)]
1592        pub unsafe fn isHighResolutionPhotoEnabled(&self) -> bool;
1593
1594        /// Setter for [`isHighResolutionPhotoEnabled`][Self::isHighResolutionPhotoEnabled].
1595        #[deprecated = "Use maxPhotoDimensions instead."]
1596        #[unsafe(method(setHighResolutionPhotoEnabled:))]
1597        #[unsafe(method_family = none)]
1598        pub unsafe fn setHighResolutionPhotoEnabled(&self, high_resolution_photo_enabled: bool);
1599
1600        #[cfg(feature = "objc2-core-media")]
1601        /// Indicates the maximum resolution photo that will be captured.
1602        ///
1603        ///
1604        /// By setting this property you are requesting an image that may be up to as large as the specified dimensions, but no larger. The dimensions set must match one of the dimensions returned by AVCaptureDeviceFormat.supportedMaxPhotoDimensions for the currently configured format and be equal to or smaller than the value of AVCapturePhotoOutput.maxPhotoDimensions. This property defaults to the smallest dimensions returned by AVCaptureDeviceFormat.supportedMaxPhotoDimensions.
1605        #[unsafe(method(maxPhotoDimensions))]
1606        #[unsafe(method_family = none)]
1607        pub unsafe fn maxPhotoDimensions(&self) -> CMVideoDimensions;
1608
1609        #[cfg(feature = "objc2-core-media")]
1610        /// Setter for [`maxPhotoDimensions`][Self::maxPhotoDimensions].
1611        #[unsafe(method(setMaxPhotoDimensions:))]
1612        #[unsafe(method_family = none)]
1613        pub unsafe fn setMaxPhotoDimensions(&self, max_photo_dimensions: CMVideoDimensions);
1614
1615        /// Specifies whether AVDepthData should be captured along with the photo.
1616        ///
1617        ///
1618        /// Default is NO. Set to YES if you wish to receive depth data with your photo. Throws an exception if -[AVCapturePhotoOutput depthDataDeliveryEnabled] is not set to YES or your delegate does not respond to the captureOutput:didFinishProcessingPhoto:error: selector. Note that setting this property to YES may add significant processing time to the delivery of your didFinishProcessingPhoto: callback.
1619        ///
1620        /// For best rendering results in Apple's Photos.app, portrait photos should be captured with both embedded depth data and a portrait effects matte (see portraitEffectsMatteDeliveryEnabled). When supported, it is recommended to opt in for both of these auxiliary images in your photo captures involving depth.
1621        #[unsafe(method(isDepthDataDeliveryEnabled))]
1622        #[unsafe(method_family = none)]
1623        pub unsafe fn isDepthDataDeliveryEnabled(&self) -> bool;
1624
1625        /// Setter for [`isDepthDataDeliveryEnabled`][Self::isDepthDataDeliveryEnabled].
1626        #[unsafe(method(setDepthDataDeliveryEnabled:))]
1627        #[unsafe(method_family = none)]
1628        pub unsafe fn setDepthDataDeliveryEnabled(&self, depth_data_delivery_enabled: bool);
1629
1630        /// Specifies whether depth data included with this photo should be written to the photo's file structure.
1631        ///
1632        ///
1633        /// Default is YES. When depthDataDeliveryEnabled is set to YES, this property specifies whether the included depth data should be written to the resulting photo's internal file structure. Depth data is currently only supported in HEIF and JPEG. This property is ignored if depthDataDeliveryEnabled is set to NO.
1634        #[unsafe(method(embedsDepthDataInPhoto))]
1635        #[unsafe(method_family = none)]
1636        pub unsafe fn embedsDepthDataInPhoto(&self) -> bool;
1637
1638        /// Setter for [`embedsDepthDataInPhoto`][Self::embedsDepthDataInPhoto].
1639        #[unsafe(method(setEmbedsDepthDataInPhoto:))]
1640        #[unsafe(method_family = none)]
1641        pub unsafe fn setEmbedsDepthDataInPhoto(&self, embeds_depth_data_in_photo: bool);
1642
1643        /// Specifies whether the depth data delivered with the photo should be filtered to fill invalid values.
1644        ///
1645        ///
1646        /// Default is YES. This property is ignored unless depthDataDeliveryEnabled is set to YES. Depth data maps may contain invalid pixel values due to a variety of factors including occlusions and low light. When depthDataFiltered is set to YES, the photo output interpolates missing data, filling in all holes.
1647        #[unsafe(method(isDepthDataFiltered))]
1648        #[unsafe(method_family = none)]
1649        pub unsafe fn isDepthDataFiltered(&self) -> bool;
1650
1651        /// Setter for [`isDepthDataFiltered`][Self::isDepthDataFiltered].
1652        #[unsafe(method(setDepthDataFiltered:))]
1653        #[unsafe(method_family = none)]
1654        pub unsafe fn setDepthDataFiltered(&self, depth_data_filtered: bool);
1655
1656        /// Specifies whether AVCameraCalibrationData should be captured and delivered along with this photo.
1657        ///
1658        ///
1659        /// Default is NO. Set to YES if you wish to receive camera calibration data with your photo. Camera calibration data is delivered as a property of an AVCapturePhoto, so if you are using the CMSampleBuffer delegate callbacks rather than -captureOutput:didFinishProcessingPhoto:error:, an exception is thrown. Also, you may only set this property to YES if your AVCapturePhotoOutput's cameraCalibrationDataDeliverySupported property is YES and 2 or more devices are selected for virtual device constituent photo delivery. When requesting virtual device constituent photo delivery plus camera calibration data, the photos for each constituent device each contain camera calibration data. Note that AVCameraCalibrationData can be delivered as a property of an AVCapturePhoto or an AVDepthData, thus your delegate must respond to the captureOutput:didFinishProcessingPhoto:error: selector.
1660        #[unsafe(method(isCameraCalibrationDataDeliveryEnabled))]
1661        #[unsafe(method_family = none)]
1662        pub unsafe fn isCameraCalibrationDataDeliveryEnabled(&self) -> bool;
1663
1664        /// Setter for [`isCameraCalibrationDataDeliveryEnabled`][Self::isCameraCalibrationDataDeliveryEnabled].
1665        #[unsafe(method(setCameraCalibrationDataDeliveryEnabled:))]
1666        #[unsafe(method_family = none)]
1667        pub unsafe fn setCameraCalibrationDataDeliveryEnabled(
1668            &self,
1669            camera_calibration_data_delivery_enabled: bool,
1670        );
1671
1672        /// Specifies whether an AVPortraitEffectsMatte should be captured along with the photo.
1673        ///
1674        ///
1675        /// Default is NO. Set to YES if you wish to receive a portrait effects matte with your photo. Throws an exception if -[AVCapturePhotoOutput portraitEffectsMatteDeliveryEnabled] is not set to YES or your delegate does not respond to the captureOutput:didFinishProcessingPhoto:error: selector. Portrait effects matte generation requires depth to be present, so if you wish to enable portrait effects matte delivery, you must set depthDataDeliveryEnabled to YES. Setting this property to YES does not guarantee that a portrait effects matte will be present in the resulting AVCapturePhoto. As the property name implies, the matte is primarily used to improve the rendering quality of portrait effects on the image. If the photo's content lacks a clear foreground subject, no portrait effects matte is generated, and the -[AVCapturePhoto portraitEffectsMatte] property returns nil. Note that setting this property to YES may add significant processing time to the delivery of your didFinishProcessingPhoto: callback.
1676        ///
1677        /// For best rendering results in Apple's Photos.app, portrait photos should be captured with both embedded depth data (see depthDataDeliveryEnabled) and a portrait effects matte. When supported, it is recommended to opt in for both of these auxiliary images in your photo captures involving depth.
1678        #[unsafe(method(isPortraitEffectsMatteDeliveryEnabled))]
1679        #[unsafe(method_family = none)]
1680        pub unsafe fn isPortraitEffectsMatteDeliveryEnabled(&self) -> bool;
1681
1682        /// Setter for [`isPortraitEffectsMatteDeliveryEnabled`][Self::isPortraitEffectsMatteDeliveryEnabled].
1683        #[unsafe(method(setPortraitEffectsMatteDeliveryEnabled:))]
1684        #[unsafe(method_family = none)]
1685        pub unsafe fn setPortraitEffectsMatteDeliveryEnabled(
1686            &self,
1687            portrait_effects_matte_delivery_enabled: bool,
1688        );
1689
1690        /// Specifies whether the portrait effects matte captured with this photo should be written to the photo's file structure.
1691        ///
1692        ///
1693        /// Default is YES. When portraitEffectsMatteDeliveryEnabled is set to YES, this property specifies whether the included portrait effects matte should be written to the resulting photo's internal file structure. Portrait effects mattes are currently only supported in HEIF and JPEG. This property is ignored if portraitEffectsMatteDeliveryEnabled is set to NO.
1694        #[unsafe(method(embedsPortraitEffectsMatteInPhoto))]
1695        #[unsafe(method_family = none)]
1696        pub unsafe fn embedsPortraitEffectsMatteInPhoto(&self) -> bool;
1697
1698        /// Setter for [`embedsPortraitEffectsMatteInPhoto`][Self::embedsPortraitEffectsMatteInPhoto].
1699        #[unsafe(method(setEmbedsPortraitEffectsMatteInPhoto:))]
1700        #[unsafe(method_family = none)]
1701        pub unsafe fn setEmbedsPortraitEffectsMatteInPhoto(
1702            &self,
1703            embeds_portrait_effects_matte_in_photo: bool,
1704        );
1705
1706        #[cfg(feature = "AVSemanticSegmentationMatte")]
1707        /// Specifies which types of AVSemanticSegmentationMatte should be captured along with the photo.
1708        ///
1709        ///
1710        /// Default is empty array. You may set this property to an array of AVSemanticSegmentationMatteTypes you'd like to capture. Throws an exception if -[AVCapturePhotoOutput enabledSemanticSegmentationMatteTypes] does not contain any of the AVSemanticSegmentationMatteTypes specified. In other words, when setting up a capture session, you opt in for the superset of segmentation matte types you might like to receive, and then on a shot-by-shot basis, you may opt in to all or a subset of the previously specified types by setting this property. An exception is also thrown during -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] if your delegate does not respond to the captureOutput:didFinishProcessingPhoto:error: selector. Setting this property to YES does not guarantee that the specified mattes will be present in the resulting AVCapturePhoto. If the photo's content lacks any persons, for instance, no hair, skin, or teeth mattes are generated, and the -[AVCapturePhoto semanticSegmentationMatteForType:] property returns nil. Note that setting this property to YES may add significant processing time to the delivery of your didFinishProcessingPhoto: callback.
1711        #[unsafe(method(enabledSemanticSegmentationMatteTypes))]
1712        #[unsafe(method_family = none)]
1713        pub unsafe fn enabledSemanticSegmentationMatteTypes(
1714            &self,
1715        ) -> Retained<NSArray<AVSemanticSegmentationMatteType>>;
1716
1717        #[cfg(feature = "AVSemanticSegmentationMatte")]
1718        /// Setter for [`enabledSemanticSegmentationMatteTypes`][Self::enabledSemanticSegmentationMatteTypes].
1719        #[unsafe(method(setEnabledSemanticSegmentationMatteTypes:))]
1720        #[unsafe(method_family = none)]
1721        pub unsafe fn setEnabledSemanticSegmentationMatteTypes(
1722            &self,
1723            enabled_semantic_segmentation_matte_types: &NSArray<AVSemanticSegmentationMatteType>,
1724        );
1725
1726        /// Specifies whether enabledSemanticSegmentationMatteTypes captured with this photo should be written to the photo's file structure.
1727        ///
1728        ///
1729        /// Default is YES. This property specifies whether the captured semantic segmentation mattes should be written to the resulting photo's internal file structure. Semantic segmentation mattes are currently only supported in HEIF and JPEG. This property is ignored if enabledSemanticSegmentationMatteTypes is set to an empty array.
1730        #[unsafe(method(embedsSemanticSegmentationMattesInPhoto))]
1731        #[unsafe(method_family = none)]
1732        pub unsafe fn embedsSemanticSegmentationMattesInPhoto(&self) -> bool;
1733
1734        /// Setter for [`embedsSemanticSegmentationMattesInPhoto`][Self::embedsSemanticSegmentationMattesInPhoto].
1735        #[unsafe(method(setEmbedsSemanticSegmentationMattesInPhoto:))]
1736        #[unsafe(method_family = none)]
1737        pub unsafe fn setEmbedsSemanticSegmentationMattesInPhoto(
1738            &self,
1739            embeds_semantic_segmentation_mattes_in_photo: bool,
1740        );
1741
1742        /// A dictionary of metadata key/value pairs you'd like to have written to each photo in the capture request.
1743        ///
1744        ///
1745        /// Valid metadata keys are found in
1746        /// <ImageIO
1747        /// /CGImageProperties.h>. AVCapturePhotoOutput inserts a base set of metadata into each photo it captures, such as kCGImagePropertyOrientation, kCGImagePropertyExifDictionary, and kCGImagePropertyMakerAppleDictionary. You may specify metadata keys and values that should be written to each photo in the capture request. If you've specified metadata that also appears in AVCapturePhotoOutput's base set, your value replaces the base value. An NSInvalidArgumentException is thrown if you specify keys other than those found in
1748        /// <ImageIO
1749        /// /CGImageProperties.h>.
1750        #[unsafe(method(metadata))]
1751        #[unsafe(method_family = none)]
1752        pub unsafe fn metadata(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
1753
1754        /// Setter for [`metadata`][Self::metadata].
1755        #[unsafe(method(setMetadata:))]
1756        #[unsafe(method_family = none)]
1757        pub unsafe fn setMetadata(&self, metadata: &NSDictionary<NSString, AnyObject>);
1758
1759        /// Specifies that a Live Photo movie be captured to complement the still photo.
1760        ///
1761        ///
1762        /// A Live Photo movie is a short movie (with audio, if you've added an audio input to your session) containing the moments right before and after the still photo. A QuickTime movie file will be written to disk at the URL specified if it is a valid file URL accessible to your app's sandbox. You may only set this property if AVCapturePhotoOutput's livePhotoCaptureSupported property is YES. When you specify a Live Photo, your AVCapturePhotoCaptureDelegate object must implement -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:.
1763        #[unsafe(method(livePhotoMovieFileURL))]
1764        #[unsafe(method_family = none)]
1765        pub unsafe fn livePhotoMovieFileURL(&self) -> Option<Retained<NSURL>>;
1766
1767        /// Setter for [`livePhotoMovieFileURL`][Self::livePhotoMovieFileURL].
1768        #[unsafe(method(setLivePhotoMovieFileURL:))]
1769        #[unsafe(method_family = none)]
1770        pub unsafe fn setLivePhotoMovieFileURL(&self, live_photo_movie_file_url: Option<&NSURL>);
1771
1772        #[cfg(feature = "AVVideoSettings")]
1773        /// Specifies the video codec type to use when compressing video for the Live Photo movie complement.
1774        ///
1775        ///
1776        /// Prior to iOS 11, all Live Photo movie video tracks are compressed using H.264. Beginning in iOS 11, you can select the Live Photo movie video compression format by specifying one of the strings present in AVCapturePhotoOutput's availableLivePhotoVideoCodecTypes array.
1777        #[unsafe(method(livePhotoVideoCodecType))]
1778        #[unsafe(method_family = none)]
1779        pub unsafe fn livePhotoVideoCodecType(&self) -> Retained<AVVideoCodecType>;
1780
1781        #[cfg(feature = "AVVideoSettings")]
1782        /// Setter for [`livePhotoVideoCodecType`][Self::livePhotoVideoCodecType].
1783        #[unsafe(method(setLivePhotoVideoCodecType:))]
1784        #[unsafe(method_family = none)]
1785        pub unsafe fn setLivePhotoVideoCodecType(
1786            &self,
1787            live_photo_video_codec_type: &AVVideoCodecType,
1788        );
1789
1790        #[cfg(feature = "AVMetadataItem")]
1791        /// Movie-level metadata to be written to the Live Photo movie.
1792        ///
1793        ///
1794        /// An array of AVMetadataItems to be inserted into the top level of the Live Photo movie. The receiver makes immutable copies of the AVMetadataItems in the array. Live Photo movies always contain a AVMetadataQuickTimeMetadataKeyContentIdentifier which allow them to be paired with a similar identifier in the MakerNote of the photo complement. AVCapturePhotoSettings generates a unique content identifier for you. If you provide a metadata array containing an AVMetadataItem with keyspace = AVMetadataKeySpaceQuickTimeMetadata and key = AVMetadataQuickTimeMetadataKeyContentIdentifier, an NSInvalidArgumentException is thrown.
1795        #[unsafe(method(livePhotoMovieMetadata))]
1796        #[unsafe(method_family = none)]
1797        pub unsafe fn livePhotoMovieMetadata(&self) -> Retained<NSArray<AVMetadataItem>>;
1798
1799        #[cfg(feature = "AVMetadataItem")]
1800        /// Setter for [`livePhotoMovieMetadata`][Self::livePhotoMovieMetadata].
1801        #[unsafe(method(setLivePhotoMovieMetadata:))]
1802        #[unsafe(method_family = none)]
1803        pub unsafe fn setLivePhotoMovieMetadata(
1804            &self,
1805            live_photo_movie_metadata: Option<&NSArray<AVMetadataItem>>,
1806        );
1807
1808        /// An array of available kCVPixelBufferPixelFormatTypeKeys that may be used when specifying a previewPhotoFormat.
1809        ///
1810        ///
1811        /// The array is sorted such that the preview format requiring the fewest conversions is presented first.
1812        #[unsafe(method(availablePreviewPhotoPixelFormatTypes))]
1813        #[unsafe(method_family = none)]
1814        pub unsafe fn availablePreviewPhotoPixelFormatTypes(&self) -> Retained<NSArray<NSNumber>>;
1815
1816        /// A dictionary of Core Video pixel buffer attributes specifying the preview photo format to be delivered along with the RAW or processed photo.
1817        ///
1818        ///
1819        /// A dictionary of pixel buffer attributes specifying a smaller version of the RAW or processed photo for preview purposes. The kCVPixelBufferPixelFormatTypeKey is required and must be present in the receiver's -availablePreviewPhotoPixelFormatTypes array. Optional keys are { kCVPixelBufferWidthKey | kCVPixelBufferHeightKey }. If you wish to specify dimensions, you must add both width and height. Width and height are only honored up to the display dimensions. If you specify a width and height whose aspect ratio differs from the RAW or processed photo, the larger of the two dimensions is honored and aspect ratio of the RAW or processed photo is always preserved.
1820        #[unsafe(method(previewPhotoFormat))]
1821        #[unsafe(method_family = none)]
1822        pub unsafe fn previewPhotoFormat(
1823            &self,
1824        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
1825
1826        /// Setter for [`previewPhotoFormat`][Self::previewPhotoFormat].
1827        #[unsafe(method(setPreviewPhotoFormat:))]
1828        #[unsafe(method_family = none)]
1829        pub unsafe fn setPreviewPhotoFormat(
1830            &self,
1831            preview_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
1832        );
1833
1834        #[cfg(feature = "AVVideoSettings")]
1835        /// An array of available AVVideoCodecKeys that may be used when specifying an embeddedThumbnailPhotoFormat.
1836        ///
1837        ///
1838        /// The array is sorted such that the thumbnail codec type that is most backward compatible is listed first.
1839        #[unsafe(method(availableEmbeddedThumbnailPhotoCodecTypes))]
1840        #[unsafe(method_family = none)]
1841        pub unsafe fn availableEmbeddedThumbnailPhotoCodecTypes(
1842            &self,
1843        ) -> Retained<NSArray<AVVideoCodecType>>;
1844
1845        /// A dictionary of AVVideoSettings keys specifying the thumbnail format to be written to the processed or RAW photo.
1846        ///
1847        ///
1848        /// A dictionary of AVVideoSettings keys specifying a thumbnail (usually smaller) version of the processed photo to be embedded in that image before calling the AVCapturePhotoCaptureDelegate. This image is sometimes referred to as a "thumbnail image". The AVVideoCodecKey is required and must be present in the receiver's -availableEmbeddedThumbnailPhotoCodecTypes array. Optional keys are { AVVideoWidthKey | AVVideoHeightKey }. If you wish to specify dimensions, you must specify both width and height. If you specify a width and height whose aspect ratio differs from the processed photo, the larger of the two dimensions is honored and aspect ratio of the RAW or processed photo is always preserved. For RAW captures, use -rawEmbeddedThumbnailPhotoFormat to specify the thumbnail format you'd like to capture in the RAW image. For apps linked on or after iOS 12, the raw thumbnail format must be specified using the -rawEmbeddedThumbnailPhotoFormat API rather than -embeddedThumbnailPhotoFormat. Beginning in iOS 12, HEIC files may contain thumbnails up to the full resolution of the main image.
1849        #[unsafe(method(embeddedThumbnailPhotoFormat))]
1850        #[unsafe(method_family = none)]
1851        pub unsafe fn embeddedThumbnailPhotoFormat(
1852            &self,
1853        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
1854
1855        /// Setter for [`embeddedThumbnailPhotoFormat`][Self::embeddedThumbnailPhotoFormat].
1856        #[unsafe(method(setEmbeddedThumbnailPhotoFormat:))]
1857        #[unsafe(method_family = none)]
1858        pub unsafe fn setEmbeddedThumbnailPhotoFormat(
1859            &self,
1860            embedded_thumbnail_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
1861        );
1862
1863        #[cfg(feature = "AVVideoSettings")]
1864        /// An array of available AVVideoCodecKeys that may be used when specifying a rawEmbeddedThumbnailPhotoFormat.
1865        ///
1866        ///
1867        /// The array is sorted such that the thumbnail codec type that is most backward compatible is listed first.
1868        #[unsafe(method(availableRawEmbeddedThumbnailPhotoCodecTypes))]
1869        #[unsafe(method_family = none)]
1870        pub unsafe fn availableRawEmbeddedThumbnailPhotoCodecTypes(
1871            &self,
1872        ) -> Retained<NSArray<AVVideoCodecType>>;
1873
1874        /// A dictionary of AVVideoSettings keys specifying the thumbnail format to be written to the RAW photo in a RAW photo request.
1875        ///
1876        ///
1877        /// A dictionary of AVVideoSettings keys specifying a thumbnail (usually smaller) version of the RAW photo to be embedded in that image's DNG before calling back the AVCapturePhotoCaptureDelegate. The AVVideoCodecKey is required and must be present in the receiver's -availableRawEmbeddedThumbnailPhotoCodecTypes array. Optional keys are { AVVideoWidthKey | AVVideoHeightKey }. If you wish to specify dimensions, you must specify both width and height. If you specify a width and height whose aspect ratio differs from the RAW or processed photo, the larger of the two dimensions is honored and aspect ratio of the RAW or processed photo is always preserved. For apps linked on or after iOS 12, the raw thumbnail format must be specified using the -rawEmbeddedThumbnailPhotoFormat API rather than -embeddedThumbnailPhotoFormat. Beginning in iOS 12, DNG files may contain thumbnails up to the full resolution of the RAW image.
1878        #[unsafe(method(rawEmbeddedThumbnailPhotoFormat))]
1879        #[unsafe(method_family = none)]
1880        pub unsafe fn rawEmbeddedThumbnailPhotoFormat(
1881            &self,
1882        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
1883
1884        /// Setter for [`rawEmbeddedThumbnailPhotoFormat`][Self::rawEmbeddedThumbnailPhotoFormat].
1885        #[unsafe(method(setRawEmbeddedThumbnailPhotoFormat:))]
1886        #[unsafe(method_family = none)]
1887        pub unsafe fn setRawEmbeddedThumbnailPhotoFormat(
1888            &self,
1889            raw_embedded_thumbnail_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
1890        );
1891
1892        /// Specifies whether the photo output should use content aware distortion correction on this photo request (at its discretion).
1893        ///
1894        ///
1895        /// Default is NO. Set to YES if you wish content aware distortion correction to be performed on your AVCapturePhotos, when the photo output deems it necessary. Photos may or may not benefit from distortion correction. For instance, photos lacking faces may be left as is. Setting this property to YES does introduce a small additional amount of latency to the photo processing. You may check your AVCaptureResolvedPhotoSettings to see whether content aware distortion correction will be enabled for a given photo request. Throws an exception if -[AVCapturePhotoOutput contentAwareDistortionCorrectionEnabled] is not set to YES.
1896        #[unsafe(method(isAutoContentAwareDistortionCorrectionEnabled))]
1897        #[unsafe(method_family = none)]
1898        pub unsafe fn isAutoContentAwareDistortionCorrectionEnabled(&self) -> bool;
1899
1900        /// Setter for [`isAutoContentAwareDistortionCorrectionEnabled`][Self::isAutoContentAwareDistortionCorrectionEnabled].
1901        #[unsafe(method(setAutoContentAwareDistortionCorrectionEnabled:))]
1902        #[unsafe(method_family = none)]
1903        pub unsafe fn setAutoContentAwareDistortionCorrectionEnabled(
1904            &self,
1905            auto_content_aware_distortion_correction_enabled: bool,
1906        );
1907
1908        /// Specifies whether the photo will be captured with constant color.
1909        ///
1910        ///
1911        /// Default is NO. Set to YES if you wish to capture a constant color photo. Throws an exception if -[AVCapturePhotoOutput constantColorEnabled] is not set to YES.
1912        #[unsafe(method(isConstantColorEnabled))]
1913        #[unsafe(method_family = none)]
1914        pub unsafe fn isConstantColorEnabled(&self) -> bool;
1915
1916        /// Setter for [`isConstantColorEnabled`][Self::isConstantColorEnabled].
1917        #[unsafe(method(setConstantColorEnabled:))]
1918        #[unsafe(method_family = none)]
1919        pub unsafe fn setConstantColorEnabled(&self, constant_color_enabled: bool);
1920
1921        /// Specifies whether a fallback photo is delivered when taking a constant color capture.
1922        ///
1923        ///
1924        /// Default is NO. Set to YES if you wish to receive a fallback photo that can be used in case the main constant color photo's confidence level is too low for your use case.
1925        #[unsafe(method(isConstantColorFallbackPhotoDeliveryEnabled))]
1926        #[unsafe(method_family = none)]
1927        pub unsafe fn isConstantColorFallbackPhotoDeliveryEnabled(&self) -> bool;
1928
1929        /// Setter for [`isConstantColorFallbackPhotoDeliveryEnabled`][Self::isConstantColorFallbackPhotoDeliveryEnabled].
1930        #[unsafe(method(setConstantColorFallbackPhotoDeliveryEnabled:))]
1931        #[unsafe(method_family = none)]
1932        pub unsafe fn setConstantColorFallbackPhotoDeliveryEnabled(
1933            &self,
1934            constant_color_fallback_photo_delivery_enabled: bool,
1935        );
1936
1937        /// Specifies whether the built-in shutter sound should be suppressed when capturing a photo with these settings.
1938        ///
1939        ///
1940        /// Default is NO. Set to YES if you wish to suppress AVCapturePhotoOutput's built-in shutter sound for this request. AVCapturePhotoOutput throws an NSInvalidArgumentException in `-capturePhotoWithSettings:` if its `shutterSoundSuppressionSupported` property returns NO.
1941        #[unsafe(method(isShutterSoundSuppressionEnabled))]
1942        #[unsafe(method_family = none)]
1943        pub unsafe fn isShutterSoundSuppressionEnabled(&self) -> bool;
1944
1945        /// Setter for [`isShutterSoundSuppressionEnabled`][Self::isShutterSoundSuppressionEnabled].
1946        #[unsafe(method(setShutterSoundSuppressionEnabled:))]
1947        #[unsafe(method_family = none)]
1948        pub unsafe fn setShutterSoundSuppressionEnabled(
1949            &self,
1950            shutter_sound_suppression_enabled: bool,
1951        );
1952    );
1953}
1954
1955/// Methods declared on superclass `NSObject`.
1956impl AVCapturePhotoSettings {
1957    extern_methods!(
1958        #[unsafe(method(init))]
1959        #[unsafe(method_family = init)]
1960        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1961
1962        #[unsafe(method(new))]
1963        #[unsafe(method_family = new)]
1964        pub unsafe fn new() -> Retained<Self>;
1965    );
1966}
1967
1968extern_class!(
1969    /// A concrete subclass of AVCapturePhotoSettings that describes a bracketed capture.
1970    ///
1971    ///
1972    /// In addition to the properties expressed in the base class, an AVCapturePhotoBracketSettings contains an array of AVCaptureBracketedStillImageSettings objects, where each describes one individual photo in the bracket. bracketedSettings.count must be
1973    /// <
1974    /// = AVCapturePhotoOutput's -maxBracketedCapturePhotoCount. Capturing a photo bracket may require the allocation of additional resources.
1975    ///
1976    /// When you request a bracketed capture, your AVCapturePhotoCaptureDelegate's -captureOutput:didFinishProcessing{Photo | RawPhoto}... callbacks are called back bracketSettings.count times and provided with the corresponding AVCaptureBracketedStillImageSettings object from your request.
1977    ///
1978    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotobracketsettings?language=objc)
1979    #[unsafe(super(AVCapturePhotoSettings, NSObject))]
1980    #[derive(Debug, PartialEq, Eq, Hash)]
1981    pub struct AVCapturePhotoBracketSettings;
1982);
1983
1984unsafe impl NSCopying for AVCapturePhotoBracketSettings {}
1985
1986unsafe impl CopyingHelper for AVCapturePhotoBracketSettings {
1987    type Result = Self;
1988}
1989
1990unsafe impl NSObjectProtocol for AVCapturePhotoBracketSettings {}
1991
1992impl AVCapturePhotoBracketSettings {
1993    extern_methods!(
1994        #[cfg(feature = "AVCaptureStillImageOutput")]
1995        /// Creates an instance of AVCapturePhotoBracketSettings.
1996        ///
1997        ///
1998        /// Parameter `rawPixelFormatType`: One of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. May be set to 0 if you do not desire RAW capture.
1999        ///
2000        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you only wish to capture RAW, you may pass a non-zero rawPixelFormatType and a nil processedFormat dictionary. If you pass a rawPixelFormatType of 0 AND a nil processedFormat dictionary, the default output of AVVideoCodecTypeJPEG will be delivered.
2001        ///
2002        /// Parameter `bracketedSettings`: An array of AVCaptureBracketedStillImageSettings objects (defined in AVCaptureStillImageOutput.h). All must be of the same type, either AVCaptureManualExposureBracketedStillImageSettings or AVCaptureAutoExposureBracketedStillImageSettings. bracketedSettings.count must be
2003        /// <
2004        /// = AVCapturePhotoOutput's -maxBracketedCapturePhotoCount.
2005        ///
2006        /// Returns: An instance of AVCapturePhotoBracketSettings.
2007        ///
2008        ///
2009        /// An NSInvalidArgumentException is thrown if bracketedSettings is nil, contains zero elements, or mixes and matches different subclasses of AVCaptureBracketedStillImageSettings.
2010        ///
2011        /// AVCapturePhotoBracketSettings do not support flashMode, autoStillImageStabilizationEnabled, livePhotoMovieFileURL or livePhotoMovieMetadata.
2012        #[unsafe(method(photoBracketSettingsWithRawPixelFormatType:processedFormat:bracketedSettings:))]
2013        #[unsafe(method_family = none)]
2014        pub unsafe fn photoBracketSettingsWithRawPixelFormatType_processedFormat_bracketedSettings(
2015            raw_pixel_format_type: OSType,
2016            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
2017            bracketed_settings: &NSArray<AVCaptureBracketedStillImageSettings>,
2018        ) -> Retained<Self>;
2019
2020        #[cfg(all(feature = "AVCaptureStillImageOutput", feature = "AVMediaFormat"))]
2021        /// Creates an instance of AVCapturePhotoBracketSettings.
2022        ///
2023        ///
2024        /// Parameter `rawPixelFormatType`: One of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. May be set to 0 if you do not desire RAW capture.
2025        ///
2026        /// Parameter `rawFileType`: The file container for which the RAW image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
2027        ///
2028        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you only wish to capture RAW, you may pass a non-zero rawPixelFormatType and a nil processedFormat dictionary. If you pass a rawPixelFormatType of 0 AND a nil processedFormat dictionary, the default output of AVVideoCodecTypeJPEG will be delivered.
2029        ///
2030        /// Parameter `processedFileType`: The file container for which the processed image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
2031        ///
2032        /// Parameter `bracketedSettings`: An array of AVCaptureBracketedStillImageSettings objects (defined in AVCaptureStillImageOutput.h). All must be of the same type, either AVCaptureManualExposureBracketedStillImageSettings or AVCaptureAutoExposureBracketedStillImageSettings. bracketedSettings.count must be
2033        /// <
2034        /// = AVCapturePhotoOutput's -maxBracketedCapturePhotoCount.
2035        ///
2036        /// Returns: An instance of AVCapturePhotoBracketSettings.
2037        ///
2038        ///
2039        /// An NSInvalidArgumentException is thrown if bracketedSettings is nil, contains zero elements, or mixes and matches different subclasses of AVCaptureBracketedStillImageSettings.
2040        ///
2041        /// AVCapturePhotoBracketSettings do not support flashMode, autoStillImageStabilizationEnabled, livePhotoMovieFileURL or livePhotoMovieMetadata.
2042        #[unsafe(method(photoBracketSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:bracketedSettings:))]
2043        #[unsafe(method_family = none)]
2044        pub unsafe fn photoBracketSettingsWithRawPixelFormatType_rawFileType_processedFormat_processedFileType_bracketedSettings(
2045            raw_pixel_format_type: OSType,
2046            raw_file_type: Option<&AVFileType>,
2047            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
2048            processed_file_type: Option<&AVFileType>,
2049            bracketed_settings: &NSArray<AVCaptureBracketedStillImageSettings>,
2050        ) -> Retained<Self>;
2051
2052        #[cfg(feature = "AVCaptureStillImageOutput")]
2053        /// An array of AVCaptureBracketedStillImageSettings objects you passed in -initWithFormat:rawPixelFormatType:bracketedSettings:
2054        ///
2055        ///
2056        /// This read-only property never returns nil.
2057        #[unsafe(method(bracketedSettings))]
2058        #[unsafe(method_family = none)]
2059        pub unsafe fn bracketedSettings(
2060            &self,
2061        ) -> Retained<NSArray<AVCaptureBracketedStillImageSettings>>;
2062
2063        /// Specifies whether lens (optical) stabilization should be employed during the bracketed capture.
2064        ///
2065        ///
2066        /// Default value is NO. This property may only be set to YES if AVCapturePhotoOutput's isLensStabilizationDuringBracketedCaptureSupported is YES. When set to YES, AVCapturePhotoOutput holds the lens steady for the duration of the bracket to counter hand shake and produce a sharper bracket of images.
2067        #[unsafe(method(isLensStabilizationEnabled))]
2068        #[unsafe(method_family = none)]
2069        pub unsafe fn isLensStabilizationEnabled(&self) -> bool;
2070
2071        /// Setter for [`isLensStabilizationEnabled`][Self::isLensStabilizationEnabled].
2072        #[unsafe(method(setLensStabilizationEnabled:))]
2073        #[unsafe(method_family = none)]
2074        pub unsafe fn setLensStabilizationEnabled(&self, lens_stabilization_enabled: bool);
2075    );
2076}
2077
2078/// Methods declared on superclass `AVCapturePhotoSettings`.
2079impl AVCapturePhotoBracketSettings {
2080    extern_methods!(
2081        /// Creates a default instance of AVCapturePhotoSettings.
2082        ///
2083        ///
2084        /// Returns: An instance of AVCapturePhotoSettings.
2085        ///
2086        ///
2087        /// A default AVCapturePhotoSettings object has a format of AVVideoCodecTypeJPEG, a fileType of AVFileTypeJPEG, and photoQualityPrioritization set to AVCapturePhotoQualityPrioritizationBalanced.
2088        #[unsafe(method(photoSettings))]
2089        #[unsafe(method_family = none)]
2090        pub unsafe fn photoSettings() -> Retained<Self>;
2091
2092        /// Creates an instance of AVCapturePhotoSettings with a user-specified output format.
2093        ///
2094        ///
2095        /// Parameter `format`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
2096        ///
2097        /// Returns: An instance of AVCapturePhotoSettings.
2098        ///
2099        ///
2100        /// If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil format dictionary is analogous to calling +photoSettings.
2101        #[unsafe(method(photoSettingsWithFormat:))]
2102        #[unsafe(method_family = none)]
2103        pub unsafe fn photoSettingsWithFormat(
2104            format: Option<&NSDictionary<NSString, AnyObject>>,
2105        ) -> Retained<Self>;
2106
2107        /// Creates an instance of AVCapturePhotoSettings specifying RAW only output.
2108        ///
2109        ///
2110        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
2111        ///
2112        /// Returns: An instance of AVCapturePhotoSettings.
2113        ///
2114        ///
2115        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
2116        #[unsafe(method(photoSettingsWithRawPixelFormatType:))]
2117        #[unsafe(method_family = none)]
2118        pub unsafe fn photoSettingsWithRawPixelFormatType(
2119            raw_pixel_format_type: OSType,
2120        ) -> Retained<Self>;
2121
2122        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG).
2123        ///
2124        ///
2125        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
2126        ///
2127        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
2128        ///
2129        /// Returns: An instance of AVCapturePhotoSettings.
2130        ///
2131        ///
2132        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil processedFormat dictionary is analogous to calling +photoSettingsWithRawPixelFormatType:. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
2133        #[unsafe(method(photoSettingsWithRawPixelFormatType:processedFormat:))]
2134        #[unsafe(method_family = none)]
2135        pub unsafe fn photoSettingsWithRawPixelFormatType_processedFormat(
2136            raw_pixel_format_type: OSType,
2137            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
2138        ) -> Retained<Self>;
2139
2140        #[cfg(feature = "AVMediaFormat")]
2141        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG) and a file container to which it will be written.
2142        ///
2143        ///
2144        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h). Pass 0 if you do not desire a RAW photo callback.
2145        ///
2146        /// Parameter `rawFileType`: The file container for which the RAW image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
2147        ///
2148        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. Pass nil if you do not desire a processed photo callback.
2149        ///
2150        /// Parameter `processedFileType`: The file container for which the processed image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
2151        ///
2152        /// Returns: An instance of AVCapturePhotoSettings.
2153        ///
2154        ///
2155        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. Set rawPixelFormatType to 0 if you do not desire a RAW photo callback. If you are specifying a rawFileType, it must be present in AVCapturePhotoOutput's -availableRawPhotoFileTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you are specifying a processedFileType, it must be present in AVCapturePhotoOutput's -availablePhotoFileTypes array. Pass a nil processedFormat dictionary if you only desire a RAW photo capture. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
2156        #[unsafe(method(photoSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:))]
2157        #[unsafe(method_family = none)]
2158        pub unsafe fn photoSettingsWithRawPixelFormatType_rawFileType_processedFormat_processedFileType(
2159            raw_pixel_format_type: OSType,
2160            raw_file_type: Option<&AVFileType>,
2161            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
2162            processed_file_type: Option<&AVFileType>,
2163        ) -> Retained<Self>;
2164
2165        /// Creates an instance of AVCapturePhotoSettings with a new uniqueID from an existing instance of AVCapturePhotoSettings.
2166        ///
2167        ///
2168        /// Parameter `photoSettings`: An existing AVCapturePhotoSettings instance.
2169        ///
2170        /// Returns: An new instance of AVCapturePhotoSettings with new uniqueID.
2171        ///
2172        ///
2173        /// Use this factory method to create a clone of an existing photo settings instance, but with a new uniqueID that can safely be passed to AVCapturePhotoOutput -capturePhotoWithSettings:delegate:.
2174        #[unsafe(method(photoSettingsFromPhotoSettings:))]
2175        #[unsafe(method_family = none)]
2176        pub unsafe fn photoSettingsFromPhotoSettings(
2177            photo_settings: &AVCapturePhotoSettings,
2178        ) -> Retained<Self>;
2179    );
2180}
2181
2182/// Methods declared on superclass `NSObject`.
2183impl AVCapturePhotoBracketSettings {
2184    extern_methods!(
2185        #[unsafe(method(init))]
2186        #[unsafe(method_family = init)]
2187        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2188
2189        #[unsafe(method(new))]
2190        #[unsafe(method_family = new)]
2191        pub unsafe fn new() -> Retained<Self>;
2192    );
2193}
2194
2195extern_class!(
2196    /// An immutable object produced by callbacks in each and every AVCapturePhotoCaptureDelegate protocol method.
2197    ///
2198    ///
2199    /// When you initiate a photo capture request using -capturePhotoWithSettings:delegate:, some of your settings are not yet certain. For instance, auto flash and auto still image stabilization allow the AVCapturePhotoOutput to decide just in time whether to employ flash or still image stabilization, depending on the current scene. Once the request is issued, AVCapturePhotoOutput begins the capture, resolves the uncertain settings, and in its first callback informs you of its choices through an AVCaptureResolvedPhotoSettings object. This same object is presented to all the callbacks fired for a particular photo capture request. Its uniqueID property matches that of the AVCapturePhotoSettings instance you used to initiate the photo request.
2200    ///
2201    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcaptureresolvedphotosettings?language=objc)
2202    #[unsafe(super(NSObject))]
2203    #[derive(Debug, PartialEq, Eq, Hash)]
2204    pub struct AVCaptureResolvedPhotoSettings;
2205);
2206
2207unsafe impl NSObjectProtocol for AVCaptureResolvedPhotoSettings {}
2208
2209impl AVCaptureResolvedPhotoSettings {
2210    extern_methods!(
2211        #[unsafe(method(init))]
2212        #[unsafe(method_family = init)]
2213        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2214
2215        #[unsafe(method(new))]
2216        #[unsafe(method_family = new)]
2217        pub unsafe fn new() -> Retained<Self>;
2218
2219        /// uniqueID matches that of the AVCapturePhotoSettings instance you passed to -capturePhotoWithSettings:delegate:.
2220        #[unsafe(method(uniqueID))]
2221        #[unsafe(method_family = none)]
2222        pub unsafe fn uniqueID(&self) -> i64;
2223
2224        #[cfg(feature = "objc2-core-media")]
2225        /// The resolved dimensions of the photo buffer that will be delivered to the -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback.
2226        ///
2227        ///
2228        /// If you request a RAW capture with no processed companion image, photoDimensions resolve to { 0, 0 }.
2229        #[unsafe(method(photoDimensions))]
2230        #[unsafe(method_family = none)]
2231        pub unsafe fn photoDimensions(&self) -> CMVideoDimensions;
2232
2233        #[cfg(feature = "objc2-core-media")]
2234        /// The resolved dimensions of the RAW photo buffer that will be delivered to the -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback.
2235        ///
2236        ///
2237        /// If you request a non-RAW capture, rawPhotoDimensions resolve to { 0, 0 }.
2238        #[unsafe(method(rawPhotoDimensions))]
2239        #[unsafe(method_family = none)]
2240        pub unsafe fn rawPhotoDimensions(&self) -> CMVideoDimensions;
2241
2242        #[cfg(feature = "objc2-core-media")]
2243        /// The resolved dimensions of the preview photo buffer that will be delivered to the -captureOutput:didFinishProcessing{Photo | RawPhoto}... AVCapturePhotoCaptureDelegate callbacks.
2244        ///
2245        ///
2246        /// If you don't request a preview image, previewDimensions resolve to { 0, 0 }.
2247        #[unsafe(method(previewDimensions))]
2248        #[unsafe(method_family = none)]
2249        pub unsafe fn previewDimensions(&self) -> CMVideoDimensions;
2250
2251        #[cfg(feature = "objc2-core-media")]
2252        /// The resolved dimensions of the embedded thumbnail that will be written to the processed photo delivered to the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
2253        ///
2254        ///
2255        /// If you don't request an embedded thumbnail image, embeddedThumbnailDimensions resolve to { 0, 0 }.
2256        #[unsafe(method(embeddedThumbnailDimensions))]
2257        #[unsafe(method_family = none)]
2258        pub unsafe fn embeddedThumbnailDimensions(&self) -> CMVideoDimensions;
2259
2260        #[cfg(feature = "objc2-core-media")]
2261        /// The resolved dimensions of the embedded thumbnail that will be written to the RAW photo delivered to the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
2262        ///
2263        ///
2264        /// If you don't request a raw embedded thumbnail image, rawEmbeddedThumbnailDimensions resolve to { 0, 0 }.
2265        #[unsafe(method(rawEmbeddedThumbnailDimensions))]
2266        #[unsafe(method_family = none)]
2267        pub unsafe fn rawEmbeddedThumbnailDimensions(&self) -> CMVideoDimensions;
2268
2269        #[cfg(feature = "objc2-core-media")]
2270        /// The resolved dimensions of the portrait effects matte that will be delivered to the AVCapturePhoto in the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
2271        ///
2272        ///
2273        /// If you request a portrait effects matte by calling -[AVCapturePhotoSettings setPortraitEffectsMatteDeliveryEnabled:YES], portraitEffectsMatteDimensions resolve to the expected dimensions of the portrait effects matte, assuming one is generated (see -[AVCapturePhotoSettings portraitEffectsMatteDeliveryEnabled] for a discussion of why a portrait effects matte might not be delivered). If you don't request a portrait effects matte, portraitEffectsMatteDimensions always resolve to { 0, 0 }.
2274        #[unsafe(method(portraitEffectsMatteDimensions))]
2275        #[unsafe(method_family = none)]
2276        pub unsafe fn portraitEffectsMatteDimensions(&self) -> CMVideoDimensions;
2277
2278        #[cfg(all(feature = "AVSemanticSegmentationMatte", feature = "objc2-core-media"))]
2279        /// Queries the resolved dimensions of semantic segmentation mattes that will be delivered to the AVCapturePhoto in the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
2280        ///
2281        ///
2282        /// If you request semantic segmentation mattes by calling -[AVCapturePhotoSettings setEnabledSemanticSegmentationMatteTypes:] with a non-empty array, the dimensions resolve to the expected dimensions for each of the mattes, assuming they are generated (see -[AVCapturePhotoSettings enabledSemanticSegmentationMatteTypes] for a discussion of why a particular matte might not be delivered). If you don't request any semantic segmentation mattes, the result will always be { 0, 0 }.
2283        #[unsafe(method(dimensionsForSemanticSegmentationMatteOfType:))]
2284        #[unsafe(method_family = none)]
2285        pub unsafe fn dimensionsForSemanticSegmentationMatteOfType(
2286            &self,
2287            semantic_segmentation_matte_type: &AVSemanticSegmentationMatteType,
2288        ) -> CMVideoDimensions;
2289
2290        #[cfg(feature = "objc2-core-media")]
2291        /// The resolved dimensions of the video track in the movie that will be delivered to the -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error: callback.
2292        ///
2293        ///
2294        /// If you don't request Live Photo capture, livePhotoMovieDimensions resolve to { 0, 0 }.
2295        #[unsafe(method(livePhotoMovieDimensions))]
2296        #[unsafe(method_family = none)]
2297        pub unsafe fn livePhotoMovieDimensions(&self) -> CMVideoDimensions;
2298
2299        /// Indicates whether the flash will fire when capturing the photo.
2300        ///
2301        ///
2302        /// When you specify AVCaptureFlashModeAuto as your AVCapturePhotoSettings.flashMode, you don't know if flash capture will be chosen until you inspect the AVCaptureResolvedPhotoSettings flashEnabled property. If the device becomes too hot, the flash becomes temporarily unavailable. You can key-value observe AVCaptureDevice's flashAvailable property to know when this occurs. If the flash is unavailable due to thermal issues, and you specify a flashMode of AVCaptureFlashModeOn, flashEnabled still resolves to NO until the device has sufficiently cooled off.
2303        #[unsafe(method(isFlashEnabled))]
2304        #[unsafe(method_family = none)]
2305        pub unsafe fn isFlashEnabled(&self) -> bool;
2306
2307        /// Indicates whether red-eye reduction will be applied as necessary when capturing the photo if flashEnabled is YES.
2308        #[unsafe(method(isRedEyeReductionEnabled))]
2309        #[unsafe(method_family = none)]
2310        pub unsafe fn isRedEyeReductionEnabled(&self) -> bool;
2311
2312        #[cfg(feature = "objc2-core-media")]
2313        /// The resolved dimensions of the AVCaptureDeferredPhotoProxy when opting in to deferred photo delivery.  See AVCaptureDeferredPhotoProxy.
2314        ///
2315        ///
2316        /// If you don't opt in to deferred photo delivery, deferredPhotoProxyDimensions resolve to { 0, 0 }.  When an AVCaptureDeferredPhotoProxy is returned, the photoDimensions property of this object represents the dimensions of the final photo.
2317        #[unsafe(method(deferredPhotoProxyDimensions))]
2318        #[unsafe(method_family = none)]
2319        pub unsafe fn deferredPhotoProxyDimensions(&self) -> CMVideoDimensions;
2320
2321        /// Indicates whether still image stabilization will be employed when capturing the photo.
2322        ///
2323        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -photoQualityPrioritization to indicate your preferred quality vs speed when configuring your AVCapturePhotoSettings. You may query -photoProcessingTimeRange to get an indication of how long the photo will take to process before delivery to your delegate.
2324        #[deprecated]
2325        #[unsafe(method(isStillImageStabilizationEnabled))]
2326        #[unsafe(method_family = none)]
2327        pub unsafe fn isStillImageStabilizationEnabled(&self) -> bool;
2328
2329        /// Indicates whether fusion of virtual device constituent camera images will be used when capturing the photo, such as the wide-angle and telephoto images on a DualCamera.
2330        #[unsafe(method(isVirtualDeviceFusionEnabled))]
2331        #[unsafe(method_family = none)]
2332        pub unsafe fn isVirtualDeviceFusionEnabled(&self) -> bool;
2333
2334        /// Indicates whether DualCamera wide-angle and telephoto image fusion will be employed when capturing the photo. As of iOS 13, this property is deprecated in favor of virtualDeviceFusionEnabled.
2335        #[deprecated]
2336        #[unsafe(method(isDualCameraFusionEnabled))]
2337        #[unsafe(method_family = none)]
2338        pub unsafe fn isDualCameraFusionEnabled(&self) -> bool;
2339
2340        /// Indicates the number of times your -captureOutput:didFinishProcessingPhoto:error: callback will be called. For instance, if you've requested an auto exposure bracket of 3 with JPEG and RAW, the expectedPhotoCount is 6.
2341        #[unsafe(method(expectedPhotoCount))]
2342        #[unsafe(method_family = none)]
2343        pub unsafe fn expectedPhotoCount(&self) -> NSUInteger;
2344
2345        #[cfg(feature = "objc2-core-media")]
2346        /// Indicates the processing time range you can expect for this photo to be delivered to your delegate. the .start field of the CMTimeRange is zero-based. In other words, if photoProcessingTimeRange.start is equal to .5 seconds, then the minimum processing time for this photo is .5 seconds. The .start field plus the .duration field of the CMTimeRange indicate the max expected processing time for this photo. Consider implementing a UI affordance if the max processing time is uncomfortably long.
2347        #[unsafe(method(photoProcessingTimeRange))]
2348        #[unsafe(method_family = none)]
2349        pub unsafe fn photoProcessingTimeRange(&self) -> CMTimeRange;
2350
2351        /// Indicates whether content aware distortion correction will be employed when capturing the photo.
2352        #[unsafe(method(isContentAwareDistortionCorrectionEnabled))]
2353        #[unsafe(method_family = none)]
2354        pub unsafe fn isContentAwareDistortionCorrectionEnabled(&self) -> bool;
2355
2356        /// Indicates whether fast capture prioritization will be employed when capturing the photo.
2357        #[unsafe(method(isFastCapturePrioritizationEnabled))]
2358        #[unsafe(method_family = none)]
2359        pub unsafe fn isFastCapturePrioritizationEnabled(&self) -> bool;
2360    );
2361}
2362
2363extern_class!(
2364    /// An object representing a photo in memory, produced by the -captureOutput:didFinishingProcessingPhoto:error: in the AVCapturePhotoCaptureDelegate protocol method.
2365    ///
2366    ///
2367    /// Beginning in iOS 11, AVCapturePhotoOutput's AVCapturePhotoCaptureDelegate supports a simplified callback for delivering image data, namely -captureOutput:didFinishingProcessingPhoto:error:. This callback presents each image result for your capture request as an AVCapturePhoto object, an immutable wrapper from which various properties of the photo capture may be queried, such as the photo's preview pixel buffer, metadata, depth data, camera calibration data, and image bracket specific properties. AVCapturePhoto can wrap file-containerized photo results, such as HEVC encoded image data, containerized in the HEIC file format. CMSampleBufferRef, on the other hand, may only be used to express non file format containerized photo data. For this reason, the AVCapturePhotoCaptureDelegate protocol methods that return CMSampleBuffers have been deprecated in favor of -captureOutput:didFinishingProcessingPhoto:error:. A AVCapturePhoto wraps a single image result. For instance, if you've requested a bracketed capture of 3 images, your callback is called 3 times, each time delivering an AVCapturePhoto.
2368    ///
2369    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephoto?language=objc)
2370    #[unsafe(super(NSObject))]
2371    #[derive(Debug, PartialEq, Eq, Hash)]
2372    pub struct AVCapturePhoto;
2373);
2374
2375unsafe impl NSObjectProtocol for AVCapturePhoto {}
2376
2377impl AVCapturePhoto {
2378    extern_methods!(
2379        #[unsafe(method(init))]
2380        #[unsafe(method_family = init)]
2381        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2382
2383        #[unsafe(method(new))]
2384        #[unsafe(method_family = new)]
2385        pub unsafe fn new() -> Retained<Self>;
2386
2387        #[cfg(feature = "objc2-core-media")]
2388        /// The time at which this image was captured, synchronized to the synchronizationClock of the AVCaptureSession
2389        ///
2390        ///
2391        /// The timestamp property indicates the time the image was captured, and is analogous to CMSampleBufferGetPresentationTimeStamp(). If an error was provided in the -captureOutput:didFinishingProcessingPhoto:error: callback, timestamp returns kCMTimeInvalid.
2392        #[unsafe(method(timestamp))]
2393        #[unsafe(method_family = none)]
2394        pub unsafe fn timestamp(&self) -> CMTime;
2395
2396        /// This property returns YES if this photo is a RAW image.
2397        ///
2398        ///
2399        /// Your AVCapturePhotoCaptureDelegate's -captureOutput:didFinishingProcessingPhoto:error: method may be called one or more times with image results, including RAW or non-RAW images. This property distinguishes RAW from non-RAW image results, for instance, if you've requested a RAW + JPEG capture.
2400        #[unsafe(method(isRawPhoto))]
2401        #[unsafe(method_family = none)]
2402        pub unsafe fn isRawPhoto(&self) -> bool;
2403
2404        #[cfg(feature = "objc2-core-video")]
2405        /// For uncompressed or RAW captures, this property offers access to the pixel data.
2406        ///
2407        ///
2408        /// Uncompressed captures, such as '420f' or 'BGRA', Bayer RAW captures, such as 'bgg4', or Apple ProRAW captures, such as 'l64r', present pixel data as a CVPixelBuffer. See AVCapturePhotoOutput's -appleProRAWEnabled for a discussion on the differences between Bayer RAW and Apple ProRAW. This property is analogous to CMSampleBufferGetImageBuffer(). The pixel buffer contains only the minimal attachments required for correct display. Compressed captures, such as 'jpeg', return nil.
2409        #[unsafe(method(pixelBuffer))]
2410        #[unsafe(method_family = none)]
2411        pub unsafe fn pixelBuffer(&self) -> Option<Retained<CVPixelBuffer>>;
2412
2413        #[cfg(feature = "objc2-core-video")]
2414        /// This property offers access to the preview image pixel data if you've requested it.
2415        ///
2416        ///
2417        /// If you requested a preview image by calling -[AVCapturePhotoSettings setPreviewPhotoFormat:] with a non-nil value, this property offers access to the resulting preview image pixel data, and is analogous to CMSampleBufferGetImageBuffer(). The pixel buffer contains only the minimal attachments required for correct display. Nil is returned if you did not request a preview image.
2418        #[unsafe(method(previewPixelBuffer))]
2419        #[unsafe(method_family = none)]
2420        pub unsafe fn previewPixelBuffer(&self) -> Option<Retained<CVPixelBuffer>>;
2421
2422        /// The format of the embedded thumbnail contained in this AVCapturePhoto.
2423        ///
2424        ///
2425        /// If you requested an embedded thumbnail image by calling -[AVCapturePhotoSettings setEmbeddedThumbnailPhotoFormat:] with a non-nil value, this property offers access to the resolved embedded thumbnail AVVideoSettings dictionary. Nil is returned if you did not request an embedded thumbnail image.
2426        #[unsafe(method(embeddedThumbnailPhotoFormat))]
2427        #[unsafe(method_family = none)]
2428        pub unsafe fn embeddedThumbnailPhotoFormat(
2429            &self,
2430        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
2431
2432        #[cfg(feature = "AVDepthData")]
2433        /// An AVDepthData object wrapping a disparity/depth map associated with this photo.
2434        ///
2435        ///
2436        /// If you requested depth data delivery by calling -[AVCapturePhotoSettings setDepthDataDeliveryEnabled:YES], this property offers access to the resulting AVDepthData object. Nil is returned if you did not request depth data delivery. Note that the depth data is only embedded in the photo's internal file format container if you set -[AVCapturePhotoSettings setEmbedsDepthDataInPhoto:YES].
2437        #[unsafe(method(depthData))]
2438        #[unsafe(method_family = none)]
2439        pub unsafe fn depthData(&self) -> Option<Retained<AVDepthData>>;
2440
2441        #[cfg(feature = "AVPortraitEffectsMatte")]
2442        /// An AVPortraitEffectsMatte object wrapping a matte associated with this photo.
2443        ///
2444        ///
2445        /// If you requested portrait effects matte delivery by calling -[AVCapturePhotoSettings setPortraitEffectsMatteDeliveryEnabled:YES], this property offers access to the resulting AVPortraitEffectsMatte object. Nil is returned if you did not request portrait effects matte delivery. Note that the portrait effects matte is only embedded in the photo's internal file format container if you set -[AVCapturePhotoSettings setEmbedsPortraitEffectsMatteInPhoto:YES].
2446        #[unsafe(method(portraitEffectsMatte))]
2447        #[unsafe(method_family = none)]
2448        pub unsafe fn portraitEffectsMatte(&self) -> Option<Retained<AVPortraitEffectsMatte>>;
2449
2450        #[cfg(feature = "AVSemanticSegmentationMatte")]
2451        /// An accessor for semantic segmentation mattes associated with this photo.
2452        ///
2453        ///
2454        /// Parameter `semanticSegmentationMatteType`: The matte type of interest (hair, skin, etc).
2455        ///
2456        /// Returns: An instance of AVSemanticSegmentationMatte, or nil if none could be found for the specified type.
2457        ///
2458        ///
2459        /// If you requested one or more semantic segmentation mattes by calling -[AVCapturePhotoSettings setEnabledSemanticSegmentationMatteTypes:] with a non-empty array of types, this property offers access to the resulting AVSemanticSegmentationMatte objects. Nil is returned if you did not request semantic segmentation matte delivery, or if no mattes of the specified type are available. Note that semantic segmentation mattes are only embedded in the photo's internal file format container if you call -[AVCapturePhotoSettings setEmbedsSemanticSegmentationMattesInPhoto:YES].
2460        #[unsafe(method(semanticSegmentationMatteForType:))]
2461        #[unsafe(method_family = none)]
2462        pub unsafe fn semanticSegmentationMatteForType(
2463            &self,
2464            semantic_segmentation_matte_type: &AVSemanticSegmentationMatteType,
2465        ) -> Option<Retained<AVSemanticSegmentationMatte>>;
2466
2467        /// An ImageIO property style dictionary of metadata associated with this photo.
2468        ///
2469        ///
2470        /// Valid metadata keys are found in
2471        /// <ImageIO
2472        /// /CGImageProperties.h>, such as kCGImagePropertyOrientation, kCGImagePropertyExifDictionary, kCGImagePropertyMakerAppleDictionary, etc.
2473        #[unsafe(method(metadata))]
2474        #[unsafe(method_family = none)]
2475        pub unsafe fn metadata(&self) -> Retained<NSDictionary<NSString, AnyObject>>;
2476
2477        #[cfg(feature = "AVCameraCalibrationData")]
2478        /// An AVCameraCalibrationData object representing the calibration information for the camera providing the photo.
2479        ///
2480        ///
2481        /// Camera calibration data is only present if you set AVCapturePhotoSettings.setCameraCalibrationDataDeliveryEnabled to YES. When requesting virtual device constituent photo delivery plus cameraCalibrationDataDeliveryEnabled, camera calibration information is delivered with all resultant photos and is specific to the constituent device producing that photo.
2482        #[unsafe(method(cameraCalibrationData))]
2483        #[unsafe(method_family = none)]
2484        pub unsafe fn cameraCalibrationData(&self) -> Option<Retained<AVCameraCalibrationData>>;
2485
2486        /// The AVCaptureResolvedPhotoSettings associated with all photo results for a given -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] request.
2487        ///
2488        ///
2489        /// Even in the event of an error, the resolved settings are always non nil.
2490        #[unsafe(method(resolvedSettings))]
2491        #[unsafe(method_family = none)]
2492        pub unsafe fn resolvedSettings(&self) -> Retained<AVCaptureResolvedPhotoSettings>;
2493
2494        /// This photo's index (1-based) in the total expected photo count.
2495        ///
2496        ///
2497        /// The resolvedSettings.expectedPhotoCount property indicates the total number of images that will be returned for a given capture request. This property indicates this photo's index (1-based). When you receive a -captureOutput:didFinishProcessingPhoto:error: callback with a photo whose photoCount matches resolvedSettings.expectedPhotoCount, you know you've received the last one for the given capture request.
2498        #[unsafe(method(photoCount))]
2499        #[unsafe(method_family = none)]
2500        pub unsafe fn photoCount(&self) -> NSInteger;
2501
2502        #[cfg(feature = "AVCaptureDevice")]
2503        /// The device type of the source camera providing the photo.
2504        ///
2505        ///
2506        /// When taking a virtual device constituent photo capture, you may query this property to find out the source type of the photo. For instance, on a DualCamera, resulting photos will be of sourceDeviceType AVCaptureDeviceTypeBuiltInWideCamera, or AVCaptureDeviceTypeBuiltInTelephotoCamera. For all other types of capture, the source device type is equal to the -[AVCaptureDevice deviceType] of the AVCaptureDevice to which the AVCapturePhotoOutput is connected. Returns nil if the source of the photo is not an AVCaptureDevice.
2507        #[unsafe(method(sourceDeviceType))]
2508        #[unsafe(method_family = none)]
2509        pub unsafe fn sourceDeviceType(&self) -> Option<Retained<AVCaptureDeviceType>>;
2510
2511        #[cfg(feature = "objc2-core-video")]
2512        /// Returns a pixel buffer with the same aspect ratio as the constant color photo, where each pixel value (unsigned 8-bit integer) indicates how fully the constant color effect has been achieved in the corresponding region of the constant color photo -- 255 means full confidence, 0 means zero confidence.
2513        ///
2514        ///
2515        /// NULL is returned for any non constant color photos.
2516        #[unsafe(method(constantColorConfidenceMap))]
2517        #[unsafe(method_family = none)]
2518        pub unsafe fn constantColorConfidenceMap(&self) -> Option<Retained<CVPixelBuffer>>;
2519
2520        /// Returns a score summarizing the overall confidence level of a constant color photo -- 1.0 means full confidence, 0.0 means zero confidence.
2521        ///
2522        ///
2523        /// Default is 0.0.
2524        ///
2525        /// In most use cases (document scanning for example), the central region of the photo is considered more important than the peripherals, therefore the confidence level of the central pixels are weighted more heavily than pixels on the edges of the photo.
2526        ///
2527        /// Use constantColorConfidenceMap for more use case specific analyses of the confidence level.
2528        #[unsafe(method(constantColorCenterWeightedMeanConfidenceLevel))]
2529        #[unsafe(method_family = none)]
2530        pub unsafe fn constantColorCenterWeightedMeanConfidenceLevel(&self) -> c_float;
2531
2532        /// Indicates whether this photo is a fallback photo for a constant color capture.
2533        #[unsafe(method(isConstantColorFallbackPhoto))]
2534        #[unsafe(method_family = none)]
2535        pub unsafe fn isConstantColorFallbackPhoto(&self) -> bool;
2536    );
2537}
2538
2539/// AVCapturePhotoConversions.
2540impl AVCapturePhoto {
2541    extern_methods!(
2542        /// Flattens the AVCapturePhoto to an NSData using the file container format (processedFileType or rawFileType) specified in the AVCapturePhotoSettings (e.g. JFIF, HEIF, DNG).
2543        ///
2544        ///
2545        /// Returns: An NSData containing bits in the file container's format, or nil if the flattening process fails.
2546        #[unsafe(method(fileDataRepresentation))]
2547        #[unsafe(method_family = none)]
2548        pub unsafe fn fileDataRepresentation(&self) -> Option<Retained<NSData>>;
2549
2550        /// Flattens the AVCapturePhoto to an NSData using the file container format (processedFileType or rawFileType) specified in the AVCapturePhotoSettings (e.g. JFIF, HEIF, DNG), and allows you to strip or replace various pieces of metadata in the process.
2551        ///
2552        ///
2553        /// Parameter `customizer`: An object conforming to the AVCapturePhotoFileDataRepresentationCustomizer protocol that will be called synchronously to provide customization of metadata written to the container format. An NSInvalidArgumentException is thrown if you pass nil.
2554        ///
2555        /// Returns: An NSData containing bits in the file container's format, or nil if the flattening process fails.
2556        #[unsafe(method(fileDataRepresentationWithCustomizer:))]
2557        #[unsafe(method_family = none)]
2558        pub unsafe fn fileDataRepresentationWithCustomizer(
2559            &self,
2560            customizer: &ProtocolObject<dyn AVCapturePhotoFileDataRepresentationCustomizer>,
2561        ) -> Option<Retained<NSData>>;
2562
2563        #[cfg(all(feature = "AVDepthData", feature = "objc2-core-video"))]
2564        /// Flattens the AVCapturePhoto to an NSData using the file container format (processedFileType or rawFileType) specified in the AVCapturePhotoSettings (e.g. JFIF, HEIF, DNG), and allows you to replace metadata, thumbnail, and depth data in the process.
2565        ///
2566        ///
2567        /// Parameter `replacementMetadata`: A dictionary of keys and values from
2568        /// <ImageIO
2569        /// /CGImageProperties.h>. To preserve existing metadata to the file, pass self.metadata. To strip existing metadata, pass nil. To replace metadata, pass a replacement dictionary.
2570        ///
2571        /// Parameter `replacementEmbeddedThumbnailPhotoFormat`: A dictionary of keys and values from
2572        /// <AVFoundation
2573        /// /AVVideoSettings.h>. If you pass a non-nil dictionary, AVVideoCodecKey is required, with AVVideoWidthKey and AVVideoHeightKey being optional. To preserve the existing embedded thumbnail photo to the file, pass self.embeddedThumbnailPhotoFormat and pass nil as your replacementEmbeddedThumbnailPixelBuffer parameter. To strip the existing embedded thumbnail, pass nil for both replacementEmbeddedThumbnailPhotoFormat and replacementEmbeddedThumbnailPixelBuffer. To replace the existing embedded thumbnail photo, pass both a non-nil replacementThumbnailPixelBuffer and replacementEmbeddedThumbnailPhotoFormat dictionary.
2574        ///
2575        /// Parameter `replacementEmbeddedThumbnailPixelBuffer`: A pixel buffer containing a source image to be encoded to the file as the replacement thumbnail image. To preserve the existing embedded thumbnail photo to the file, pass self.embeddedThumbnailPhotoFormat as your replacementEmbeddedThumbnailPhotoFormat parameter and nil as your replacementEmbeddedThumbnailPixelBuffer parameter. To strip the existing embedded thumbnail, pass nil for both replacementEmbeddedThumbnailPhotoFormat and replacementEmbeddedThumbnailPixelBuffer. To replace the existing embedded thumbnail photo, pass both a non-nil replacementThumbnailPixelBuffer and replacementEmbeddedThumbnailPhotoFormat dictionary.
2576        ///
2577        /// Parameter `replacementDepthData`: Replacement depth data to be written to the flattened file container. To preserve existing depth data to the file, pass self.depthData. To strip it, pass nil. To replace it, pass a new AVDepthData instance.
2578        ///
2579        /// Returns: An NSData containing bits in the file container's format, or nil if the flattening process fails.
2580        #[deprecated]
2581        #[unsafe(method(fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData:))]
2582        #[unsafe(method_family = none)]
2583        pub unsafe fn fileDataRepresentationWithReplacementMetadata_replacementEmbeddedThumbnailPhotoFormat_replacementEmbeddedThumbnailPixelBuffer_replacementDepthData(
2584            &self,
2585            replacement_metadata: Option<&NSDictionary<NSString, AnyObject>>,
2586            replacement_embedded_thumbnail_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
2587            replacement_embedded_thumbnail_pixel_buffer: Option<&CVPixelBuffer>,
2588            replacement_depth_data: Option<&AVDepthData>,
2589        ) -> Option<Retained<NSData>>;
2590
2591        #[cfg(feature = "objc2-core-graphics")]
2592        /// Utility method that converts the AVCapturePhoto's primary photo to a CGImage.
2593        ///
2594        ///
2595        /// Returns: A CGImageRef, or nil if the conversion process fails.
2596        ///
2597        ///
2598        /// Each time you access this method, AVCapturePhoto generates a new CGImageRef. When backed by a compressed container (such as HEIC), the CGImageRepresentation is decoded lazily as needed. When backed by an uncompressed format such as BGRA, it is copied into a separate backing buffer whose lifetime is not tied to that of the AVCapturePhoto. For a 12 megapixel image, a BGRA CGImage represents ~48 megabytes per call. If you only intend to use the CGImage for on-screen rendering, use the previewCGImageRepresentation instead. Note that the physical rotation of the CGImageRef matches that of the main image. Exif orientation has not been applied. If you wish to apply rotation when working with UIImage, you can do so by querying the photo's metadata[kCGImagePropertyOrientation] value, and passing it as the orientation parameter to +[UIImage imageWithCGImage:scale:orientation:]. RAW images always return a CGImageRepresentation of nil. If you wish to make a CGImageRef from a RAW image, use CIRAWFilter in the CoreImage framework.
2599        #[unsafe(method(CGImageRepresentation))]
2600        #[unsafe(method_family = none)]
2601        pub unsafe fn CGImageRepresentation(&self) -> Option<Retained<CGImage>>;
2602
2603        #[cfg(feature = "objc2-core-graphics")]
2604        /// Utility method that converts the AVCapturePhoto's preview photo to a CGImage.
2605        ///
2606        ///
2607        /// Returns: A CGImageRef, or nil if the conversion process fails, or if you did not request a preview photo.
2608        ///
2609        ///
2610        /// Each time you access this method, AVCapturePhoto generates a new CGImageRef. This CGImageRepresentation is a RGB rendering of the previewPixelBuffer property. If you did not request a preview photo by setting the -[AVCapturePhotoSettings previewPhotoFormat] property, this method returns nil. Note that the physical rotation of the CGImageRef matches that of the main image. Exif orientation has not been applied. If you wish to apply rotation when working with UIImage, you can do so by querying the photo's metadata[kCGImagePropertyOrientation] value, and passing it as the orientation parameter to +[UIImage imageWithCGImage:scale:orientation:].
2611        #[unsafe(method(previewCGImageRepresentation))]
2612        #[unsafe(method_family = none)]
2613        pub unsafe fn previewCGImageRepresentation(&self) -> Option<Retained<CGImage>>;
2614    );
2615}
2616
2617/// Constants indicating the status of the lens stabilization module (aka OIS).
2618///
2619///
2620/// Indicates that lens stabilization is unsupported.
2621///
2622/// Indicates that lens stabilization was not in use for this capture.
2623///
2624/// Indicates that the lens stabilization module was active for the duration of the capture.
2625///
2626/// Indicates that device motion or capture duration exceeded the stabilization module's correction limits.
2627///
2628/// Indicates that the lens stabilization module was unavailable for use at the time of capture. The module may be available in subsequent captures.
2629///
2630/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturelensstabilizationstatus?language=objc)
2631// NS_ENUM
2632#[repr(transparent)]
2633#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2634pub struct AVCaptureLensStabilizationStatus(pub NSInteger);
2635impl AVCaptureLensStabilizationStatus {
2636    #[doc(alias = "AVCaptureLensStabilizationStatusUnsupported")]
2637    pub const Unsupported: Self = Self(0);
2638    #[doc(alias = "AVCaptureLensStabilizationStatusOff")]
2639    pub const Off: Self = Self(1);
2640    #[doc(alias = "AVCaptureLensStabilizationStatusActive")]
2641    pub const Active: Self = Self(2);
2642    #[doc(alias = "AVCaptureLensStabilizationStatusOutOfRange")]
2643    pub const OutOfRange: Self = Self(3);
2644    #[doc(alias = "AVCaptureLensStabilizationStatusUnavailable")]
2645    pub const Unavailable: Self = Self(4);
2646}
2647
2648unsafe impl Encode for AVCaptureLensStabilizationStatus {
2649    const ENCODING: Encoding = NSInteger::ENCODING;
2650}
2651
2652unsafe impl RefEncode for AVCaptureLensStabilizationStatus {
2653    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2654}
2655
2656/// AVCapturePhotoBracketedCapture.
2657impl AVCapturePhoto {
2658    extern_methods!(
2659        #[cfg(feature = "AVCaptureStillImageOutput")]
2660        /// The AVCaptureBracketedStillImageSettings associated with this photo.
2661        ///
2662        ///
2663        /// When specifying a bracketed capture using AVCapturePhotoBracketSettings, you specify an array of AVCaptureBracketedStillImageSettings -- one per image in the bracket. This property indicates the AVCaptureBracketedStillImageSettings associated with this particular photo, or nil if this photo is not part of a bracketed capture.
2664        #[unsafe(method(bracketSettings))]
2665        #[unsafe(method_family = none)]
2666        pub unsafe fn bracketSettings(
2667            &self,
2668        ) -> Option<Retained<AVCaptureBracketedStillImageSettings>>;
2669
2670        /// 1-based sequence count of the photo.
2671        ///
2672        ///
2673        /// If this photo is part of a bracketed capture (invoked using AVCapturePhotoBracketSettings), this property indicates the current result's count in the sequence, starting with 1 for the first result, or 0 if this photo is not part of a bracketed capture.
2674        #[unsafe(method(sequenceCount))]
2675        #[unsafe(method_family = none)]
2676        pub unsafe fn sequenceCount(&self) -> NSInteger;
2677
2678        /// The status of the lens stabilization module during capture of this photo.
2679        ///
2680        ///
2681        /// In configurations where lens stabilization (OIS) is unsupported, AVCaptureLensStabilizationStatusUnsupported is returned. If lens stabilization is supported, but this photo is not part of a bracketed capture in which -[AVCapturePhotoBracketSettings setLensStabilizationEnabled:YES] was called, AVCaptureLensStabilizationStatusOff is returned. Otherwise a lens stabilization status is returned indicating how lens stabilization was applied during the capture.
2682        #[unsafe(method(lensStabilizationStatus))]
2683        #[unsafe(method_family = none)]
2684        pub unsafe fn lensStabilizationStatus(&self) -> AVCaptureLensStabilizationStatus;
2685    );
2686}
2687
2688extern_class!(
2689    /// A lightly-processed photo whose data may be used to process and fetch a higher-resolution asset at a later time.
2690    ///
2691    ///
2692    /// An AVCaptureDeferredPhotoProxy behaves like a normal AVCapturePhoto, and approximates the look of the final rendered image.  This object represents intermediate data that can be rendered into a final image and ingested into the user's photo library via PHAsset APIs.  The intermediate data are not accessible by the calling process.
2693    ///
2694    /// Use a PHAssetCreationRequest with a resourceType of PHAssetResourceTypePhotoProxy using the fileDataRepresentation of this object.  Image processing to finalize the asset will occur either on-demand when accessing the image data via PHImageManager or PHAssetResource, or will execute in the background when the system has determined that it's a good time to process based on thermals, battery level, and other conditions.  If the data provided to the PHAssetCreationRequest does not come from an AVCaptureDeferredPhotoProxy, then PHAssetCreationRequest will fail and a PHPhotosErrorInvalidResource error will be returned.
2695    ///
2696    /// Below is a discussion of how the superclass properties behave on an AVCaptureDeferredPhotoProxy.
2697    ///
2698    /// The time of the capture; proxy and final photos will have the same timestamp.
2699    ///
2700    ///
2701    /// The metadata of the proxy image may differ slightly from the final photo's metadata where some fields may be updated.
2702    ///
2703    ///
2704    /// Always NO, as deferred processing isn't available for raw photos.
2705    ///
2706    ///
2707    /// Describes the embedded thumbnail format of both the proxy and the final photo which have the same dimensions and codec.
2708    ///
2709    ///
2710    /// Describes the resolved settings of the whole capture, including the proxy and final photo. See AVCaptureResolvedPhotoSettings.deferredPhotoProxyDimensions.
2711    ///
2712    ///
2713    /// Same for both proxy and final.
2714    ///
2715    ///
2716    /// Same for both proxy and final.
2717    ///
2718    ///
2719    /// Same for both proxy and final.
2720    ///
2721    ///
2722    /// Same for both proxy and final.
2723    ///
2724    ///
2725    /// Same for both proxy and final.
2726    ///
2727    /// Superclass properties/methods that behave differently than a typical AVCapturePhoto:
2728    ///
2729    ///
2730    /// - (nullable CGImageRef)CGImageRepresentation;
2731    /// - (nullable CGImageRef)previewCGImageRepresentation;
2732    /// All of the above properties return the same proxy image, either as a pixel buffer or CGImageRef.
2733    ///
2734    /// - (nullable NSData *)fileDataRepresentation;
2735    /// - (nullable NSData *)fileDataRepresentationWithCustomizer:(id
2736    /// <AVCapturePhotoFileDataRepresentationCustomizer
2737    /// >)customizer;
2738    /// You may call either of the above two methods to create a NSData representation of the image, but note that it is only the proxy image quality being packaged.
2739    ///
2740    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturedeferredphotoproxy?language=objc)
2741    #[unsafe(super(AVCapturePhoto, NSObject))]
2742    #[derive(Debug, PartialEq, Eq, Hash)]
2743    pub struct AVCaptureDeferredPhotoProxy;
2744);
2745
2746unsafe impl NSObjectProtocol for AVCaptureDeferredPhotoProxy {}
2747
2748impl AVCaptureDeferredPhotoProxy {
2749    extern_methods!(
2750        #[unsafe(method(init))]
2751        #[unsafe(method_family = init)]
2752        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2753
2754        #[unsafe(method(new))]
2755        #[unsafe(method_family = new)]
2756        pub unsafe fn new() -> Retained<Self>;
2757    );
2758}
2759
2760extern_protocol!(
2761    /// A set of delegate callbacks to be implemented by a client who calls AVCapturePhoto's -fileDataRepresentationWithCustomizer:.
2762    ///
2763    ///
2764    /// AVCapturePhoto is a wrapper representing a file-containerized photo in memory. If you simply wish to flatten the photo to an NSData to be written to a file, you may call -[AVCapturePhoto fileDataRepresentation]. For more complex flattening operations in which you wish to replace or strip metadata, you should call -[AVCapturePhoto fileDataRepresentationWithCustomizer:] instead, providing a delegate for customized stripping / replacing behavior. This delegate's methods are called synchronously before the flattening process commences.
2765    ///
2766    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotofiledatarepresentationcustomizer?language=objc)
2767    pub unsafe trait AVCapturePhotoFileDataRepresentationCustomizer:
2768        NSObjectProtocol
2769    {
2770        /// A callback in which you may provide replacement metadata, or direct the AVCapturePhoto to strip existing metadata from the flattened file data representation.
2771        ///
2772        ///
2773        /// Parameter `photo`: The calling instance of AVCapturePhoto.
2774        ///
2775        /// Returns: A dictionary of keys and values from
2776        /// <ImageIO
2777        /// /CGImageProperties.h>. To preserve existing metadata, return photo.metadata. To strip existing metadata, return nil. To replace metadata, pass a replacement dictionary.
2778        ///
2779        ///
2780        /// This callback is optional. If your delegate does not implement this callback, the existing metadata in the in-memory AVCapturePhoto container will be written to the file data representation.
2781        #[optional]
2782        #[unsafe(method(replacementMetadataForPhoto:))]
2783        #[unsafe(method_family = none)]
2784        unsafe fn replacementMetadataForPhoto(
2785            &self,
2786            photo: &AVCapturePhoto,
2787        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
2788
2789        #[cfg(feature = "objc2-core-video")]
2790        /// A callback in which you may provide a replacement embedded thumbnail image with compression settings, or strip the existing embedded thumbnail image from the flattened file data representation.
2791        ///
2792        ///
2793        /// Parameter `replacementEmbeddedThumbnailPhotoFormatOut`: On output, a pointer to a dictionary of keys and values from
2794        /// <AVFoundation
2795        /// /AVVideoSettings.h> If you pass a non-nil dictionary, AVVideoCodecKey is required, with AVVideoWidthKey and AVVideoHeightKey being optional. To preserve the existing embedded thumbnail photo to the flattened data, set *replacementEmbeddedThumbnailPhotoFormatOut to photo.embeddedThumbnailPhotoFormat and return nil. To strip the existing embedded thumbnail, set *replacementEmbeddedThumbnailPhotoFormatOut to nil and return nil. To replace the existing embedded thumbnail photo, pass a replacement photo format dictionary and return a non-nil replacement pixel buffer.
2796        ///
2797        /// Parameter `photo`: The calling instance of AVCapturePhoto.
2798        ///
2799        /// Returns: A pixel buffer containing a source image to be encoded to the file as the replacement thumbnail image. To preserve the existing embedded thumbnail photo to the flattened data, set *replacementEmbeddedThumbnailPhotoFormatOut to photo.embeddedThumbnailPhotoFormat and return nil. To strip the existing embedded thumbnail, set *replacementEmbeddedThumbnailPhotoFormatOut to nil and return nil. To replace the existing embedded thumbnail photo, pass a replacement photo format dictionary and return a non-nil replacement pixel buffer.
2800        ///
2801        ///
2802        /// This callback is optional. If your delegate does not implement this callback, the existing embedded thumbnail photo in the in-memory AVCapturePhoto container will be written to the file data representation.
2803        #[optional]
2804        #[unsafe(method(replacementEmbeddedThumbnailPixelBufferWithPhotoFormat:forPhoto:))]
2805        #[unsafe(method_family = none)]
2806        unsafe fn replacementEmbeddedThumbnailPixelBufferWithPhotoFormat_forPhoto(
2807            &self,
2808            replacement_embedded_thumbnail_photo_format_out: &mut Option<
2809                Retained<NSDictionary<NSString, AnyObject>>,
2810            >,
2811            photo: &AVCapturePhoto,
2812        ) -> Option<Retained<CVPixelBuffer>>;
2813
2814        #[cfg(feature = "AVDepthData")]
2815        /// A callback in which you may provide replacement depth data, or strip the existing depth data from the flattened file data representation.
2816        ///
2817        ///
2818        /// Parameter `photo`: The calling instance of AVCapturePhoto.
2819        ///
2820        /// Returns: An instance of AVDepthData. To preserve the existing depth data, return photo.depthData. To strip the existing one, return nil. To replace, provide a replacement AVDepthData instance.
2821        ///
2822        ///
2823        /// This callback is optional. If your delegate does not implement this callback, the existing depth data in the in-memory AVCapturePhoto container will be written to the file data representation.
2824        #[optional]
2825        #[unsafe(method(replacementDepthDataForPhoto:))]
2826        #[unsafe(method_family = none)]
2827        unsafe fn replacementDepthDataForPhoto(
2828            &self,
2829            photo: &AVCapturePhoto,
2830        ) -> Option<Retained<AVDepthData>>;
2831
2832        #[cfg(feature = "AVPortraitEffectsMatte")]
2833        /// A callback in which you may provide a replacement portrait effects matte, or strip the existing portrait effects matte from the flattened file data representation.
2834        ///
2835        ///
2836        /// Parameter `photo`: The calling instance of AVCapturePhoto.
2837        ///
2838        /// Returns: An instance of AVPortraitEffectsMatte. To preserve the existing portrait effects matte, return photo.portraitEffectsMatte. To strip the existing one, return nil. To replace, provide a replacement AVPortraitEffectsMatte instance.
2839        ///
2840        ///
2841        /// This callback is optional. If your delegate does not implement this callback, the existing portrait effects matte in the in-memory AVCapturePhoto container will be written to the file data representation.
2842        #[optional]
2843        #[unsafe(method(replacementPortraitEffectsMatteForPhoto:))]
2844        #[unsafe(method_family = none)]
2845        unsafe fn replacementPortraitEffectsMatteForPhoto(
2846            &self,
2847            photo: &AVCapturePhoto,
2848        ) -> Option<Retained<AVPortraitEffectsMatte>>;
2849
2850        #[cfg(feature = "AVSemanticSegmentationMatte")]
2851        /// A callback in which you may provide a replacement semantic segmentation matte of the indicated type, or strip the existing one from the flattened file data representation.
2852        ///
2853        ///
2854        /// Parameter `semanticSegmentationMatteType`: The type of semantic segmentation matte to be replaced or stripped.
2855        ///
2856        /// Parameter `photo`: The calling instance of AVCapturePhoto.
2857        ///
2858        /// Returns: An instance of AVSemanticSegmentationMatte. To preserve the existing matte, return [photo semanticSegmentationMatteForType:semanticSegmentationMatteType]. To strip the existing one, return nil. To replace, provide a replacement AVPortraitEffectsMatte instance.
2859        ///
2860        ///
2861        /// This callback is optional. If your delegate does not implement this callback, the existing semantic segmentation matte of the specified type in the in-memory AVCapturePhoto container will be written to the file data representation.
2862        #[optional]
2863        #[unsafe(method(replacementSemanticSegmentationMatteOfType:forPhoto:))]
2864        #[unsafe(method_family = none)]
2865        unsafe fn replacementSemanticSegmentationMatteOfType_forPhoto(
2866            &self,
2867            semantic_segmentation_matte_type: &AVSemanticSegmentationMatteType,
2868            photo: &AVCapturePhoto,
2869        ) -> Option<Retained<AVSemanticSegmentationMatte>>;
2870
2871        /// A callback in which you may provide replacement compression settings for the DNG flattened file data representation of Apple ProRAW. This callback will only be invoked for Apple ProRAW captures written to DNG.
2872        ///
2873        ///
2874        /// Parameter `photo`: The calling instance of AVCapturePhoto.
2875        ///
2876        /// Parameter `defaultSettings`: The default settings that will be used if not overridden.
2877        ///
2878        /// Parameter `maximumBitDepth`: The maximum bit depth that can be specified with AVVideoAppleProRAWBitDepthKey in the returned settings dictionary.
2879        ///
2880        /// Returns: An NSDictionary containing compression settings to be used when writing the DNG file representation. Currently accepted keys are:
2881        /// AVVideoQualityKey (NSNumber in range 0 to 1.0, inclusive)
2882        /// AVVideoAppleProRAWBitDepthKey (NSNumber in range 8 to maximumBitDepth, inclusive)
2883        /// Setting AVVideoQualityKey to 1.0 will use lossless compression. Any value between 0 and 1.0 will use lossy compression with that quality.
2884        /// Setting AVVideoAppleProRAWBitDepthKey to a value less than what is given in defaultSettings may result in quantization losses.
2885        /// Any keys not specified in the returned dictionary will use the values from defaultSettings. Return defaultSettings if no changes to the compression settings are desired.
2886        ///
2887        ///
2888        /// This callback is optional. If your delegate does not implement this callback, the default compression settings for the file type will be used.
2889        #[optional]
2890        #[unsafe(method(replacementAppleProRAWCompressionSettingsForPhoto:defaultSettings:maximumBitDepth:))]
2891        #[unsafe(method_family = none)]
2892        unsafe fn replacementAppleProRAWCompressionSettingsForPhoto_defaultSettings_maximumBitDepth(
2893            &self,
2894            photo: &AVCapturePhoto,
2895            default_settings: &NSDictionary<NSString, AnyObject>,
2896            maximum_bit_depth: NSInteger,
2897        ) -> Retained<NSDictionary<NSString, AnyObject>>;
2898    }
2899);