From 1a5fb98e532c95d289d7ddc434c377e2d9eba976 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 17 Jan 2019 18:04:11 -0300 Subject: [PATCH] typefindfunctions: Add a function to typefind xges files --- gst/typefind/gsttypefindfunctions.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index c91b632..11cee9a 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -683,6 +683,21 @@ dash_mpd_type_find (GstTypeFind * tf, gpointer unused) } } +/*** application/xges ****************************************************/ + +static GstStaticCaps xges_caps = GST_STATIC_CAPS ("application/xges"); + +#define XGES_CAPS gst_static_caps_get (&xges_caps) + +static void +xges_type_find (GstTypeFind * tf, gpointer unused) +{ + if (xml_check_first_element (tf, "ges", 3, FALSE)) { + gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, XGES_CAPS); + } +} + + /*** application/sdp *********************************************************/ static GstStaticCaps sdp_caps = GST_STATIC_CAPS ("application/sdp"); @@ -5916,6 +5931,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/xges", + GST_RANK_PRIMARY, xges_type_find, "xges", XGES_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", -- 2.7.4