summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b6ee4f)
raw | patch | inline | side by side (parent: 0b6ee4f)
author | Wim Taymans <wim.taymans@gmail.com> | |
Thu, 28 Jun 2007 10:21:19 +0000 (10:21 +0000) | ||
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | |
Thu, 29 Oct 2009 10:17:14 +0000 (11:17 +0100) |
Original commit message from CVS:
* 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.
* 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.
gst/playback/gstqueue2.c | patch | blob | history |
index 285decc0fdfb7c95c2e175229b015cfe992c6bd5..1bbe49532955cb858aec77deb047e74c389b5ac0 100644 (file)
--- a/gst/playback/gstqueue2.c
+++ b/gst/playback/gstqueue2.c
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