tests: add typefind test for application/x-hls

To make sure we don't break detection when we add typefinding
for normal m3u8 playlists.
This commit is contained in:
Tim-Philipp Müller 2011-03-30 15:47:38 +01:00
parent 143dc4810d
commit 2e220e352f
3 changed files with 31 additions and 0 deletions

View file

@ -354,6 +354,20 @@ GST_START_TEST (test_random_data)
GST_END_TEST;
GST_START_TEST (test_hls_m3u8)
{
const gchar *type;
GstCaps *caps = NULL;
caps = typefind_test_file ("hls.m3u8");
type = gst_structure_get_name (gst_caps_get_structure (caps, 0));
fail_unless_equals_string (type, "application/x-hls");
gst_caps_unref (caps);
}
GST_END_TEST;
static Suite *
typefindfunctions_suite (void)
{
@ -369,6 +383,7 @@ typefindfunctions_suite (void)
tcase_add_test (tc_chain, test_ac3);
tcase_add_test (tc_chain, test_eac3);
tcase_add_test (tc_chain, test_random_data);
tcase_add_test (tc_chain, test_hls_m3u8);
return s;
}

View file

@ -1,3 +1,4 @@
EXTRA_DIST = \
623663.mts \
hls.m3u8 \
partialframe.mjpeg

15
tests/files/hls.m3u8 Normal file
View file

@ -0,0 +1,15 @@
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=246221
0240/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=38872
0064/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=153059
0150/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=455394
0440/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=650356
0640/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=861738
0840/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1258987
1240/prog_index.m3u8