Improving Internal Diagnostics?

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Jan 9 13:44:37 PST 2013


On Wed, 2013-01-09 at 14:13 -0500, Stirling Westrup wrote:

> I just had to track down a pipeline problem that came from a failure
> to link two elements.
> 
> gst_element_link() only returns a boolean true/false which doesn't
> provide much info on WHY the link failed.
> Even if I wrote my own version that calls gst_pad_link(), that only
> returns an enum, and its not exactly clear from the documentation what
> conditions cause what results.
> 
> When I ran my program under full debug at level 8, I was able to
> clearly find the root cause. The pad diagnostics listed the source
> caps, the target caps, and said they were incompatible. *THAT* is the
> kind of internal diagnostic I'd like to be able to receive. I'd even
> happily write my own element linking function that took a GError ** to
> fill out with appropriate info in case of failure, but I have NO IDEA
> how to obtain such diagnostics using the current API.
> 
> Can anyone give me any pointers?

With a bit of experience, you know what to grep the debug log for.

You can't currently easily obtain that information via API (other than
querying caps yourself and checking).

It constitutes a programming error, but it is certainly something we
have plans to improve.

There's bug https://bugzilla.gnome.org/show_bug.cgi?id=350545 for this,
and I have some ideas how to do it, hopefully in the 1.3.x development
cycle.

Cheers
 -Tim



More information about the gstreamer-devel mailing list