This chapter contains a fairly random selection of things that can be useful to keep in mind when writing GStreamer-based applications. It's up to you how much you're going to use the information provided here. We will shortly discuss how to debug pipeline problems using GStreamer applications. Also, we will touch upon how to acquire knowledge about plugins and elements and how to test simple pipelines before building applications around them.
Always add a
GstBus handler to your
pipeline. Always report errors in your application, and try
to do something with warnings and information messages, too.
Always check return values of GStreamer functions. Especially,
check return values of
Dereference return values of all functions returning a non-base
type, such as
gst_element_get_pad (). Also,
always free non-const string returns, such as
Always use your pipeline object to keep track of the current state
of your pipeline. Don't keep private variables in your application.
Also, don't update your user interface if a user presses the
"play" button. Instead, listen for the
"state-changed" message on the
GstBus and only update the user interface
whenever this message is received.
Report all bugs that you find in GStreamer bugzilla at http://bugzilla.gnome.org/.