After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 394174 - starved loop function of leaky queue with busy source
starved loop function of leaky queue with busy source
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-08 09:30 UTC by Stefan Sauer (gstreamer, gtkdoc dev)
Modified: 2007-02-09 10:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst debug log (45.00 KB, text/plain)
2007-01-08 09:41 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
Details

Description Stefan Sauer (gstreamer, gtkdoc dev) 2007-01-08 09:30:05 UTC
imagine having a pipeline like:

v4l2src ! queue leaky=1 max-size-buffers=15 ! xvimagesink

running on a resource limmited device. The v4l2src captures at a rate, that xvimagesink can handle always (e.g. on high system load). What I observe in this scenario is that the loop_function that runs in the queue.src task is called just once (the initial frame). Later the v4l2src.src task runs and pushes buffers on the queue. The queue reports that it is full and drops (leaking). Even though that buffers are available (and thus the condition that the v4l2src.src task waits on gets triggered) the queue does not push out any buffers.

When I limmit the number of frames captured (num-buffers property), I can see that once the v4l2src stops capturing, the queue empties.

Unfortunately I have a hard time to reproduce this on an x86 system. I tried to run this with no luck:
GST_DEBUG="xvimagesink:3,queue*:4" nice -n19 gst-launch-0.10 -t videotestsrc is-live=true ! video/x-raw-yuv,width=6400,height=4800,framerate='(fraction)'30/1 ! queue leaky=1 max-size-buffers=15 max-size-time=0 max-size-bytes=0 ! videoscale ! video/x-raw-yuv,width=800,height=600,framerate='(fraction)'30/1 ! xvimagesink sync=false qos=false

attached is the log of the og running this pipeline on the embedded device:
GST_DEBUG="xvimagesink:3,queue*:4,task:4" gst-launch-0.10 v4l2src num-buffers=10 ! video/x-raw-yuv,width=176,height=144,framerate='(fraction)'15/1 ! queue leaky=1 max-size-buffers=5 max-size-time=0 max-size-bytes=0 ! xvimagesink sync=false qos=false

Please note that I modified the debug output slighly (change levels and added log statements).
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2007-01-08 09:41:10 UTC
Created attachment 79725 [details]
gst debug log

v4l2src num-buffers=30 ! video/x-raw-yuv,width=176,height=144,framerate='(fraction)'15/1 ! queue leaky=1 max-size-buffers=5 max-size-time=0 max-size-bytes=0 ! xvimagesink sync=false qos=false

num buffers need to be > queue size :)

look at around line 75
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2007-01-08 09:43:09 UTC
another observation. if I use the debug logging with high loglevel, but redirect to file or /dev/null it sort of works (extra context switches caused by syscalls). if I don't log at all, the queue.src does not run :(
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2007-01-08 15:47:45 UTC
and one more: the device uses the old linux threads :(
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2007-02-09 09:32:47 UTC
it seems to be a bug in the linux threads. adding a yield after the g_conf_signal in the queue works around the issues.