rtptimerqueue: Consolidate a data structure for timers
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 12 Jun 2019 13:59:31 +0000 (09:59 -0400)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Fri, 27 Sep 2019 21:34:04 +0000 (17:34 -0400)
commit37742cd36d53cdd3ddb7ecae5a8796e7f31e26b1
treedceff625ffeda5f94115e62cd42224c8e9a9bfd1
parenta53ffb6e11c8a8e7c078f890c80d0858155785c0
rtptimerqueue: Consolidate a data structure for timers

Implement a single timer queue for all timers. The goal is to always use
ordered queues for storing timers. This way, extracting timers for
execution becomes O(1). This also allow separating the clock wait
scheduling from the timer itself and ensure that we only wake up the
timer thread when strictly needed.

The knew data structure is still O(n) on insertions and reschedule,
but we now use proximity optimization so that normal cases should be
really fast. The GList structure is also embeded intot he RtpTimer
structure to reduce the number of allocations.
gst/rtpmanager/Makefile.am
gst/rtpmanager/gstrtpjitterbuffer.c
gst/rtpmanager/meson.build
gst/rtpmanager/rtptimerqueue.c [new file with mode: 0644]
gst/rtpmanager/rtptimerqueue.h [new file with mode: 0644]
tests/check/Makefile.am
tests/check/elements/rtpjitterbuffer.c
tests/check/meson.build