summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-07-16 21:26:30 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-07-16 21:26:30 +0100
commit39576545b7f66adc38aceda229bda3a1d8f5c9dc (patch)
tree7bfc844294d309c515b3fa640dd06825685c1522 /gst
parent56d7ef959e3fbe6e195536631e5708cdf99268ff (diff)
typefindfunctions: add DASH MPD typefinder
Moved from dashdemux plugin in -bad.
Diffstat (limited to 'gst')
-rw-r--r--gst/typefind/gsttypefindfunctions.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index deff56854..127a77541 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -594,6 +594,21 @@ xml_type_find (GstTypeFind * tf, gpointer unused)
}
}
+/*** application/dash+xml ****************************************************/
+
+static GstStaticCaps dash_caps = GST_STATIC_CAPS ("application/dash+xml");
+
+#define DASH_CAPS gst_static_caps_get (&dash_caps)
+
+static void
+dash_mpd_type_find (GstTypeFind * tf, gpointer unused)
+{
+ if (xml_check_first_element (tf, "MPD", 3, FALSE) ||
+ xml_check_first_element (tf, "mpd", 3, FALSE)) {
+ gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, DASH_CAPS);
+ }
+}
+
/*** application/sdp *********************************************************/
static GstStaticCaps sdp_caps = GST_STATIC_CAPS ("application/sdp");
@@ -5583,6 +5598,8 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_FIND_MAXIMUM);
TYPE_FIND_REGISTER (plugin, "application/x-shockwave-flash",
GST_RANK_SECONDARY, swf_type_find, "swf,swfl", SWF_CAPS, NULL, NULL);
+ TYPE_FIND_REGISTER (plugin, "application/dash+xml",
+ GST_RANK_PRIMARY, dash_mpd_type_find, "mpd,MPD", DASH_CAPS, NULL, NULL);
TYPE_FIND_REGISTER (plugin, "application/vnd.ms-sstr+xml",
GST_RANK_PRIMARY, mss_manifest_type_find, NULL, MSS_MANIFEST_CAPS, NULL,
NULL);