title: How to debug my C gstreamer code?
body: <p>I succesfully program and execute the <code>helloworld.c</code> in the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/manual.pdf" rel="nofollow">Application Development Manual</a> page 43. It works very well. </p>
  
  <p>The compilation was done using this command line </p>
  
  <pre><code>gcc -Wall helloworld.c -o helloworld $(pkg-conﬁg --cﬂags --libs gstreamer-1.0)
  </code></pre>
  
  <p>I'm using the default gstreamer installed on my <code>ubuntu 12.0.4</code>.</p>
  
  <p>I'm concerned about debugging my program and I know that this can be achieved using command line option <code>GST_DEBUG</code>. Here is an example where the debug report of the <code>qtdemux</code>is generated in a csv file.</p>
  
  <pre><code>GST_DEBUG=qtdemux:5 gst-launch filesrc location=/home/pub_Irma.mp4 ! qtdemux name=demuxer demuxer. ! queue ! faad ! audioconvert ! audioresample ! autoaudiosink demuxer. ! queue ! ffdec_h264 ! ffmpegcolorspace ! autovideosink 2&gt; &gt; (tee /media/thesis/log_pub.csv)
  </code></pre>
  
  <p>But since I'm not using <code>gst-launch</code>, I'm wonder how to do the same programmatically ? what is missing in manual code to produce a debug report ? Or is there a special parameter to set when compiling or/and executing the program ?</p>
  
  <p>I've tried compiling this way</p>
  
  <pre><code>gcc $2 -o $3 -Wall `pkg-config --cflags --libs gstreamer-0.10 --enable-gst-debug`
  </code></pre>
  
  <p>but without success</p>
  
  <p>thanks for any reply!</p>