netclock: Implement rolling-average filter on observations.
authorJan Schmidt <jan@centricular.com>
Mon, 25 Nov 2013 15:17:36 +0000 (02:17 +1100)
committerJan Schmidt <jan@centricular.com>
Mon, 25 Nov 2013 15:20:14 +0000 (02:20 +1100)
commit5b2df52c6a9a4f4575bbcb234308475a4580b807
tree0f1618abe582dda9edbcedafd13a73b51ea03c2b
parent5db5fc42273a6a59d6c2b59ae1a931906ddeaa69
netclock: Implement rolling-average filter on observations.

Keep a rolling average of the round trip time for network clock
observations, favouring shorter round trips as being more accurate.

Don't pass any clock observation to the clock slaving if it has a
round-trip time greater than 2 times the average.

Actual shifts in the network topology will be noticed after some
time, as the rolling average incorporates the new round trip times.
libs/gst/net/gstnetclientclock.c