Class

AVMetadataObject

The abstract superclass for objects provided by a metadata capture output.

Declaration

class AVMetadataObject : NSObject

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.

You shouldn’t subclass AVMetadataObject directly. Instead, you use one of the defined subclasses provided by the AVFoundation framework. Similarly, you don’t create instances of this class yourself but use an AVCaptureMetadataOutput object to retrieve them from the captured data.

Topics

Getting the Type of Metadata

var type: AVMetadataObject.ObjectType

The type of the metadata.

struct AVMetadataObject.ObjectType

Values identifying the type of metadata object.

Getting the Media-Related Attributes

var time: CMTime

The media time value associated with the metadata object.

var duration: CMTime

The duration of the media associated with this metadata object.

var bounds: CGRect

The bounding rectangle associated with the metadata.

Relationships

Inherits From

Conforms To

See Also

Metadata Capture

class AVMetadataBodyObject

An abstract class that defines the interface for a metadata body object.

class AVMetadataCatBodyObject

An object representing a single detected cat body in a picture.

class AVMetadataDogBodyObject

An object representing a single detected dog body in a picture.

class AVMetadataHumanBodyObject

An object representing a single detected human body in a picture.

class AVMetadataSalientObject

An object representing a single salient area in a picture.

class AVCaptureMetadataInput

A capture input for providing timed metadata to a capture session.

class AVCaptureMetadataOutput

A capture output for processing timed metadata produced by a capture session.

class AVMetadataFaceObject

Face information detected by a metadata capture output.

class AVMetadataMachineReadableCodeObject

Barcode information detected by a metadata capture output.