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


class AVCaptureOutput : NSObject


AVCaptureOutput is an abstract base class describing an output destination of an AVCaptureSession object.

AVCaptureOutput provides an abstract interface for connecting capture output destinations, such as files and video previews, to a capture session (an instance of AVCaptureSession). A capture output can have multiple connections represented by AVCaptureConnection objects, one for each stream of media that it receives from an AVCaptureInput. A capture output does not have any connections when it is first created. When you add an output to a capture session, the capture session creates connects that map media data from that session’s inputs to its outputs.

You can add concrete AVCaptureOutput instances to a capture session using addOutput(_:).


Accessing Connections

var connections: [AVCaptureConnection]

The capture output object’s connections.

func connection(with: AVMediaType) -> AVCaptureConnection?

Returns the first connection in the connections array with an input port of a specified media type.

enum AVCaptureOutput.DataDroppedReason

Information about why capture data was not delivered.

Converting Between Coordinate Systems

func metadataOutputRectConverted(fromOutputRect: CGRect) -> CGRect

Converts a rectangle in the capture output object’s coordinate system to one in the coordinate system used for metadata outputs.

func outputRectConverted(fromMetadataOutputRect: CGRect) -> CGRect

Converts a rectangle in the coordinate system used for metadata outputs to one in the capture output object’s coordinate system.


Inherits From

Conforms To

See Also

Session Configuration

class AVCaptureInput

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

class AVCaptureConnection

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

class AVCaptureAudioChannel

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software