From 53a431a3239918cd04763879845e09bc87bb8883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 16 Jul 2015 21:28:28 +0100 Subject: [PATCH] dashdemux: remove typefinder, move it to typefindfunctions in -base Otherwise this plugin will be loaded pretty much whenever there's anything to typefind. And the code was pretty much copy'n'paste from -base anyway. --- ext/dash/gstplugin.c | 91 ++------------------------------------------ 1 file changed, 4 insertions(+), 87 deletions(-) diff --git a/ext/dash/gstplugin.c b/ext/dash/gstplugin.c index 908a2e4f49..29f281769c 100644 --- a/ext/dash/gstplugin.c +++ b/ext/dash/gstplugin.c @@ -8,98 +8,15 @@ #include "gstdashdemux.h" -#define XML_BUFFER_SIZE 16 -#define XML_INC_BUFFER { \ - pos++; \ - if (pos == XML_BUFFER_SIZE) { \ - pos = 0; \ - offset += XML_BUFFER_SIZE; \ - data = gst_type_find_peek (tf, offset, XML_BUFFER_SIZE); \ - if (data == NULL) return FALSE; \ - } else { \ - data++; \ - } \ -} - static gboolean -xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen, - gboolean strict) +dashdemux_init (GstPlugin * plugin) { - gboolean got_xmldec; - const guint8 *data; - guint offset = 0; - guint pos = 0; - - data = gst_type_find_peek (tf, 0, XML_BUFFER_SIZE); - if (!data) - return FALSE; - - /* look for the XMLDec - * see XML spec 2.8, Prolog and Document Type Declaration - * http://www.w3.org/TR/2004/REC-xml-20040204/#sec-prolog-dtd */ - got_xmldec = (memcmp (data, "