Type Method

connectionWithInputPorts:output:

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

Declaration

+ (instancetype)connectionWithInputPorts:(NSArray<AVCaptureInputPort *> *)ports output:(AVCaptureOutput *)output;

Parameters

ports

An array of AVCaptureInputPort objects associated with AVCaptureInput objects.

output

An AVCaptureOutput object.

Return Value

A capture connection describing a connection between inputPorts and the output.

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

- 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.