Clock.setCalibration

void setCalibration(gst.types.ClockTime internal, gst.types.ClockTime external, gst.types.ClockTime rateNum, gst.types.ClockTime rateDenom)

Adjusts the rate and time of clock. A rate of 1/1 is the normal speed of the clock. Values bigger than 1/1 make the clock go faster.

internal and external are calibration parameters that arrange that [gst.clock.Clock.getTime] should have been external at internal time internal. This internal time should not be in the future; that is, it should be less than the value of [gst.clock.Clock.getInternalTime] when this function is called.

Subsequent calls to [gst.clock.Clock.getTime] will return clock times computed as follows:

`` C time = (internal_time - internal) * rate_num / rate_denom + external ``

This formula is implemented in [gst.clock.Clock.adjustUnlocked]. Of course, it tries to do the integer arithmetic as precisely as possible.

Note that [gst.clock.Clock.getTime] always returns increasing values so when you move the clock backwards, [gst.clock.Clock.getTime] will report the previous value until the clock catches up.

Parameters

internala reference internal time
externala reference external time
rateNumthe numerator of the rate of the clock relative to its internal time
rateDenomthe denominator of the rate of the clock