summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30fc865)
raw | patch | inline | side by side (parent: 30fc865)
author | Wim Taymans <wim.taymans@collabora.co.uk> | |
Fri, 23 Oct 2009 01:24:24 +0000 (21:24 -0400) | ||
committer | Wim Taymans <wim@metal.(none)> | |
Tue, 27 Oct 2009 13:40:17 +0000 (14:40 +0100) |
Keep track of the last posted percent message and make sure the next percent
messages are strictly increasing.
messages are strictly increasing.
plugins/elements/gstmultiqueue.c | patch | blob | history | |
plugins/elements/gstmultiqueue.h | patch | blob | history |
index 832a13d3d51d9a95a744a618ae5b132c688098a7..70a99f97401074a5542732a093d69e50e8d19e24 100644 (file)
tmp = (size.bytes * 100) / sq->max_size.bytes;
percent = MAX (percent, tmp);
}
- percent = MIN (percent, 100);
}
if (mq->buffering) {
if (percent >= mq->high_percent) {
mq->buffering = FALSE;
}
+ /* make sure it increases */
+ percent = MAX (mq->percent, percent);
+
+ if (percent == mq->percent)
+ /* don't post if nothing changed */
+ post = FALSE;
+ else
+ /* else keep last value we posted */
+ mq->percent = percent;
} else {
if (percent < mq->low_percent) {
mq->buffering = TRUE;
+ mq->percent = percent;
post = TRUE;
}
}
index ef557ba1c94969af2414f76d2a975ad2f90c4651..ec47601d08ce67c04ec7ee21300497698a92ca28 100644 (file)
gboolean use_buffering;
gint low_percent, high_percent;
gboolean buffering;
+ gint percent;
guint32 counter; /* incoming object counter, protected with STREAM_LOCK */
guint32 highid; /* contains highest id of last outputted object */