gst-plugins-bad: hlsdemux: post a message in the bus when the playlist changes
Sebastian Dröge
slomo at kemper.freedesktop.org
Wed Mar 30 01:07:42 PDT 2011
Module: gst-plugins-bad
Branch: master
Commit: 42470cd31316528c6a89d6ac33be33c908e91fde
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=42470cd31316528c6a89d6ac33be33c908e91fde
Author: Andoni Morales Alastruey <ylatuya at gmail.com>
Date: Sat Mar 12 13:32:57 2011 +0100
hlsdemux: post a message in the bus when the playlist changes
---
gst/hls/gsthlsdemux.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index b9235ec..4513ef0 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -849,6 +849,7 @@ static gboolean
gst_hls_demux_change_playlist (GstHLSDemux * demux, gboolean is_fast)
{
GList *list;
+ GstStructure *s;
if (is_fast)
list = g_list_next (demux->client->main->lists);
@@ -866,6 +867,12 @@ gst_hls_demux_change_playlist (GstHLSDemux * demux, gboolean is_fast)
GST_INFO_OBJECT (demux, "Client is %s, switching to bitrate %d",
is_fast ? "fast" : "slow", demux->client->current->bandwidth);
+ s = gst_structure_new ("playlist",
+ "uri", G_TYPE_STRING, demux->client->current->uri,
+ "bitrate", G_TYPE_INT, demux->client->current->bandwidth, NULL);
+ gst_element_post_message (GST_ELEMENT_CAST (demux),
+ gst_message_new_element (GST_OBJECT_CAST (demux), s));
+
return TRUE;
}
More information about the gstreamer-commits
mailing list