iOS Developer Library

Developer

AV Foundation Framework Reference AVCaptureInputPort Class Reference

Options
Deployment Target:

On This Page
Language:

AVCaptureInputPort

An AVCaptureInputPort represents a stream of data from a capture input.

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.

  • Indicates whether the port is enabled.

    Declaration

    Swift

    var enabled: Bool

    Objective-C

    @property(nonatomic, getter=isEnabled) BOOL enabled

    Discussion

    The value of this property defaults to YEStrue. If you want to capture only a subset of the media streams provided by an AVCaptureInput object, use this property to selectively disable streams.

    Availability

    Available in iOS 4.0 and later.

  • A description of the port format. (read-only)

    Declaration

    Swift

    var formatDescription: CMFormatDescription! { get }

    Objective-C

    @property(nonatomic, readonly) CMFormatDescriptionRef formatDescription

    Discussion

    The returned object describes the format of the media currently provided by the port. To be notified of format changes, subscribe to the AVCaptureInputPortFormatDescriptionDidChangeNotification notification.

    Availability

    Available in iOS 4.0 and later.

  • The input object that owns the port. (read-only)

    Declaration

    Swift

    var input: AVCaptureInput! { get }

    Objective-C

    @property(nonatomic, readonly) AVCaptureInput *input

    Availability

    Available in iOS 4.0 and later.

  • The port’s media type. (read-only)

    Declaration

    Swift

    var mediaType: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *mediaType

    Availability

    Available in iOS 4.0 and later.

    See Also

    Media Types

  • An object representing the capture device’s own clock. (read-only)

    Declaration

    Swift

    var clock: CMClock! { get }

    Objective-C

    @property(nonatomic, readonly) CMClockRef clock

    Discussion

    The returned CMClock object is read-only and may not reflect the actual clock in the capture device.

    Availability

    Available in iOS 7.0 and later.