Type Method

connectionWithInputPort:videoPreviewLayer:

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

Declaration

+ (instancetype)connectionWithInputPort:(AVCaptureInputPort *)port videoPreviewLayer:(AVCaptureVideoPreviewLayer *)layer;

Parameters

port

An AVCaptureInputPort object associated with an AVCaptureInput object.

layer

Return Value

A capture connection describing a connection between the port and layer.

Discussion

You can add the connection returned by this method to an AVCaptureSession instance using the addConnection: method.

When using addInput:: or addOutput:, connections are automatically formed between all compatible inputs and outputs. You do not need to manually create and add connections to the session unless you use the primitive addInputWithNoConnections: and addOutputWithNoConnections: methods.

See Also

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.

- initWithInputPort:videoPreviewLayer:

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