Clock.addObservation

The time @master of the master clock and the time @slave of the slave clock are added to the list of observations. If enough observations are available, a linear regression algorithm is run on the observations and @clock is recalibrated.

If this functions returns %TRUE, @r_squared will contain the correlation coefficient of the interpolation. A value of 1.0 means a perfect regression was performed. This value can be used to control the sampling frequency of the master and slave clocks.

class Clock
bool
addObservation

Parameters

slave GstClockTime

a time on the slave

master GstClockTime

a time on the master

rSquared double

a pointer to hold the result

Return: %TRUE if enough observations were added to run the regression algorithm.

MT safe.

Meta