Mac Developer Library

Developer

AV Foundation Framework Reference AVCaptureDeviceInput Class Reference

Options
Deployment Target:

On This Page
Language:

AVCaptureDeviceInput

AVCaptureDeviceInput is a concrete sub-class of AVCaptureInput you use to capture data from an AVCaptureDevice object.

  • Initializes an input to use a specified device.

    Declaration

    Swift

    init(device device: AVCaptureDevice!) throws

    Objective-C

    - (instancetype)initWithDevice:(AVCaptureDevice *)device error:(NSError **)outError

    Parameters

    device

    The device from which to capture input.

    outError

    If an error occurs during initialization, upon return contains an NSError object describing the problem.

    Return Value

    An input initialized to use device.

    Discussion

    Availability

    Available in OS X v10.7 and later.

  • Returns an input initialized to use a specified device.

    Declaration

    Objective-C

    + (instancetype)deviceInputWithDevice:(AVCaptureDevice *)device error:(NSError **)outError

    Parameters

    device

    The device from which to capture input.

    outError

    If an error occurs during initialization, upon return contains an NSError object describing the problem.

    Return Value

    An input initialized to use device.

    Discussion

    Availability

    Available in OS X v10.7 and later.

  • The device with which the input is associated. (read-only)

    Declaration

    Swift

    var device: AVCaptureDevice! { get }

    Objective-C

    @property(nonatomic, readonly) AVCaptureDevice *device

    Discussion

    Availability

    Available in OS X v10.7 and later.