gstreamer/ext/hls
Alex Ashley 50b5d94b2a hlsdemux: Implement live seeking
hlsdemux assumes that seeking is not allowed for live streams,
however seek is possible if there are sufficient fragments in the
manifest. For example the BBC have live streams that contain 2 hours
of fragments.

The seek code for both live and on-demand is common code. The
difference between them is that an offset has to be calculated
for the timecode of the first fragment in the live playlist.

When hlsdemux starts to play a live stream, the possible seek range
is between 0 and A seconds. After some time has passed, the beginning of
the stream will no longer be available in the playlist and the seek
range is between B and C seconds.

Seek range:
start          0 ........... A
later               B ........... C

This commit adds code to keep a note of the B and C values
and the highest sequence number it has seen. Every time it updates the
media playlist, it walks the list of fragments, seeing if there is a
fragment with sequence number > highest_seen_sequence. If so, the values
of B and C are updated. The value of B is used when timestamping
buffers.

It also makes sure the seek range is never closer than three fragments
from the end of the playlist - see 6.3.3. "Playing the Playlist file"
of the HLS draft.

https://bugzilla.gnome.org/show_bug.cgi?id=725435
2015-01-05 17:59:08 -03:00
..
gstfragmented.h Make the hls plugin depend on gnutls and move to ext/hls/ 2013-03-19 10:54:18 +01:00
gstfragmentedplugin.c Make the hls plugin depend on gnutls and move to ext/hls/ 2013-03-19 10:54:18 +01:00
gsthlsdemux.c hlsdemux: Implement live seeking 2015-01-05 17:59:08 -03:00
gsthlsdemux.h hlsdemux: port to adaptive base class 2014-12-23 10:08:57 -03:00
gsthlssink.c hlssink: remove unnecessary title on EXTINF tag 2014-12-04 17:52:08 +01:00
gsthlssink.h Make the hls plugin depend on gnutls and move to ext/hls/ 2013-03-19 10:54:18 +01:00
gstm3u8playlist.c hlssink: remove unnecessary title on EXTINF tag 2014-12-04 17:52:08 +01:00
gstm3u8playlist.h Make the hls plugin depend on gnutls and move to ext/hls/ 2013-03-19 10:54:18 +01:00
m3u8.c hlsdemux: Implement live seeking 2015-01-05 17:59:08 -03:00
m3u8.h hlsdemux: Implement live seeking 2015-01-05 17:59:08 -03:00
Makefile.am hlsdemux: port to adaptive base class 2014-12-23 10:08:57 -03:00