A connection between a specific pair of capture input and capture output objects in a capture session.
SDKs
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
Framework
- AVFoundation
Declaration
class AVCaptureConnection : NSObject
Overview
Capture inputs have one or more input ports (instances of AVCapture
). Capture outputs can accept data from one or more sources (for example, an AVCapture
object accepts both video and audio data).
You can add an AVCapture
instance to a session using the add
method only if the can
method returns true
. When using the add
or add
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.