Instance Method

captureStillImageBracketAsynchronously(from:withSettingsArray:completionHandler:)

Captures a still image bracket.

Declaration

func captureStillImageBracketAsynchronously(from connection: AVCaptureConnection, withSettingsArray settings: [AVCaptureBracketedStillImageSettings], completionHandler handler: @escaping (CMSampleBuffer?, AVCaptureBracketedStillImageSettings?, Error?) -> Void)

Parameters

connection

The connection through which the still image bracket should be captured.

settings

An array of AVCaptureBracketedStillImageSettings objects. All the array items must be of the same AVCaptureBracketedStillImageSettings subclass, or an invalidArgumentException exception is thrown.

handler

A user provided block that will be called asynchronously as each still image in the bracket is captured.

The block has three parameters:

sampleBuffer

If the capture request is successful, contains a valid CMSampleBuffer.

stillImageSettings

Contains the AVCaptureBracketedStillImageSettings object corresponding to this still image.

error

If the bracketed capture fails, sampleBuffer is NULL and error is non-nil.

If the count of the settings parameter exceeds maxBracketedCaptureStillImageCount, then AVErrorMaximumStillImageCaptureRequestsExceeded is returned.

You should not assume that the completion handler will be called on a specific thread.

Discussion

If you have not invoked prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:) for this still image bracket request, the bracket may not be taken immediately, as the receiver may internally need to prepare resources.

See Also

Still Image Bracketed Capture

var maxBracketedCaptureStillImageCount: Int

Specifies the maximum number of still images that may be taken in a single bracket.

Deprecated
var isLensStabilizationDuringBracketedCaptureSupported: Bool

A Boolean value that indicates whether the capture output supports lens stabilization across the duration of a bracketed capture.

Deprecated
var isLensStabilizationDuringBracketedCaptureEnabled: Bool

A Boolean value that specifies whether to stabilize the lens across the duration of a bracketed capture.

Deprecated