A specific stream of data provided by a capture input.


class Port : NSObject


Instances of AVCaptureInput have one or more input ports, one for each data stream they can produce. For example, an AVCaptureDeviceInput object presenting one video data stream has one port.


Inspecting an Input Port

var isEnabled: Bool

Indicates whether the port is enabled.

var input: AVCaptureInput

The input object that owns the port.

var mediaType: AVMediaType

The port’s media type.

var formatDescription: CMFormatDescription?

A description of the port format.

var clock: CMClock?

An object representing the capture device’s own clock.

var sourceDeviceType: AVCaptureDevice.DeviceType?

The device type of the source camera providing the photo.

var sourceDevicePosition: AVCaptureDevice.Position

The position of the source device providing input through this port.


static let AVCaptureInputPortFormatDescriptionDidChange: NSNotification.Name

Posted if the value of the capture input port’sformatDescription property changes.


Inherits From

Conforms To

See Also

Accessing Ports

var ports: [AVCaptureInput.Port]

The capture input’s ports.