GstStreamType stream_type =
gst_stream_type_from_mss_type (gst_mss_stream_get_type
(manifeststream));
- const gchar *lang, *stream_id = gst_stream_type_get_name (stream_type);
- gchar *name;
+ const gchar *lang = gst_mss_stream_get_lang (manifeststream);
+ const gchar *name = gst_mss_stream_get_name (manifeststream);
+ gchar *stream_id;
GstCaps *caps;
GstTagList *tags = NULL;
- name = g_strdup_printf ("mss-stream-%s", stream_id);
- mss_stream = g_object_new (GST_TYPE_MSS_DEMUX_STREAM, "name", name, NULL);
- g_free (name);
+ if (name)
+ stream_id =
+ g_strdup_printf ("mss-stream-%s-%s",
+ gst_stream_type_get_name (stream_type),
+ gst_mss_stream_get_name (manifeststream));
+ else if (lang)
+ stream_id =
+ g_strdup_printf ("mss-stream-%s-%s",
+ gst_stream_type_get_name (stream_type), lang);
+ else
+ stream_id =
+ g_strdup_printf ("mss-stream-%s",
+ gst_stream_type_get_name (stream_type));
+
+ mss_stream =
+ g_object_new (GST_TYPE_MSS_DEMUX_STREAM, "name", stream_id, NULL);
stream = GST_ADAPTIVE_DEMUX2_STREAM_CAST (mss_stream);
stream->stream_type = stream_type;
caps = gst_mss_stream_get_caps (mss_stream->manifest_stream);
gst_adaptive_demux2_stream_set_caps (stream, create_mss_caps (mss_stream,
caps));
- lang = gst_mss_stream_get_lang (mss_stream->manifest_stream);
if (lang != NULL)
tags = gst_tag_list_new (GST_TAG_LANGUAGE_CODE, lang, NULL);
GST_STREAM_FLAG_NONE, (gchar *) stream_id, create_mss_caps (mss_stream,
caps), tags);
+ g_free (stream_id);
gst_adaptive_demux2_add_stream (demux, stream);
gst_adaptive_demux2_stream_add_track (stream, track);
gst_adaptive_demux_track_unref (track);
#define MSS_PROP_DURATION "d"
#define MSS_PROP_DVR_WINDOW_LENGTH "DVRWindowLength"
#define MSS_PROP_LANGUAGE "Language"
+#define MSS_PROP_NAME "Name"
#define MSS_PROP_NUMBER "n"
#define MSS_PROP_REPETITIONS "r"
#define MSS_PROP_STREAM_DURATION "Duration"
gchar *url;
gchar *lang;
+ gchar *name;
GstMssFragmentParser fragment_parser;
stream->xmlnode = node;
/* get the base url path generator */
+ stream->name = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_NAME);
stream->url = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_URL);
stream->lang = (gchar *) xmlGetProp (node, (xmlChar *) MSS_PROP_LANGUAGE);
* of the manifest.
*/
+ GST_DEBUG ("lang '%s' url %s", stream->lang, stream->url);
GST_DEBUG ("Live stream: %s, look-ahead fragments: %" G_GUINT64_FORMAT,
manifest->is_live ? "yes" : "no", manifest->look_ahead_fragment_count);
stream->has_live_fragments = manifest->is_live
&& manifest->look_ahead_fragment_count;
for (iter = node->children; iter; iter = iter->next) {
+ GST_LOG ("Handling child '%s'", iter->name);
if (node_has_type (iter, MSS_NODE_STREAM_FRAGMENT)) {
gst_mss_fragment_list_builder_add (&builder, iter);
} else if (node_has_type (iter, MSS_NODE_STREAM_QUALITY)) {
g_list_free_full (stream->qualities,
(GDestroyNotify) gst_mss_stream_quality_free);
xmlFree (stream->url);
+ xmlFree (stream->name);
xmlFree (stream->lang);
g_regex_unref (stream->regex_position);
g_regex_unref (stream->regex_bitrate);
return stream->lang;
}
+const gchar *
+gst_mss_stream_get_name (GstMssStream * stream)
+{
+ return stream->name;
+}
+
static GstClockTime
gst_mss_manifest_get_dvr_window_length_clock_time (GstMssManifest * manifest)
{
GstFlowReturn gst_mss_stream_regress_fragment (GstMssStream * stream);
void gst_mss_stream_seek (GstMssStream * stream, gboolean forward, GstSeekFlags flags, gint64 time, gint64 * final_time);
const gchar * gst_mss_stream_get_lang (GstMssStream * stream);
+const gchar * gst_mss_stream_get_name (GstMssStream * stream);
const gchar * gst_mss_stream_type_name (GstMssStreamType streamtype);