diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 967569cf7a..742b1ddbd0 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -2842,6 +2842,18 @@ gst_mpd_client_free (GstMpdClient * client) g_free (client); } +static void +gst_mpd_client_check_profiles (GstMpdClient * client) +{ + GST_DEBUG ("Profiles: %s", client->mpd_node->profiles); + + if (g_strstr_len (client->mpd_node->profiles, -1, + "urn:mpeg:dash:profile:isoff-on-demand:2011")) { + client->profile_isoff_ondemand = TRUE; + GST_DEBUG ("Found ISOFF on demand profile (2011)"); + } +} + gboolean gst_mpd_parse (GstMpdClient * client, const gchar * data, gint size) { @@ -2879,6 +2891,8 @@ gst_mpd_parse (GstMpdClient * client, const gchar * data, gint size) xmlFreeDoc (doc); } + gst_mpd_client_check_profiles (client); + return TRUE; } @@ -4293,3 +4307,9 @@ gst_media_fragment_info_clear (GstMediaFragmentInfo * fragment) g_free (fragment->uri); g_free (fragment->index_uri); } + +gboolean +gst_mpd_client_has_isoff_ondemand_profile (GstMpdClient * client) +{ + return client->profile_isoff_ondemand; +} diff --git a/ext/dash/gstmpdparser.h b/ext/dash/gstmpdparser.h index 8b907762d3..60433571b2 100644 --- a/ext/dash/gstmpdparser.h +++ b/ext/dash/gstmpdparser.h @@ -471,6 +471,9 @@ struct _GstMpdClient gchar *mpd_uri; /* manifest file URI */ gchar *mpd_base_uri; /* base URI for resolving relative URIs. * this will be different for redirects */ + + /* profiles */ + gboolean profile_isoff_ondemand; }; /* Basic initialization/deinitialization functions */ @@ -545,6 +548,9 @@ guint gst_mpdparser_get_list_and_nb_of_audio_language (GstMpdClient *client, GLi gint64 gst_mpd_client_calculate_time_difference (const GstDateTime * t1, const GstDateTime * t2); +/* profiles */ +gboolean gst_mpd_client_has_isoff_ondemand_profile (GstMpdClient *client); + G_END_DECLS #endif /* __GST_MPDPARSER_H__ */