CMTime
struct CMTime
-
The CMTime value as an FCPXML time string using the format
[value]/[timescale]s
or0s
if the value is zero.Declaration
Swift
public var fcpxmlString: String { get }
-
Returns a CMTime value with a value of zero and timescale of 1000.
Declaration
Swift
public func zero() -> CMTime
Return Value
A CMTime object.
-
Returns the CMTime value as a tuple containing components of time as separate values.
Declaration
Swift
public func timeAsCounter() -> (hours: Int, minutes: Int, seconds: Int, milliseconds: Double, hoursString: String, minutesString: String, secondsString: String, framesString: String, counterString: String)
Return Value
A tuple with hours, minutes, seconds, and milliseconds as Int, Double, and String values.
-
Returns the CMTime value as a tuple containing components of SMPTE timecode as separate values.
Declaration
Swift
public func timeAsTimecode(usingFrameDuration frameDuration: CMTime, dropFrame: Bool) -> (hours: Int, minutes: Int, seconds: Int, frames: Int, hoursString: String, minutesString: String, secondsString: String, framesString: String, timecodeString: String, timecodeInSeconds: Double)
Parameters
frameDuration
The duration of a single frame as a CMTime value.
Return Value
A tuple with hours, minutes, seconds, and frames as Int and String values.