AVCaptureDeviceInput Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 4.0 and later.
Declared in
AVCaptureInput.h
Related sample code

Overview

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

Tasks

Creating an Input

Accessing the Device

Properties

device

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

@property(nonatomic, readonly) AVCaptureDevice *device
Discussion

Availability
  • Available in iOS 4.0 and later.
Declared In
AVCaptureInput.h

Class Methods

deviceInputWithDevice:error:

Returns an input initialized to use a specified device.

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

Availability
  • Available in iOS 4.0 and later.
Declared In
AVCaptureInput.h

Instance Methods

initWithDevice:error:

Initializes an input to use a specified device.

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

Availability
  • Available in iOS 4.0 and later.
Related Sample Code
Declared In
AVCaptureInput.h