[gst-devel] Re: [gst-cvs] jdahlin gst-plugins: gst-plugins/ gst-plugins/sys/v4l/

Johan Dahlin johan at fluendo.com
Thu Aug 12 14:16:02 CEST 2004


> > It also broke the python bindings.
> Python problem. Fix python.
> 
> Revert the patch please.

No, its not a python problem, the critical I get is inside of gstreamer,
in the interface supporting code. I don't want to revert it because I'm
absolutely positive that it is correct:

GInterfaces *are* determined at compile time. You cannot just tell
GObject to only implement a certain interface if the element is in a
specific state.

When you create a new GType, you specify a number of given interfaces,
in it's compile/typelib function (eg, get_type). It has nothing to do
with the instance (the GObject). It's not very far from saying that a
specific class should inherit different classes depending on the state
of an instance created of it. That's not really possible in GObject.
A type supports a number of different interfaces or it doesn't. It's
determined at the creation time of the type. It can't change afterwards,
and there is no reason to *pretend* it does.

I'm not sure what you were trying to achieve with the checks, they might
be useful, but its not the correct place to do so.

If this breaks any existing code then the code should be fixed and a new
interface (getter for some internal element state for instance)
providing the same information should be exposed.


-- 
Johan Dahlin <johan at fluendo.com>





More information about the gstreamer-devel mailing list