hls: m3u8: Rework m3u8 parsing and storage.
authorTim-Philipp Müller <tim@centricular.com>
Fri, 27 Nov 2015 19:26:02 +0000 (19:26 +0000)
committerJan Schmidt <jan@centricular.com>
Wed, 3 Aug 2016 13:49:54 +0000 (23:49 +1000)
commitf0fcf1d71895a1defa545bc844dcd603d1cafdb5
tree3b3c2287b6ca2487e51603dbe1fad759c460d5c3
parent65a3c3567066a37f61c23d05dbf2c3f68c5d8c98
hls: m3u8: Rework m3u8 parsing and storage.

Make M3U8 and GstM3U8MediaFile refcounted. The contents
of it and GstM3U8MediaFile are pretty much immutable
already, but if we make it refcounted we can just
return a ref to the media file from _get_next_fragment()
instead of copying over all fields one-by-one, and then
copying them all into the adaptive stream structure fields again.

Move state from client into m3u8 structure.  This will
be useful later when we'll have multiple media playlists
being streamed at the same time, as will be the case with
alternative renditions.

This has the downside that we need to copy over some
state when we switch between variant streams.

The GstM3U8Client structure is gone, and main/current
lists are not directly in hlsdemux. hlsdemux had as
many CLIENT_LOCK/UNLOCK as the m3u8 code anyway...
ext/hls/gsthlsdemux.c
ext/hls/gsthlsdemux.h
ext/hls/m3u8.c
ext/hls/m3u8.h