Class

AVCaptureDevice.Format

A set of media format and capture settings (such as video resolution and frame rate) that you use to configure a capture device.

Declaration

class Format : NSObject

Overview

An AVCaptureDevice.Format object provides information about a media capture format for use with an AVCaptureDevice instance, such as video frame rates and zoom factors.

You can find more information about a capture format using its associated Core Media format description (see CMFormatDescription), available using the formatDescription property. Instances of this class are immutable.

Topics

Determining Supported Media Formats

var mediaType: AVMediaType

A constant describing the media type of an AVCaptureDevice active or supported format.

var formatDescription: CMFormatDescription

An object describing the capture format.

var isVideoHDRSupported: Bool

A Boolean value that indicates whether the format supports high dynamic range streaming.

var unsupportedCaptureOutputClasses: [AnyClass]

The list of AVCaptureOutput subclasses not allowed for capture with this format, if any.

var highResolutionStillImageDimensions: CMVideoDimensions

The highest resolution still image that can be produced by this format.

Examining Focus and Exposure Attributes

var minExposureDuration: CMTime

A CMTime indicating the minimum supported exposure duration.

var maxExposureDuration: CMTime

A CMTime indicating the maximum supported exposure duration.

var minISO: Float

A floating point number indicating the minimum supported exposure ISO value.

var maxISO: Float

A floating point number indicating the maximum supported exposure ISO value.

enum AVCaptureDevice.Format.AutoFocusSystem

Constants that describe the autofocus system.

Examining Zoom Attributes

var videoFieldOfView: Float

Indicates the format’s horizontal field of view in degrees.

var videoMaxZoomFactor: CGFloat

Indicates the maximum zoom factor allowed for the format.

var videoZoomFactorUpscaleThreshold: CGFloat

Indicates the zoom factor at which pixel data is upscaled.

Examining Video Capture Attributes

var isVideoBinned: Bool

Indicates whether video data is produced in a binned format.

var isMultiCamSupported: Bool

A Boolean value that indicates whether AVCaptureMultiCamSession supports this format.

Beta
var isHighestPhotoQualitySupported: Bool

A Boolean value that indicates whether this format supports the highest photo quality that the platform can deliver.

Beta
class AVFrameRateRange

An AVFrameRateRange object expresses a range of valid frame rates as minimum and maximum rate and minimum and maximum duration.

var videoSupportedFrameRateRanges: [AVFrameRateRange]

Indicates the format’s supported frame rate ranges.

enum AVCaptureVideoStabilizationMode

Constants that describe the modes of video stabilization supported by the device's format.

func isVideoStabilizationModeSupported(AVCaptureVideoStabilizationMode) -> Bool

A Boolean value that indicates whether the format supports a given video stabilization mode.

var isVideoStabilizationSupported: Bool

Indicates whether the device supports video stabilization.

Deprecated

Examining Depth Capture Attributes

var supportedDepthDataFormats: [AVCaptureDevice.Format]

The list of data formats compatible with this video format.

var isPortraitEffectsMatteStillImageDeliverySupported: Bool

A Boolean indicating whether the device supports portrait matte effects in still-image capture.

var videoMinZoomFactorForDepthDataDelivery: CGFloat

The minimum zoom factor supported when the device is configured for depth data delivery.

var videoMaxZoomFactorForDepthDataDelivery: CGFloat

The maximum zoom factor supported when the device is configured for depth data delivery.

var activeDepthDataMinFrameDuration: CMTime

The minimum frame duration of depth data.

enum AVCaptureDevice.LensStabilizationStatus

Constants that indicate the status of optical image stabilization hardware during a bracketed photo capture.

Exploring Supported Color Spaces

var supportedColorSpaces: [AVCaptureColorSpace]

The list of the device’s supported color spaces.

Relationships

Inherits From

Conforms To

See Also

Managing Formats

var formats: [AVCaptureDevice.Format]

The capture formats supported by the device.

var activeFormat: AVCaptureDevice.Format

The currently active media data format of the capture device.

var activeDepthDataFormat: AVCaptureDevice.Format?

The currently active depth data format of the capture device.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software