mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
50b5d94b2a
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 |
||
---|---|---|
.. | ||
gstfragmented.h | ||
gstfragmentedplugin.c | ||
gsthlsdemux.c | ||
gsthlsdemux.h | ||
gsthlssink.c | ||
gsthlssink.h | ||
gstm3u8playlist.c | ||
gstm3u8playlist.h | ||
m3u8.c | ||
m3u8.h | ||
Makefile.am |