From: <wt...@ke...> - 2007-09-28 10:15:36
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Fri Sep 28 2007 10:15:38 UTC Log message: Patch by: Felipe Contreras <felipe dot contreras at gmail dot com> * plugins/elements/gstqueue.c: (gst_queue_handle_sink_event): First patch of code cleanups, use the macros and right arguments in the macros to signal and lock the queue. See #480858. Modified files: . : ChangeLog plugins/elements: gstqueue.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.3438&r2=1.3439 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/plugins/elements/gstqueue.c.diff?r1=1.202&r2=1.203 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.3438 retrieving revision 1.3439 diff -u -d -r1.3438 -r1.3439 --- ChangeLog 26 Sep 2007 18:06:41 -0000 1.3438 +++ ChangeLog 28 Sep 2007 10:15:21 -0000 1.3439 @@ -1,3 +1,11 @@ +2007-09-28 Wim Taymans <wim...@gm...> + + Patch by: Felipe Contreras <felipe dot contreras at gmail dot com> + * plugins/elements/gstqueue.c: (gst_queue_handle_sink_event): + First patch of code cleanups, use the macros and right arguments in the + macros to signal and lock the queue. See #480858. 2007-09-26 Wim Taymans <wim...@gm...> * gst/gstbus.c: (poll_func): Index: gstqueue.c RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstqueue.c,v retrieving revision 1.202 retrieving revision 1.203 diff -u -d -r1.202 -r1.203 --- gstqueue.c 21 Sep 2007 14:37:38 -0000 1.202 +++ gstqueue.c 28 Sep 2007 10:15:23 -0000 1.203 @@ -142,23 +142,23 @@ } G_STMT_END #define GST_QUEUE_WAIT_DEL_CHECK(q, label) G_STMT_START { \ - STATUS (queue, q->sinkpad, "wait for DEL"); \ - g_cond_wait (q->item_del, queue->qlock); \ + STATUS (q, q->sinkpad, "wait for DEL"); \ + g_cond_wait (q->item_del, q->qlock); \ if (q->srcresult != GST_FLOW_OK) { \ - STATUS (queue, q->srcpad, "received DEL wakeup"); \ + STATUS (q, q->srcpad, "received DEL wakeup"); \ goto label; \ } \ - STATUS (queue, q->sinkpad, "received DEL"); \ + STATUS (q, q->sinkpad, "received DEL"); \ #define GST_QUEUE_WAIT_ADD_CHECK(q, label) G_STMT_START { \ - STATUS (queue, q->srcpad, "wait for ADD"); \ + STATUS (q, q->srcpad, "wait for ADD"); \ g_cond_wait (q->item_add, q->qlock); \ - STATUS (queue, q->srcpad, "received ADD wakeup"); \ + STATUS (q, q->srcpad, "received ADD wakeup"); \ - STATUS (queue, q->srcpad, "received ADD"); \ + STATUS (q, q->srcpad, "received ADD"); \ #define GST_QUEUE_SIGNAL_DEL(q) G_STMT_START { \ @@ -742,8 +742,8 @@ GST_QUEUE_MUTEX_LOCK (queue); queue->srcresult = GST_FLOW_WRONG_STATE; /* unblock the loop and chain functions */ - g_cond_signal (queue->item_add); - g_cond_signal (queue->item_del); + GST_QUEUE_SIGNAL_ADD (queue); + GST_QUEUE_SIGNAL_DEL (queue); GST_QUEUE_MUTEX_UNLOCK (queue); /* make sure it pauses, this should happen since we sent @@ -1291,14 +1291,14 @@ * the _chain function, it might have more room now * to store the buffer/event in the queue */ #define QUEUE_CAPACITY_CHANGE(q)\ - g_cond_signal (queue->item_del); + GST_QUEUE_SIGNAL_DEL (q); /* Changing the minimum required fill level must * wake up the _loop function as it might now * be able to preceed. */ #define QUEUE_THRESHOLD_CHANGE(q)\ - g_cond_signal (queue->item_add); + GST_QUEUE_SIGNAL_ADD (q); static void gst_queue_set_property (GObject * object, |