[Bug 725435] hlsdemux: enable seek for live streams

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Dec 30 19:42:32 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=725435
  GStreamer | gst-plugins-bad | git

Thiago Sousa Santos <thiagossantos> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #273592|0                           |1
        is obsolete|                            |

--- Comment #11 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-12-31 03:42:27 UTC ---
Created an attachment (id=293507)
 View: https://bugzilla.gnome.org/attachment.cgi?id=293507
 Review: https://bugzilla.gnome.org/review?bug=725435&attachment=293507

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.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list