AVMetadataObject Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 6.0 and later. |
| Declared in | AVMetadataObject.h |
Overview
The AVMetadataObject class is an abstract class that defines the basic properties associated with a piece of metadata. These attributes reflect information either about the metadata itself or the media from which the metadata originated. Subclasses are responsible for providing appropriate values for each of the relevant properties.
Typically, you do not subclass AVMetadataObject directly. Instead, you use one of the defined subclasses provided by AV Foundation. Similarly, you do not create instances of this class yourself but use an AVCaptureMetadataOutput object to retrieve them from the captured data.
Properties
bounds
The bounding rectangle associated with the metadata. (read-only)
Discussion
The bounding rectangle is specified relative to the picture or video of the corresponding media. The rectangle’s origin is always specified in the top-left corner and the x and y axis extend down and to the right. If the metadata has no bounding rectangle, the value if this property should be CGRectZero.
For video content, the bounding rectangle may be expressed using scalar values in the range 0 to 1. Scalar values remain meaningful even when the original video has been scaled down.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.hduration
The duration of the media associated with this metadata object. (read-only)
Discussion
For metadata originating from a sample buffer (CMSampleBufferRef), the duration reflects the duration of the sample buffer. If there is no valid duration value associated with the metadata, this property should contain kCMTimeInvalid.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.htime
The media time value associated with the metadata object. (read-only)
Discussion
For captured media, this property represents the time at which the metadata was captured. For metadata originating from a sample buffer (CMSampleBufferRef), the time is the sample buffer’s presentation time. If there is no valid time value associated with the metadata, this property should contain kCMTimeInvalid.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.htype
The type of the metadata. (read-only)
Discussion
You use this string to distinguish between different types of metadata. The possible values for this property are defined by subclasses, which can define constants for the type of metadata they represent.
Availability
- Available in iOS 6.0 and later.
Declared In
AVMetadataObject.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)