[gst-devel] GstInterface

in7y118 at public.uni-hamburg.de in7y118 at public.uni-hamburg.de
Wed Oct 15 08:39:08 CEST 2003


Quoting Ronald Bultje <rbultje at ronald.bitfreak.net>:

> if (!GST_IS_MIXER (element))
>   return;
> mixer = GST_MIXER (element);
> if (!gst_mixer_supported (mixer))
>   return;
> ..
> 
> And I can omit the second check because it's automated in the first
> check. That's the advantage, I automate all checking into one call. I
> like that. That's the _only_ reason why I did it.
> 
You know that in this example the _same_ element could return TRUE or FALSE 
depending on the device property or the element's state, right?
Which means you can't rely on typecasts anymore.
That does not look like a good idea to me. Neither in GStreamer nor in glib.

Benjamin




More information about the gstreamer-devel mailing list