iOS Developer Library

Developer

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

Inheritance


Conforms To


Import Statement


import AVFoundation @import AVFoundation;

Availability


Available in iOS 4.0 and later.
  • Initializes an input to use a specified device.

    Declaration

    Swift

    init!(device device: AVCaptureDevice!, error outError: NSErrorPointer)

    Objective-C

    - (id)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

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • Returns an input initialized to use a specified device.

    Declaration

    Swift

    class func deviceInputWithDevice(_ device: AVCaptureDevice!, error outError: NSErrorPointer) -> AnyObject!

    Objective-C

    + (id)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

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • device device Property

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

    Declaration

    Swift

    var device: AVCaptureDevice! { get }

    Objective-C

    @property(nonatomic, readonly) AVCaptureDevice *device

    Discussion

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.