problem simulating a camera using fakesrc

Philippe De Muyter phdm at macq.eu
Tue Feb 3 01:58:08 PST 2015


Hi all,

In order to test a self-written plugin, I try to simulate a camera using
fakesrc.

Here is my last attempt :

IMAGESIZE=`expr 1280 \* 1024`
FPS=25
gst-launch-1.0 -e -f fakesrc sizetype=2 sizemax=${IMAGESIZE} datarate=`expr ${FPS} \* ${IMAGESIZE}` sync=true ! myplugin ! fakesink

'myplugin' handles of course ${IMAGESIZE}-sized video buffers.

My pipeline starts correctly, and the debugging in 'myplugin' shows that
it gets 25 frames per second, and cpu usage is bounded.  But after some
time, (564 seconds if that helps) the cpu usage of the pipeline suddenly
jumps to 100%.  How can I avoid that ?

My plugin does actually nothing regarding buffer allocation or deallocation;
at the moment it only simulates some CPU load.

Here are the sink caps of my plugin :

#define SINK_CAPS "video/x-bayer,format=(string){bggr,grbg,gbrg,rggb}," \
  "width=(int)1280,height=(int)1024,framerate=(fraction)[0/1,MAX]"

  gst_element_class_add_pad_template (gstelement_class,
      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
          gst_caps_from_string (SINK_CAPS)));

Philippe

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles


More information about the gstreamer-devel mailing list