adaptivedemux: Implement GST_SEEK_TYPE_END usage for live
authorEdward Hervey <edward@centricular.com>
Fri, 5 May 2017 16:25:43 +0000 (18:25 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 9 May 2017 07:02:07 +0000 (09:02 +0200)
commitdf60e122037a7eed9604a91c9bed5abe93d1e50c
tree433ac27e9f11929df2371f29ed4b06525b2b62e0
parent0309b20098fff102b73f6ac0a5d2ff1b220d090a
adaptivedemux: Implement GST_SEEK_TYPE_END usage for live

When dealing with live streams, we can't rely on GstSegment calculation
since it uses the segment duration to calculate the absolute values.

But since we are dealing with live *and* we know the ranges, we can
compute the absolute seeking values using the range stop (i.e. "now")
as the END position.

Allows seeking back to "live" by using start_type:GST_SEEK_TYPE_END
and start:0

https://bugzilla.gnome.org/show_bug.cgi?id=782228
gst-libs/gst/adaptivedemux/gstadaptivedemux.c