rtpjitterbuffer: Improve accuracy of RFC7273 clock time calculations
authorSebastian Dröge <sebastian@centricular.com>
Mon, 14 Mar 2022 11:59:37 +0000 (13:59 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 15 Mar 2022 23:33:37 +0000 (23:33 +0000)
commit5ca39060f43403cd50f287620378288fcac1a9a0
tree5bf0e9b0008bc97eb3298017be2c3723a512fcca
parent8c2ef0f02549aabbeeb97cb06409acdfcf88e6ba
rtpjitterbuffer: Improve accuracy of RFC7273 clock time calculations

Previously the result of the calculations included inaccuracies caused
by the NTP clock estimation, which caused the timestamps to jitter
+/- 1/clockrate.

By reorganizing the calculations it is possible to get rid of this
inaccuracy and calculate deterministic and exact packet timestamps based
on the actual NTP clock as long as the estimation is not off by more
than 2**31 clockrate units.

The only remaining inaccuracy that is introduced now is caused by the
conversion from the NTP clock to the pipeline clock.

Also split up debug output, demote many messages to the trace debug
level and output more intermediate results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1955>
subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c