high cpu usage with leaky queue

Erik Andresen erik at vontaene.de
Tue Sep 10 02:38:23 PDT 2013


Hi,

Thanks for pointing that out. Indeed when replacing videotestsrc with
v4l2src the cpu usage dropped.
The part which I still do not understand: Why isn't the framerate of
videotestsrc limited by the caps on its src pad?

videotestsrc ! "video/x-raw,framerate=1/1" ! queue leaky=2 ! fakesink
sync=true

greetings,
Erik


Am 10.09.2013 11:19, schrieb Tim-Philipp Müller:
> On Tue, 2013-09-10 at 10:57 +0200, Erik Andresen wrote:
> 
> Hi Erik,
> 
>> When I insert a leaky queue in a pipeline I get 100% CPU usage on one
>> core. This happens with GStreamer 0.10.36 and 1.0.9, reproducible with
>> the following test-pipelines:
>>
>> gst-launch-0.10 -v videotestsrc ! queue leaky=2 !
>> "video/x-raw-yuv,framerate=1/1" ! fakesink sync=true
>>
>> gst-launch-1.0 -v videotestsrc ! "video/x-raw,framerate=1/1" ! queue
>> leaky=2 ! fakesink sync=true
>>
>> Is this a bug or am I doing something wrong?
> 
> Neither, it's the expected behaviour :)
> 
> videotestsrc will by default produce buffers as fast as it possible can
> (using as much cpu as possible). It doesn't sync to anything or wait for
> anything, it just does while (running) push_buffer;
> 
> fakesink you made to sync to the clock, so it will only consume a
> certain number of frames from the queue (25 fps or so).
> 
> But since you made the queue leaky, the queue will never block (and thus
> throttle) the upstream videotestsrc, it will just drop the buffers and
> let videotestsrc produce another one.
> 
> Cheers
>  -Tim 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130910/c5ae5be9/attachment.pgp>


More information about the gstreamer-devel mailing list