Platforms to show: All Mac Windows Linux Cross-Platform

Back to CMTimeMBS class.

CMTimeMBS.Epoch as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The epoch of the CMTime.

You use the epoch to differentiate between equal timestamps that are actually different because of looping, multi-item sequencing, and so on.
The epoch is used during comparison: greater epochs happen after lesser ones. Addition or subtraction is only possible within a single epoch, however, since the epoch length may be unknown or variable.

The epoch is typically 0, but you might use a different value, for example, in a loop.
(Read and Write property)

CMTimeMBS.Flags as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
A bitfield representing the flags set for the CMTime.

For example, kCMTimeFlags_Valid. See constants for possible values.
(Read and Write property)

CMTimeMBS.HasBeenRounded as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given time has been rounded.

Returns true if the CMTime has been rounded, otherwise false (the time is completely accurate).
(Read only property)

CMTimeMBS.IsIndefinite as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns whether a CMTime is indefinite.

Returns true if the CMTime is indefinite, false if it is not.
(Read only property)

CMTimeMBS.IsInvalid as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given time is invalid.
Example
dim t as new CMTimeMBS(1200, 600)
MsgBox "Invalid: "+str(t.IsInvalid)

t = CMTimeMBS.kCMTimeInvalid
MsgBox "Invalid: "+str(t.IsInvalid)

Returns true if the CMTime is invalid, otherwise false.
(Read only property)

CMTimeMBS.IsNegativeInfinity as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given time is negative infinity.

Returns true if the CMTime is negative infinity, otherwise false.

Use this instead of (myTime = kCMTimeNegativeInfinity), since there are many CMTime structs that represent positive infinity. This is because the non-flags fields are ignored, so they can contain anything.
(Read only property)

CMTimeMBS.IsNumeric as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given time is numeric.

Returns true if the CMTime is numeric, otherwise false. Returns false if the CMTime is invalid, indefinite, or +/- infinity.
A numeric time contains a usable value/timescale/epoch.
(Read only property)

CMTimeMBS.IsPositiveInfinity as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given time is positive infinity.

Returns true if the CMTime is positive infinity, otherwise false.

Use this instead of (myTime = kCMTimePositiveInfinity), since there are many CMTime structs that represent positive infinity. This is because the non-flags fields are ignored, so they can contain anything.
(Read only property)

CMTimeMBS.IsValid as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a Boolean value that indicates whether a given time is valid.
Example
dim t as new CMTimeMBS(1200, 600)
MsgBox "valid: "+str(t.IsValid)

Return true if the CMTime is valid, otherwise false.
(Read only property)

CMTimeMBS.Seconds as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The number of seconds.
Example
dim t as new CMTimeMBS(1200, 600)
t.show

If the CMTime is invalid or indefinite, NaN is returned. If the CMTime is infinite, +/- infinity is returned. If the CMTime is numeric, epoch is ignored, and time.value / time.timescale is returned. The division is done in Float64, so the fraction is not lost in the returned result.
(Read only property)

CMTimeMBS.Timescale as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The timescale of the CMTime.

value/timescale = seconds.
(Read and Write property)

CMTimeMBS.Value as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property AVFoundation MBS AVFoundation Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The value of the CMTime.

value/timescale = seconds.
(Read and Write property)

The items on this page are in the following plugins: MBS AVFoundation Plugin.


The biggest plugin in space...