mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
mssmanifest: store the language of the stream
https://bugzilla.gnome.org/show_bug.cgi?id=712358
This commit is contained in:
parent
67f3190301
commit
d6a9f17d8a
2 changed files with 11 additions and 0 deletions
|
@ -42,6 +42,7 @@ GST_DEBUG_CATEGORY_EXTERN (mssdemux_debug);
|
|||
|
||||
#define MSS_PROP_BITRATE "Bitrate"
|
||||
#define MSS_PROP_DURATION "d"
|
||||
#define MSS_PROP_LANGUAGE "Language"
|
||||
#define MSS_PROP_NUMBER "n"
|
||||
#define MSS_PROP_STREAM_DURATION "Duration"
|
||||
#define MSS_PROP_TIME "t"
|
||||
|
@ -74,6 +75,7 @@ struct _GstMssStream
|
|||
GList *qualities;
|
||||
|
||||
gchar *url;
|
||||
gchar *lang;
|
||||
|
||||
GList *current_fragment;
|
||||
GList *current_quality;
|
||||
|
@ -149,6 +151,7 @@ _gst_mss_stream_init (GstMssStream * stream, xmlNodePtr node)
|
|||
|
||||
/* get the base url path generator */
|
||||
stream->url = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_URL);
|
||||
stream->lang = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_LANGUAGE);
|
||||
|
||||
for (iter = node->children; iter; iter = iter->next) {
|
||||
if (node_has_type (iter, MSS_NODE_STREAM_FRAGMENT)) {
|
||||
|
@ -265,6 +268,7 @@ gst_mss_stream_free (GstMssStream * stream)
|
|||
g_list_free_full (stream->qualities,
|
||||
(GDestroyNotify) gst_mss_stream_quality_free);
|
||||
xmlFree (stream->url);
|
||||
xmlFree (stream->lang);
|
||||
g_regex_unref (stream->regex_position);
|
||||
g_regex_unref (stream->regex_bitrate);
|
||||
g_free (stream);
|
||||
|
@ -1186,3 +1190,9 @@ gst_buffer_from_hex_string (const gchar * s)
|
|||
gst_buffer_unmap (buffer, &info);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
gst_mss_stream_get_lang (GstMssStream * stream)
|
||||
{
|
||||
return stream->lang;
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ GstClockTime gst_mss_stream_get_fragment_gst_timestamp (GstMssStream * stream);
|
|||
GstClockTime gst_mss_stream_get_fragment_gst_duration (GstMssStream * stream);
|
||||
GstFlowReturn gst_mss_stream_advance_fragment (GstMssStream * stream);
|
||||
gboolean gst_mss_stream_seek (GstMssStream * stream, guint64 time);
|
||||
const gchar * gst_mss_stream_get_lang (GstMssStream * stream);
|
||||
|
||||
const gchar * gst_mss_stream_type_name (GstMssStreamType streamtype);
|
||||
|
||||
|
|
Loading…
Reference in a new issue