Jean-Paul Saman [Fri, 31 Dec 2010 14:40:55 +0000 (15:40 +0100)]
stream_filter/httplive.c: Cleanup hls_thread_t and stream_sys_t structs.
Cleanup hls_thread_t and stream_sys_t structs:
- duplicate members
- rename hls_playlist_t to hls_playlist_s
- move download members to stream_sys_t inside a hls_download_s struct
- check for p_sys->thread is no longer needed in segment_Seek()
Jean-Paul Saman [Fri, 31 Dec 2010 14:31:49 +0000 (15:31 +0100)]
stream_filter/httplive.c: reloading playlist check before download segments
Rearrange hls_Thread logic with live playback in mind. In case all segments have been
downloaded, then make sure that reloading the playlist file happens before downloading
the next segment. This is also true when it is time to reload the playlist.
Jean-Paul Saman [Tue, 28 Dec 2010 13:30:16 +0000 (14:30 +0100)]
stream_filter/httplive.c: Reload M3U8 playlist for live streams
Reload .m3u8 playlist from the server and try merging its result with the current
available information. The array of segments for the current stream is only appended
and does currently not shrink. Shrinking the segment list will be dealt with in another patch.
Jean-Paul Saman [Wed, 29 Dec 2010 13:49:55 +0000 (14:49 +0100)]
stream_filter/httplive.c: use hls->url.psz_path in relative_URI() for segments.
The function relative_URI() only took the base path from the meta index file into account.
This caused it to miss subdirectories mentioned in the .m3u8 files referenced from the
meta index file. Instead of looking at the base of the meta index file it now looks at
the base path (hls->url.psz_path) from the HLS stream itself for segments.
Jean-Paul Saman [Tue, 28 Dec 2010 14:06:04 +0000 (15:06 +0100)]
stream_filter/httplive.c: b_cache determined in wrong place
The logic to determine if caching of segments is allowed or denied was flawed. It
only determined it onces after the playlists were loaded. In case of a meta playlist
the logic would only indicated the caching value for the last added HLS stream.
The fix is to determine p_sys->b_caching (caching segments allowed or not) when switching
segments or HLS streams (adaptive bandwidth).
Jean-Paul Saman [Mon, 27 Dec 2010 13:21:17 +0000 (14:21 +0100)]
stream_filter/httplive.c: download 6 segments from start point
The HLS plugin downloads all segments as fast as possible once started. This is
not very friendly to HLS servers, because it equals a full download of the movie in one go.
However by downloading only a certain amount (say 6 segments, which is about 60 seconds usually)
the load on the server is spread.
From 7.6 to 7.9, the method for setting video modes et al was changed,
in a way that is neither backwards nor forwards compatible. Even though
the 7.9 SDK includes some backwards-compatible headers for emulating
older APIs, they are unfortunately not a drop-in replacement, since they
add version numbers to struct names et al. Thus, there is no simple method
of maintaining source-level compatibility with both APIs (even though a
VLC compiled against the 7.6 SDK most likely would work if moved to a
machine with 7.9 driver), and given the choice, we should support the
newest API, as the older SDK isn't even downloadable anymore.
Thus, update unconditionally to the new API, and hope Blackmagic won't
change things too often in the future.
Jakub Wieczorek [Tue, 21 Dec 2010 22:25:40 +0000 (23:25 +0100)]
Remove the filter patterns in the playlist file dialog from the translatable strings. These shouldn't be translated and malforming them could introduce a functional bug, as it happened in the case of the Spanish translation. http://trac.videolan.org/vlc/ticket/4376
Jean-Paul Saman [Fri, 17 Dec 2010 14:44:42 +0000 (15:44 +0100)]
stream_filter/httplive.c: do not seek in last 3 segments of HLS stream
Seeking into the last 3 segments keeps this condition in false state. In this
case it should turn into true because the last 3 segments have already been downloaded.
Or the condition should just not be applied.
Jean-Paul Saman [Fri, 17 Dec 2010 14:35:28 +0000 (15:35 +0100)]
stream_filter/httplive.c: Rename NextSegment() to GetSegment()
The function NextSegment() no longer resembles its name. It does not
get the next segment. It just gets the segment p_sys->segment from a
HLS stream (default p_sys->current).
Renamed the function GetSegment() to more resemble its usage.
The function hls_GetStreamSize() calculates the HLS stream size in bytes, based
upon information found in the .m3u8 file. The sum of each segment duration
(in seconds) times bandwith in bytes (hls->bandwidth/8).