Structure

CMTime

Defines a structure that represents a rational time value int64/int32.

Declaration

struct CMTime

Topics

Initializers

init()

Initializes a new CMTime equal to kCMTimeInvalid.

init(seconds: Double, preferredTimescale: CMTimeScale)

Makes a CMTime from a Double number of seconds, and a preferred timescale.

init(value: CMTimeValue, timescale: CMTimeScale)

Makes a valid CMTime with value and timescale. Epoch is implied to be 0.

Type Properties

static let indefinite: CMTime

Use this constant to initialize an indefinite CMTime (for example, the duration of a live broadcast).

static let invalid: CMTime

Use this constant to initialize an invalid CMTime.

static let negativeInfinity: CMTime

Use this constant to initialize a CMTime to -infinity.

static let positiveInfinity: CMTime

Use this constant to initialize a CMTime to +infinity.

static let zero: CMTime

Use this constant to initialize a CMTime to 0.

Relationships

Conforms To

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software