Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A CMTime is represented as a rational number, with a numerator (an int64 value), and a denominator (an int32 timescale). Conceptually, the timescale specifies the fraction of a second each unit in the numerator occupies. Thus if the timescale is 4, each unit represents a quarter of a second; if the timescale is 10, each unit represents a tenth of a second, and so on. In addition to a simple time value, a CMTime can represent non-numeric values: +infinity, -infinity, and indefinite. Using a flag CMTime indicates whether the time been rounded at some point.
CMTimes contain an epoch number, which is usually set to 0, but can be used to distinguish unrelated timelines: for example, it could be incremented each time through a presentation loop, to differentiate between time N in loop 0 from time N in loop 1.
Additional functions for managing dates and times are described in Time Utilities Reference. Note that CMTime is designed for media timelines whereas functions in Time Utilities Reference are designed for working with wall-clock time in Core Foundation framework; see also AV Foundation Constants Reference.
Constant | Value | Description |
---|---|---|
kCMTimeMaxTimescale | &h7fffffff | A constant to define the maximum timescale. |
Constant | Value | Description |
---|---|---|
kCMTimeFlags_HasBeenRounded | 2 |
Indicates that the time has been rounded. |
kCMTimeFlags_ImpliedValueFlagsMask | 28 |
Indicates that the time is +infinity, -infinity, or indefinite. Use this value with bitwiseAnd on the flags. |
kCMTimeFlags_Indefinite | 16 |
Indicates that the time is indefinite. |
kCMTimeFlags_NegativeInfinity | 8 |
Indicates that the time is -infinity. |
kCMTimeFlags_PositiveInfinity | 4 |
Indicates that the time is +infinity. |
kCMTimeFlags_Valid | 1 |
Indicates that the time is valid. |
Constant | Value | Description |
---|---|---|
kCMTimeRoundingMethod_Default | 1 |
Synonym for kCMTimeRoundingMethod_RoundHalfAwayFromZero. |
kCMTimeRoundingMethod_QuickTime | 4 | Use kCMTimeRoundingMethod_RoundTowardZero if converting from larger to smaller scale (that is, from more precision to less precision), but use kCMTimeRoundingMethod_RoundAwayFromZero if converting from smaller to larger scale (i.e. from less precision to more precision). more |
kCMTimeRoundingMethod_RoundAwayFromZero | 3 |
Round away from zero if abs(fraction) is > 0. |
kCMTimeRoundingMethod_RoundHalfAwayFromZero | 1 |
Round towards zero if abs(fraction) is < 0.5, away from 0 if abs(fraction) is >= 0.5. |
kCMTimeRoundingMethod_RoundTowardNegativeInfinity | 6 |
Round towards -infinity if fraction is not 0. |
kCMTimeRoundingMethod_RoundTowardPositiveInfinity | 5 |
Round towards +infinity if fraction is not 0. |
kCMTimeRoundingMethod_RoundTowardZero | 2 |
Round towards zero if fraction is not 0. |
This class has no sub classes.
The items on this page are in the following plugins: MBS AVFoundation Plugin.
CMTimeMappingMBS - CMTimeRangeMBS