+2007-06-28 Wim Taymans <wim@fluendo.com>
+
+ * gst/playback/gstplaybasebin.c: (make_decoder), (setup_source):
+ Small debug improvement.
+
+ * gst/playback/gstqueue2.c: (apply_segment), (update_buffering),
+ (plugin_init):
+ Tweak the rate estimation period.
+ When calculating the buffer filledness in rate estimation mode, don't
+ mix it with other metrics.
+
2007-06-28 Wim Taymans <wim@fluendo.com>
* gst/playback/gstdecodebin2.c: (gst_decode_group_new),
g_object_set_data (G_OBJECT (decoder), "pending", "1");
play_base_bin->pending++;
+ GST_DEBUG_OBJECT (play_base_bin, "created decodebin, %d pending",
+ play_base_bin->pending);
+
play_base_bin->decoders = g_slist_prepend (play_base_bin->decoders, decoder);
return decoder;
return TRUE;
}
if (is_dynamic) {
- GST_DEBUG_OBJECT (play_base_bin, "Source has dynamic output pads");
/* connect a handler for the new-pad signal */
play_base_bin->src_np_sig_id =
g_signal_connect (G_OBJECT (play_base_bin->source), "pad-added",
G_CALLBACK (source_no_more_pads), play_base_bin);
g_object_set_data (G_OBJECT (play_base_bin->source), "pending", "1");
play_base_bin->pending++;
+ GST_DEBUG_OBJECT (play_base_bin,
+ "Source has dynamic output pads, %d pending", play_base_bin->pending);
} else {
GstElement *decoder;
gst_event_parse_new_segment_full (event, &update, &rate, &arate,
&format, &start, &stop, &time);
+ GST_DEBUG_OBJECT (queue,
+ "received NEWSEGMENT update %d, rate %lf, applied rate %lf, "
+ "format %d, "
+ "%" G_GINT64_FORMAT " -- %" G_GINT64_FORMAT ", time %"
+ G_GINT64_FORMAT ", accum %" G_GINT64_FORMAT, update, rate, arate,
+ format, start, stop, time);
+
+ if (format == GST_FORMAT_BYTES) {
+ }
+
/* now configure the values, we use these to track timestamps on the
* sinkpad. */
if (format != GST_FORMAT_TIME) {
percent = 100;
} else {
/* figure out the percent we are filled, we take the max of all formats. */
- percent = GET_PERCENT (bytes);
- percent = MAX (percent, GET_PERCENT (time));
- percent = MAX (percent, GET_PERCENT (buffers));
- if (queue->use_rate_estimate)
- percent = MAX (percent, GET_PERCENT (rate_time));
+ if (queue->use_rate_estimate) {
+ percent = GET_PERCENT (rate_time);
+ } else {
+ percent = GET_PERCENT (bytes);
+ percent = MAX (percent, GET_PERCENT (time));
+ percent = MAX (percent, GET_PERCENT (buffers));
+ }
}
if (queue->is_buffering) {
queue->timer_started = FALSE;
}
+/* the interval in seconds to recalculate the rate */
+#define RATE_INTERVAL 0.2
/* Tuning for rate estimation. We use a large window for the input rate because
* it should be stable when connected to a network. The output rate is less
* stable (the elements preroll, queues behind a demuxer fill, ...) and should
* therefore adapt more quickly. */
-#define RATE_INTERVAL 0.5
#define AVG_IN(avg,val) ((avg) * 15.0 + (val)) / 16.0
#define AVG_OUT(avg,val) ((avg) * 3.0 + (val)) / 4.0
static gboolean
plugin_init (GstPlugin * plugin)
{
- GST_DEBUG_CATEGORY_INIT (queue_debug, "queue", 0, "queue element");
- GST_DEBUG_CATEGORY_INIT (queue_dataflow, "queue_dataflow", 0,
+ GST_DEBUG_CATEGORY_INIT (queue_debug, "queue2", 0, "queue element");
+ GST_DEBUG_CATEGORY_INIT (queue_dataflow, "queue2_dataflow", 0,
"dataflow inside the queue element");
#ifdef ENABLE_NLS