From 0bedfc51a4d6dc31a723e14dacf1ffc0bc528e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 26 Apr 2015 14:37:56 +0100 Subject: [PATCH] tests: typefindfunctions: add test for UTF-16 MSS manifest typefinding --- tests/check/gst/typefindfunctions.c | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/tests/check/gst/typefindfunctions.c b/tests/check/gst/typefindfunctions.c index f40d4ec1be..9c1dc0e3dd 100644 --- a/tests/check/gst/typefindfunctions.c +++ b/tests/check/gst/typefindfunctions.c @@ -25,6 +25,28 @@ #include #include +static GstCaps * +typefind_data (const guint8 * data, gsize data_size, + GstTypeFindProbability * prob) +{ + GstBuffer *buf; + GstCaps *caps; + + GST_MEMDUMP ("typefind data", data, data_size); + buf = gst_buffer_new (); + gst_buffer_append_memory (buf, + gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, + (guint8 *) data, data_size, 0, data_size, NULL, NULL)); + GST_BUFFER_OFFSET (buf) = 0; + + caps = gst_type_find_helper_for_buffer (NULL, buf, prob); + GST_INFO ("caps: %" GST_PTR_FORMAT ", probability=%u", caps, *prob); + + gst_buffer_unref (buf); + + return caps; +} + GST_START_TEST (test_quicktime_mpeg4video) { /* quicktime redirect file which starts with what could also be interpreted @@ -387,6 +409,73 @@ GST_START_TEST (test_hls_m3u8) GST_END_TEST; +static const gchar MANIFEST[] = + "\n" + "\n" + "\n" + " \n" + "