[gst-devel] CPU usage 100% in fakesrc example from manual

Tim Muller t.i.m at zen.co.uk
Tue Jun 5 18:48:40 CEST 2007


Riccardo Corona <coronariccardo at gmail.com> wrote :

> Hi,I've tried the fakesrc example from 
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-data-spoof.html
> it works well and display black & white images but it also
> use all the cpu.Is there a way to avoid this 
> behaviour?

Two problems here:

 (a) fakesrc will send a newsegment event in BYTES format,
     not TIME format (which you could probably work around
     by using gst_base_src_set_format() after creating the
     fakesrc element (needs linking against libgstbase-0.10).

 (b) the example doesn't set timestamps on the buffers it
     pushes out in the handoff callback.

Probably not really a very good example :)

Cheers
 -Tim









More information about the gstreamer-devel mailing list