Platforms to show: All Mac Windows Linux Cross-Platform
Back to CMTimeMBS class.
CMTimeMBS.kCMTimeIndefinite as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this constant to initialize an indefinite CMTime (for example, the duration of a live broadcast).
Do not test against this using (time = kCMTimeIndefinite), there are many CMTimes other than this that are also indefinite. Use time.IsIndefinite instead.
CMTimeMBS.kCMTimeInvalid as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this constant to initialize an invalid CMTime.
All fields are 0. Do not test against this using (time = kCMTimeInvalid), there are many CMTimes other than this that are also invalid. Use time.IsInvalid instead.
CMTimeMBS.kCMTimeNegativeInfinity as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this constant to initialize a CMTime to -infinity.
Do not test against this using (time = kCMTimeNegativeInfinity), there are many CMTimes other than this that are also -infinity. Use time.IsNegativeInfinity instead.
CMTimeMBS.kCMTimePositiveInfinity as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this constant to initialize a CMTime to +infinity.
Do not test against this using (time = kCMTimePositiveInfinity), there are many CMTimes other than this that are also +infinity. Use time.IsPositiveInfinity instead.
CMTimeMBS.kCMTimeZero as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this constant to initialize a CMTime to 0.
Do not test against this using (time = kCMTimeZero), there are many CMTimes other than this that are also 0. Use time.Compare(kCMTimeZero) instead.
Some examples using this method:
CMTimeMBS.Make(value as Int64, timescale as Integer) as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Epoch is implied to be 0.
value: Initializes the value field of the resulting CMTime.
timescale: Initializes the timescale field of the resulting CMTime.
Returns the resulting CMTime
CMTimeMBS.MakeWithEpoch(value as Int64, timescale as Integer, Epoch as Int64) as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
value: Initializes the value field of the resulting CMTime.
timescale: Initializes the scale field of the resulting CMTime.
epoch: Initializes the epoch field of the resulting CMTime.
Returns the resulting CMTime.
CMTimeMBS.MakeWithSeconds(seconds as Double, preferredTimeScale as Int32 = 600) as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
seconds: Initializes the seconds field of the resulting CMTime.
preferredTimeScale: Initializes the preferredTimeScale field of the resulting CMTime.
Returns the resulting CMTime.
The epoch of the result will be zero. If preferredTimeScale is <= 0, the result will be an invalid CMTime. If the preferred timescale will cause an overflow, the timescale will be halved repeatedly until the overflow goes away, or the timescale is 1. If it still overflows at that point, the result will be +/- infinity. The kCMTimeFlags_HasBeenRounded flag will be set if the result, when converted back to seconds, is not exactly equal to the original seconds value.
Some examples using this method:
CMTimeMBS.Maximum(t1 as CMTimeMBS, t2 as CMTimeMBS) as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CMTimeMBS.Minimum(t1 as CMTimeMBS, t2 as CMTimeMBS) as CMTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | AVFoundation | MBS AVFoundation Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The items on this page are in the following plugins: MBS AVFoundation Plugin.