dashdemux: Improve live stream manifest update repositioning
authorThiago Santos <thiagoss@osg.samsung.com>
Mon, 11 May 2015 17:19:20 +0000 (14:19 -0300)
committerThiago Santos <thiagoss@osg.samsung.com>
Wed, 13 May 2015 16:39:31 +0000 (13:39 -0300)
commit23ad922b6481d20ad466de8382787f51673dff89
tree8ff3c9f13d4e7bbfd41f75d6f44935f71e26b618
parent7de9fbc122996bb4291e44e3a4db366c9d684594
dashdemux: Improve live stream manifest update repositioning

When updating the manifest the timestamps on it might have changed a little
due to rounding and timescale conversions. If the change makes the timestamp
of the current segment to go up it makes dashdemux reposition to the previous
one causing one extra unnecessary download.

So when repositioning add an extra 10 microseconds to cover for that rounding
issues and increase the chance of falling in the same segment.

Additionally, also improve the time used when the client is already after the
last segment. Instead of using the last segment starting timestamp use the
final timestamp to make it reposition to the next one and not to the one that
has already been downloaded.
ext/dash/gstdashdemux.c
ext/dash/gstmpdparser.c
ext/dash/gstmpdparser.h