From: Thomas Vander Stichele Date: Thu, 2 Feb 2006 08:53:27 +0000 (+0000) Subject: comment on my understanding X-Git-Tag: 1.19.3~511^2~12247 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10cf7276d10f16fa6bbab5c68347b4b92cb2c9e5;p=platform%2Fupstream%2Fgstreamer.git comment on my understanding Original commit message from CVS: comment on my understanding --- diff --git a/tests/check/pipelines/theoraenc.c b/tests/check/pipelines/theoraenc.c index c5ed7be..27ebc33 100644 --- a/tests/check/pipelines/theoraenc.c +++ b/tests/check/pipelines/theoraenc.c @@ -33,6 +33,8 @@ static GMutex *lock = NULL; static GstBuffer *buf = NULL; static gulong id; +/* called for every buffer. Waits until the global "buf" variable is unset, + * then sets it to the buffer received, and signals. */ static gboolean buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused) { @@ -41,6 +43,7 @@ buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused) while (buf != NULL) g_cond_wait (cond, lock); + /* increase the refcount because we store it globally for others to use */ buf = gst_buffer_ref (buffer); g_cond_signal (cond); @@ -62,6 +65,7 @@ start_pipeline (GstElement * bin, GstPad * pad) } +/* waits until the probe receives a buffer. will catch every buffer */ static GstBuffer * get_buffer (GstElement * bin, GstPad * pad) {