#ifdef HAVE_CONFIG_H # include #endif #include #include #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) { 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, "