AVCaptureOutput Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 4.0 and later. |
| Companion guide | |
| Declared in | AVCaptureOutput.h |
Overview
AVCaptureOutput is an abstract base-class describing an output destination of an AVCaptureSession object.
AVCaptureOutput provides an abstract interface for connecting capture output destinations, such as files and video previews, to an capture session (an instance of AVCaptureSession). A capture output can have multiple connections represented by AVCaptureConnection objects, one for each stream of media that it receives from a capture input (an instance of AVCaptureInput). A capture output does not have any connections when it is first created. When you add an output to a capture session, connections are created that map media data from that session’s inputs to its outputs.
You can add concrete AVCaptureOutput instances to an capture session using addOutput:.
Properties
connections
The capture output object’s connections. (read-only)
Discussion
The value of this property is an array of AVCaptureConnection objects, each describing the mapping between the receiver and the capture input ports (see AVCaptureInputPort) of one or more capture inputs (see AVCaptureInput).
Availability
- Available in iOS 4.0 and later.
Declared In
AVCaptureOutput.hInstance Methods
connectionWithMediaType:
Returns the first connection in the connections array with an input port of a specified media type.
Parameters
- mediaType
An AVMediaType constant from AVMediaFormat.h, for example,
AVMediaTypeVideo.
Return Value
The first capture connection in the connections array that has an AVCaptureInputPort with media type mediaType, or nil if no connection with the specified media type is found.
Availability
- Available in iOS 5.0 and later.
Declared In
AVCaptureOutput.htransformedMetadataObjectForMetadataObject:connection:
Converts an AVMetadataObject's visual properties to the receiver's coordinates.
Parameters
- metadataObject
An
AVMetadataObjectoriginating from the sameAVCaptureInputas the receiver.- connection
The receiver's connection whose
AVCaptureInputmatches that of the metadata object to be converted.
Return Value
An AVMetadataObject whose properties are in output coordinates, or nil if metadataObject originates from an input source other than the preview layer.
Discussion
This method converts the visual properties in the coordinate space of the supplied AVMetadataObject to the coordinate space of the receiver. The conversion takes orientation, mirroring, and scaling into consideration and alters the visual properties of the provided metadata object to match the physical rotation and mirroring of the sample buffers provided by the receiver through the indicated connection.
This means that for video data output (AVCaptureVideoDataOutput), adjusted metadata object coordinates are rotated and mirrored. For still image (AVCaptureStillImageOutput) and movie file (AVCaptureMovieFileOutput) output, they are not. Instead, the rotation and mirroring of the metadata object coordinates for these two types of output are determined on playback.
Availability
- Available in iOS 6.0 and later.
Declared In
AVCaptureOutput.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)