CMTimeConvertScale(_:timescale:method:)
Converts the source time to a new timescale using the specified rounding method.
Declaration
func CMTimeConvertScale(_ time: CMTime, timescale newTimescale: Int32, method: CMTimeRoundingMethod) -> CMTimeParameters
- time:
The time to convert.
- newTimescale:
The timescale to use for the converted time.
- method:
The rounding method to apply.
Return Value
A time structure that represents the time in a new timescale.
Discussion
If this operation needs to round the value, it sets the resulting time’s hasBeenRounded flag. If the source time is nonnumeric (infinite, indefinite, or invalid), the result is also nonnumeric.