Class

AVCaptureConnection

A connection between a specific pair of capture input and capture output objects in a capture session.

Declaration

@interface AVCaptureConnection : NSObject

Overview

Capture inputs have one or more input ports (instances of AVCaptureInputPort). Capture outputs can accept data from one or more sources (for example, an AVCaptureMovieFileOutput object accepts both video and audio data).

You can add an AVCaptureConnection instance to a session using the addConnection: method only if the canAddConnection: method returns YES. When using the addInput: or addOutput: method, the session forms connections automatically between all compatible inputs and outputs. You only need to add connections manually when adding an input or output with no connections. You can also use connections to enable or disable the flow of data from a given input or to a given output.

Topics

Creating a Connection

+ connectionWithInputPorts:output:

Returns a capture connection describing a connection between the specified input ports and the specified output.

- initWithInputPorts:output:

Initializes a capture connection to describe a connection between the specified input ports and the specified output.

+ connectionWithInputPort:videoPreviewLayer:

Returns a capture connection describing a connection between the specified input port and the specified video preview layer.

- initWithInputPort:videoPreviewLayer:

Initializes a capture connection to describe a connection between the specified input port and the specified video preview layer.

Configuration

enabled

Indicates whether the connection is enabled.

active

Indicates whether the connection is active.

inputPorts

The connection’s input ports.

output

The connection’s output port.

videoPreviewLayer

The video preview layer associated with the connection.

Managing Video Configuration

videoOrientation

Indicates whether to rotate the video flowing through the connection to a given orientation.

supportsVideoOrientation

A Boolean value that indicates whether the connection supports changing the orientation of the video.

AVCaptureVideoOrientation

Constants indicating video orientation.

videoFieldMode

An indicator of how interlaced video flowing through the connection should be treated

supportsVideoFieldMode

A Boolean value that indicates whether the connection supports setting the videoFieldMode property.

videoMinFrameDuration

The minimum time interval between which the receiver should output consecutive video frames.

supportsVideoMinFrameDuration

A Boolean value that indicates whether the connection supports setting the videoMinFrameDuration property.

videoMaxFrameDuration

The maximum time interval between which the receiver should output consecutive video frames.

supportsVideoMaxFrameDuration

A Boolean value that indicates whether the connection supports setting the videoMaxFrameDuration property.

videoScaleAndCropFactor

The current video scale and crop factor in use by the receiver.

videoMaxScaleAndCropFactor

The maximum video scale and crop factor by the connection.

Managing the Video Mirroring Settings

automaticallyAdjustsVideoMirroring

A Boolean value that indicates whether the value of videoMirrored can change based on configuration of the session.

supportsVideoMirroring

A Boolean value that indicates whether the connection supports video mirroring.

videoMirrored

A Boolean value that indicates whether the video flowing through the connection should be mirrored about its vertical axis.

Managing the Video Stabilization Settings

supportsVideoStabilization

A Boolean value that indicates whether this connection supports video stabilization.

activeVideoStabilizationMode

The stabilization mode currently active for the connection.

preferredVideoStabilizationMode

The stabilization mode most appropriate for use with the connection.

videoStabilizationEnabled

A Boolean value that indicates whether video stabilization is active for the connection.

Deprecated
enablesVideoStabilizationWhenAvailable

A Boolean value that indicates whether the system should enable video stabilization when it is available.

Deprecated

Managing Camera Calibration Delivery Settings

cameraIntrinsicMatrixDeliverySupported

A Boolean value indicating whether the capture connection currently supports delivery of camera intrinsics information.

cameraIntrinsicMatrixDeliveryEnabled

A Boolean value that specifies whether to configure the capture pipeline for delivery of camera intrinsics information.

Constants

AVCaptureVideoOrientation

Constants indicating video orientation.

AVVideoFieldMode

Constants indicating video field mode, for use with the videoFieldMode property.

Relationships

Inherits From

See Also

Session Configuration

AVCaptureInput

The abstract superclass for objects that provide input data to a capture session.

AVCaptureOutput

The abstract superclass for objects that output the media recorded in a capture session.

AVCaptureAudioChannel

An object that monitors average and peak power levels for an audio channel in a capture connection.