Gst.Clock.prototype.add_observation

function add_observation(slave:Gst.ClockTime, master:Gst.ClockTime):Boolean {
    // Gjs wrapper for gst_clock_add_observation()
}

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.

slave

a time on the slave

master

a time on the master

Returns

true if enough observations were added to run the regression algorithm. MT safe.