Documentation for GST_IS_ELEMENT

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Apr 29 09:56:14 PDT 2013


On Mon, 2013-04-29 at 18:45 +0200, Sebastian Dröge wrote:


> They basically do what the name suggests, GST_IS_ELEMENT() does a
> runtime check if the pointer passed is a GstElement* or one of the
> subclasses... GST_ELEMENT() is a cast to GstElement* with a runtime type
> check first, and if that check fails the macro returns NULL.

.. returns FALSE, rather.

The IS_FOO macros will only work with either NULL pointers or valid
GObjects (GTypeInstances to be precise). If you pass random pointers /
already-freed objects or non-objects to them, they may either return
FALSE or crash.

Cheers
 -Tim



More information about the gstreamer-devel mailing list