+2006-12-18 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/qtdemux/qtdemux.c: (gst_qtdemux_post_progress),
+ (gst_qtdemux_chain):
+ Don't post BUFFERING messages in streaming mode if the stream
+ headers are behind the movie data; instead, post "progress" element
+ messages as a temporary solution. Apps might get confused and do
+ silly things to the pipeline state if they see buffering messages
+ from different sources and don't realize they come from different
+ sources (#387160).
+
2006-12-18 Jan Schmidt <thaytan@mad.scientist.com>
* configure.ac:
}
static void
-gst_qtdemux_post_buffering (GstQTDemux * demux, gint num, gint denom)
+gst_qtdemux_post_progress (GstQTDemux * demux, gint num, gint denom)
{
gint perc = (gint) ((gdouble) num * 100.0 / (gdouble) denom);
gst_element_post_message (GST_ELEMENT_CAST (demux),
- gst_message_new_custom (GST_MESSAGE_BUFFERING,
- GST_OBJECT_CAST (demux),
- gst_structure_new ("GstMessageBuffering",
- "buffer-percent", G_TYPE_INT, perc, NULL)));
+ gst_message_new_element (GST_OBJECT_CAST (demux),
+ gst_structure_new ("progress", "percent", G_TYPE_INT, perc, NULL)));
}
/* FIXME, unverified after edit list updates */
demux->offset += demux->neededbytes;
demux->neededbytes = 16;
demux->state = QTDEMUX_STATE_INITIAL;
- gst_qtdemux_post_buffering (demux, 1, 1);
+ gst_qtdemux_post_progress (demux, 1, 1);
break;
}
/* when buffering movie data, at least show user something is happening */
if (ret == GST_FLOW_OK && demux->state == QTDEMUX_STATE_BUFFER_MDAT &&
gst_adapter_available (demux->adapter) <= demux->neededbytes) {
- gst_qtdemux_post_buffering (demux, gst_adapter_available (demux->adapter),
+ gst_qtdemux_post_progress (demux, gst_adapter_available (demux->adapter),
demux->neededbytes);
}