Instance Property

controlTimebase

The layer's control timebase, which governs how timestamps are interpreted.

Declaration

var controlTimebase: CMTimebase? { get set }

Discussion

By default, this property is NULL, in which case timestamps are interpreted according to the host time clock (mach_absolute_time with the appropriate timescale conversion; this is the same as Core Animation’s CACurrentMediaTime()). With no control timebase, once frames are enqueued, it is not possible to adjust exactly when they are displayed.

If a non-NULL control timebase is set, it is used to interpret timestamps. You control the timing of frame display by setting the rate and time of the control timebase.

If you are synchronizing video to audio, you should use a timebase whose master clock is a CMAudioDeviceClock for the appropriate audio device to prevent drift. See CMAudioDeviceClock Reference for more information.

See Also