[gst-devel] block at line 1547 in gstqueue2.c

Wang Xuefeng-W20711 xfwang at motorola.com
Tue Apr 1 04:54:28 CEST 2008

Hi all,

Who can tell me why the following code segment in gstqueue2.c is needed?
When I use queue2 for local playback, it's OK to seek forward/rewind.
But When I use queue2 for network playback, such as progressive
download, I meet a problem, it will block at line 1547 if seeking to the
position where data hasn't been downloaded yet. I expect it to return
immediately, not block.

   1543       GST_QUEUE_MUTEX_LOCK (queue);
   1544       /* we have to wait until the upstream element is at least
paused, which
   1545        * happened when we received a first item. */
   1546       while (gst_queue_is_empty (queue)) {
   1547         GST_QUEUE_WAIT_ADD_CHECK (queue, flushing);
   1548       }
   1549       GST_QUEUE_MUTEX_UNLOCK (queue); 

Best Regards
Wang Xuefeng 

More information about the gstreamer-devel mailing list