NSValue AV Foundation Additions Reference

Inherits from
Framework
/System/Library/Frameworks/AVFoundation.framework
Availability
Available in iOS 4.0 and later.
Declared in
AVTime.h

Overview

The AVFoundation framework adds methods to the NSValue class to make it easier to create a value object with a Core Media time structure, and extract a Core Media time structure from a value object.

Tasks

Creating a Value Object

Retrieving Core Media Time Structures

Class Methods

valueWithCMTime:

Returns a value object that contains a given CMTime structure.

+ (NSValue *)valueWithCMTime:(CMTime)time
Parameters
time

A time.

Return Value

A value object initialized using time.

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

valueWithCMTimeMapping:

Returns a value object that contains a given CMTimeMapping structure.

+ (NSValue *)valueWithCMTimeMapping:(CMTimeMapping)timeMapping
Parameters
timeMapping

A time mapping.

Return Value

A value object initialized using timeMapping.

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

valueWithCMTimeRange:

Returns a value object that contains a given CMTimeRange structure.

+ (NSValue *)valueWithCMTimeRange:(CMTimeRange)timeRange
Parameters
timeRange

A time range.

Return Value

A value object initialized using timeRange.

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

Instance Methods

CMTimeMappingValue

Returns a CMTimeMapping structure representation of the receiver.

- (CMTimeMapping)CMTimeMappingValue
Return Value

A CMTimeMapping structure representation of the receiver.

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

CMTimeRangeValue

Returns a CMTimeRange structure representation of the receiver.

- (CMTimeRange)CMTimeRangeValue
Return Value

A CMTimeRange structure representation of the receiver.

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

CMTimeValue

Returns a CMTime structure representation of the receiver.

- (CMTime)CMTimeValue
Return Value

A CMTime structure representation of the receiver.

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