rtpjitterbuffer: refactor jitterbuffer
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 30 Jul 2013 21:14:24 +0000 (23:14 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 30 Jul 2013 21:24:23 +0000 (23:24 +0200)
commit77846d35c6f1676480016c5654e207ead50d1024
treec74d09921b447359529638735dbaa78094dad4cc
parentea931d4f57e37576b5ac681e65b7e509f76090be
rtpjitterbuffer: refactor jitterbuffer

Refactor the jitterbuffer code. Make separate function for peeking a buffer,
pushing the next buffer, waiting for timeouts and handling the timeouts.

The main loop now tries to push as many buffers as it can until it runs out of
buffers or when it detects a seqnum discont. Then it will wait for some event to
happen before attempting to push more buffers.

Make methods to register timeouts in an array. These timeouts are registered
when we detect a missing packet, sync for the first packet or when we find an
estimation for the end-of-stream.

This greatly simplifies and clarifies the code and also makes it possible to
register more complicated timeout schemes later.
gst/rtpmanager/gstrtpjitterbuffer.c