[gst-cvs] gstreamer: multiqueue: Remove unused variable and simplify code
Edward Hervey
bilboed at kemper.freedesktop.org
Fri Oct 8 04:31:35 PDT 2010
Module: gstreamer
Branch: master
Commit: 518364e7acbcb4f917943060440323fa554f9631
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=518364e7acbcb4f917943060440323fa554f9631
Author: Edward Hervey <bilboed at bilboed.com>
Date: Fri Oct 8 12:54:52 2010 +0200
multiqueue: Remove unused variable and simplify code
oldid was only used when we were doing multiple pops per loop.
---
plugins/elements/gstmultiqueue.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index bd54f56..38d263e 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -1016,7 +1016,6 @@ gst_multi_queue_loop (GstPad * pad)
GstMultiQueue *mq;
GstMiniObject *object;
guint32 newid;
- guint32 oldid = G_MAXUINT32;
GstFlowReturn result;
sq = (GstSingleQueue *) gst_pad_get_element_private (pad);
@@ -1036,16 +1035,14 @@ gst_multi_queue_loop (GstPad * pad)
object = gst_multi_queue_item_steal_object (item);
gst_multi_queue_item_destroy (item);
- GST_LOG_OBJECT (mq, "SingleQueue %d : newid:%d , oldid:%d",
- sq->id, newid, oldid);
+ GST_LOG_OBJECT (mq, "SingleQueue %d : newid:%d", sq->id, newid);
/* If we're not-linked, we do some extra work because we might need to
* wait before pushing. If we're linked but there's a gap in the IDs,
* or it's the first loop, or we just passed the previous highid,
* we might need to wake some sleeping pad up, so there's extra work
* there too */
- if (sq->srcresult == GST_FLOW_NOT_LINKED ||
- (oldid == G_MAXUINT32) || (newid != (oldid + 1)) || oldid > mq->highid) {
+ if (sq->srcresult == GST_FLOW_NOT_LINKED) {
GST_LOG_OBJECT (mq, "CHECKING sq->srcresult: %s",
gst_flow_get_name (sq->srcresult));
@@ -1054,10 +1051,6 @@ gst_multi_queue_loop (GstPad * pad)
/* Update the nextid so other threads know when to wake us up */
sq->nextid = newid;
- /* Update the oldid (the last ID we output) for highid tracking */
- if (oldid != G_MAXUINT32)
- sq->oldid = oldid;
-
if (sq->srcresult == GST_FLOW_NOT_LINKED) {
/* Go to sleep until it's time to push this buffer */
@@ -1098,6 +1091,7 @@ gst_multi_queue_loop (GstPad * pad)
/* Try to push out the new object */
result = gst_single_queue_push_one (mq, sq, object);
sq->srcresult = result;
+ sq->oldid = newid;
if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED
&& result != GST_FLOW_UNEXPECTED)
@@ -1106,8 +1100,6 @@ gst_multi_queue_loop (GstPad * pad)
GST_LOG_OBJECT (mq, "AFTER PUSHING sq->srcresult: %s",
gst_flow_get_name (sq->srcresult));
- oldid = newid;
-
return;
out_flushing:
More information about the Gstreamer-commits
mailing list