iOS Developer Library

Developer

AVFoundation Framework Reference AVCaptureDeviceFormat Class Reference

Options
Deployment Target:

On This Page
Language:

AVCaptureDeviceFormat

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

Inheritance


Conforms To


Import Statement


import AVFoundation @import AVFoundation;

Availability


Available in iOS 7.0 and later.
  • mediaType mediaType Property

    A constant describing the media type of an AVCaptureDevice active or supported format. (read-only)

    Declaration

    Swift

    var mediaType: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *mediaType

    Discussion

    Supported media types are listed in Media Types.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • An object describing the capture format. (read-only)

    Declaration

    Swift

    var formatDescription: CMFormatDescription! { get }

    Objective-C

    @property(nonatomic, readonly) CMFormatDescriptionRef formatDescription

    Discussion

    Calling this method does not assume ownership of the returned CMFormatDescriptionRef.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • Indicates the format’s supported frame rate ranges. (read-only)

    Declaration

    Swift

    var videoSupportedFrameRateRanges: [AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly) NSArray *videoSupportedFrameRateRanges

    Discussion

    The value is an array of AVFrameRateRange objects, one for each of the format’s supported video frame rate ranges.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • Indicates whether video data is produced in a binned format. (read-only)

    Declaration

    Swift

    var videoBinned: Bool { get }

    Objective-C

    @property(nonatomic, readonly, getter=isVideoBinned) BOOL videoBinned

    Discussion

    Binning is a pixel-combining process which can result in greater low light sensitivity at the cost of reduced resolution.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • Indicates the format’s horizontal field of view in degrees. (read-only)

    Declaration

    Swift

    var videoFieldOfView: Float { get }

    Objective-C

    @property(nonatomic, readonly) float videoFieldOfView

    Discussion

    Returns zero if the format’s field of view is unknown.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • Indicates the maximum zoom factor allowed for the format. (read-only)

    Declaration

    Swift

    var videoMaxZoomFactor: CGFloat { get }

    Objective-C

    @property(nonatomic, readonly) CGFloat videoMaxZoomFactor

    Discussion

    A maximum factor of 1.0 indicates that the format is not capable of zooming.

    For more on device zoom controls, see Managing Zoom Settings in AVCaptureDevice Class Reference.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • Indicates whether the device supports video stabilization. (read-only)

    Declaration

    Swift

    var videoStabilizationSupported: Bool { get }

    Objective-C

    @property(nonatomic, readonly, getter=isVideoStabilizationSupported) BOOL videoStabilizationSupported

    Discussion

    If video stabilization is supported, you can enable it on an AVCaptureConnection instance.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

    Deprecated in iOS 8.0.

  • Indicates the zoom factor at which pixel data is upscaled. (read-only)

    Declaration

    Swift

    var videoZoomFactorUpscaleThreshold: CGFloat { get }

    Objective-C

    @property(nonatomic, readonly) CGFloat videoZoomFactorUpscaleThreshold

    Discussion

    The device achieves a zoom effect by cropping around the center of the image captured by the sensor. At low zoom factors, the cropped images is equal to or larger than the output size. At higher zoom factors, the device must scale the cropped image up to the output size, resulting in a loss of image quality. This property indicates the factors at which upscaling will occur.

    For more on device zoom controls, see Managing Zoom Settings in AVCaptureDevice Class Reference.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • A Boolean value that indicates whether the format supports high dynamic range streaming. (read-only)

    Declaration

    Swift

    var videoHDRSupported: Bool { get }

    Objective-C

    @property(nonatomic, readonly, getter=isVideoHDRSupported) BOOL videoHDRSupported

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

    See Also

    videoHDREnabled (AVCaptureDevice)

  • The highest resolution still image that can be produced by this format. (read-only)

    Declaration

    Swift

    var highResolutionStillImageDimensions: CMVideoDimensions { get }

    Objective-C

    @property(nonatomic, readonly) CMVideoDimensions highResolutionStillImageDimensions

    Discussion

    Normally, the AVCaptureStillImageOutput class emits images with the same dimensions as the source AVCaptureDevice instance’s activeFormat. However, if you set highResolutionStillImageOutputEnabled to YEStrue, AVCaptureStillImageOutput emits still images with its source AVCaptureDevice instance’s activeFormat.highResolutionStillImageDimensions dimensions.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

  • A CMTime indicating the maximum supported exposure duration. (read-only)

    Declaration

    Swift

    var maxExposureDuration: CMTime { get }

    Objective-C

    @property(nonatomic, readonly) CMTime maxExposureDuration

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

  • maxISO maxISO Property

    A floating point number indicating the maximum supported exposure ISO value. (read-only)

    Declaration

    Swift

    var maxISO: Float { get }

    Objective-C

    @property(nonatomic, readonly) float maxISO

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

    See Also

    minISO

  • A CMTime indicating the minimum supported exposure duration. (read-only)

    Declaration

    Swift

    var minExposureDuration: CMTime { get }

    Objective-C

    @property(nonatomic, readonly) CMTime minExposureDuration

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

  • minISO minISO Property

    A floating point number indicating the minimum supported exposure ISO value. (read-only)

    Declaration

    Swift

    var minISO: Float { get }

    Objective-C

    @property(nonatomic, readonly) float minISO

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

    See Also

    maxISO

  • Returns the autofocus system. (read-only)

    Declaration

    Swift

    var autoFocusSystem: AVCaptureAutoFocusSystem { get }

    Objective-C

    @property(nonatomic, readonly) AVCaptureAutoFocusSystem autoFocusSystem

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

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

    Declaration

    Swift

    func isVideoStabilizationModeSupported(_ videoStabilizationMode: AVCaptureVideoStabilizationMode) -> Bool

    Objective-C

    - (BOOL)isVideoStabilizationModeSupported:(AVCaptureVideoStabilizationMode)videoStabilizationMode

    Parameters

    videoStabilizationMode

    The AVCaptureVideoStabilizationMode to be tested.

    Return Value

    YEStrue if video stabilization is supported; otherwise, NOfalse.

    Discussion

    The return value indicates if the format can be stabilized using the mode specified by the AVCaptureConnection class’s setPreferredVideoStabilizationMode:.].

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

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

    Declaration

    Swift

    enum AVCaptureVideoStabilizationMode : Int { case Off case Standard case Cinematic case Auto }

    Objective-C

    enum { AVCaptureVideoStabilizationModeOff = 0, AVCaptureVideoStabilizationModeStandard = 1, AVCaptureVideoStabilizationModeCinematic = 2, AVCaptureVideoStabilizationModeAuto = -1, }; typedef NSInteger AVCaptureVideoStabilizationMode;

    Constants

    • Off

      AVCaptureVideoStabilizationModeOff

      Video should not be stabilized.

      Available in iOS 8.0 and later.

    • Standard

      AVCaptureVideoStabilizationModeStandard

      Video should be stabilized using the standard video stabilization algorithm introduced in iOS 5.0.

      Standard video stabilization has a reduced field of view. Enabling video stabilization may introduce additional latency into the video capture pipeline.

      Available in iOS 8.0 and later.

    • Cinematic

      AVCaptureVideoStabilizationModeCinematic

      Video should be stabilized using the cinematic stabilization algorithm for more dramatic results.

      Cinematic video stabilization has a reduced field of view compared to standard video stabilization. Enabling cinematic video stabilization introduces much more latency into the video capture pipeline than standard video stabilization and consumes significantly more system memory. Use narrow or identical min and max frame durations in conjunction with this mode.

      Available in iOS 8.0 and later.

    • Auto

      AVCaptureVideoStabilizationModeAuto

      The most appropriate video stabilization mode for the device and format should be chosen.

      Available in iOS 8.0 and later.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.

  • Constants that describe the autofocus system.

    Declaration

    Swift

    enum AVCaptureAutoFocusSystem : Int { case None case ContrastDetection case PhaseDetection }

    Objective-C

    enum { AVCaptureAutoFocusSystemNone = 0, AVCaptureAutoFocusSystemContrastDetection = 1, AVCaptureAutoFocusSystemPhaseDetection = 2, }; typedef NSInteger AVCaptureAutoFocusSystem;

    Constants

    • None

      AVCaptureAutoFocusSystemNone

      Autofocus is not available.

      Available in iOS 8.0 and later.

    • ContrastDetection

      AVCaptureAutoFocusSystemContrastDetection

      Autofocus is achieved by contrast detection. Contrast detection performs a focus scan to find the optimal position.

      Available in iOS 8.0 and later.

    • PhaseDetection

      AVCaptureAutoFocusSystemPhaseDetection

      Autofocus is achieved by phase detection. Phase detection has the ability to achieve focus in many cases without a focus scan. Phase detection autofocus is typically less visually intrusive than contrast detection autofocus.

      Available in iOS 8.0 and later.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 8.0 and later.