Commit graph

7 commits

Author SHA1 Message Date
Alex Ashley
48fefd8c84 check: hlsdemux: make duration unit test robust to floating point rounding
The test_playlist_with_doubles_duration() test fails on some platforms
due to rounding errors that occur when m3u8.c converts from the floating
point value in the HLS manifest to a GstClockTime.

Using assert_equals_float() fixes this because this function handles
the rounding error issues by accepting almost equal.

https://bugzilla.gnome.org/show_bug.cgi?id=753881
2015-08-20 17:13:48 +03:00
Edward Hervey
e899abea14 check: Use GST_CHECK_MAIN () macro everywhere
Makes source code smaller, and ensures we go through common initialization
path (like the one that sets up XML unit test output ...)
2015-06-02 16:04:40 +02:00
Alex Ashley
a08dd85608 hlsdemux: select correct starting position for live streams
When playing live HLS streams, the media playback starts from the
beginning of the media playlist. When playing a live HLS stream,
media playback should start from 3 fragments from the end of the
playlist.

See section 6.3.3. of the HLS draft [1]

This commit changes the logic to select 3 fragments from the end when
playing a live stream.

[1] http://tools.ietf.org/html/draft-pantos-http-live-streaming-12#page-29

https://bugzilla.gnome.org/show_bug.cgi?id=727742
2015-02-20 19:00:01 -03:00
Sebastian Dröge
341b336e71 hlsdemux: Fix M3U8 parsing unit test after API changes 2014-10-07 15:24:10 +03:00
Thiago Santos
288efd4f99 tests: hlsdemux: fix compilation
In file included from /home/thiagoss/gst/head/gstreamer/gst/gst.h:54:0,
                 from /home/thiagoss/gst/head/gstreamer/libs/gst/check/gstcheck.h:34,
                 from elements/hlsdemux_m3u8.c:27:
../../ext/hls/gstfragmented.h:8:28: error: redundant redeclaration of ‘fragmented_debug’ [-Werror=redundant-decls]
 GST_DEBUG_CATEGORY_EXTERN (fragmented_debug);

Move the definition of the category to after the declaration.
2014-09-05 16:11:08 -03:00
Sebastian Dröge
3c14457b47 hlsdemux: Include the m3u8.c file directly in the test because of an automake bug
$(top_srcdir) doesn't seem to work with _SOURCES because that would be too
obvious.

http://lists.gnu.org/archive/html/automake/2013-09/msg00005.html
2014-09-05 12:25:01 +03:00
Sebastian Dröge
96c273f18a hlsdemux: Add unit test for parsing of M3U8 playlists
Ported from https://github.com/ylatuya/gst-plugins-bad

This still has some unit tests for alternative renditions and
seeking, which are commented out for the time being until we
support them properly.
2014-09-04 17:51:21 +03:00