[gst-devel] Better assertions
Erik Walthinsen
omega at temple-baptist.com
Thu Apr 19 19:29:49 CEST 2001
I keep running into cases where I get several CRITICAL errors telling me
that peer != NULL, or somesuch. What I really want are assertion macros
that are aware of the GStreamer world. That means something like:
gst_return_if_null(pad,peer);
If peer is NULL, it might print:
** CRITICAL **: file gstpad.c: line 1304 (gst_pad_push): \
assertion peer != NULL failed, in pad "mpeg2parse:video_00"
That's a lot more useful than just peer != NULL. There are only a few of
these macros we need, and actually the code to print out the parent object
already exists, regardless of what that object is (as long as *it* isn't
NULL...).
Thoughts?
Erik Walthinsen <omega at temple-baptist.com> - System Administrator
__
/ \ GStreamer - The only way to stream!
| | M E G A ***** http://gstreamer.net/ *****
_\ /_
More information about the gstreamer-devel
mailing list