A struct representing a range of time.
- Core Media
This document describes the API for creating and manipulating
CMTime structs are non-opaque mutable structures that represent time ranges. A
CMTime is represented as two
CMTime structs, one that specifies the start time of the range and another that specifies the duration of the range. A time range does not include the end time that would be calculated by adding the duration to the start time. The following expression will always evaluate to false:
You can convert
CMTime to and from
CMTime, for use in annotations and various Core Foundation containers.
The epoch in a
CMTime that represents a duration should always be 0, and the value must be non-negative. The epoch in a
CMTime that represents a timestamp may be non-zero, but range operations (such as
CMTime) can only be performed on ranges whose start fields have the same epoch.
CMTime cannot span different epochs.