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

Johan Dahlin johan at fluendo.com
Fri Aug 13 01:38:06 CEST 2004


> If you don't understand, read the bits about GstImplementsInterface in the
> plugin writer's guide or ask me to describe why it is needed and what it
> does. Simply removing code because you don't understand why it's there is
> never the right solution.

To be practical, what I cannot do is to cast an a v4lsrc, which
implements GstTuner (eg GstTuner* tuner = GST_TUNER(v4lsrc)), unless the
device is open.

GstImplementsInterface is totally broken, its a layer on GInterface that
pretends that different instances implements different interfaces of the
same GType. For something like GstImplementsInterface to work, glib
needs to be changed seriously to allow addition and removal of
interfaces in runtime. It doesn't at the moment and let's not pretend it
does.

The GType of v4lelement says it implements the GST_TUNER_TYPE_INTERFACE,
it cannot change, g_type_interfaces() will always include its GType.
No reason to pretend otherwise in casts (which in the end uses
gst_v4l_iface_supported)

> Please revert.

Give a good reason why I should, which you haven't done yet.


-- 
Johan Dahlin <johan at fluendo.com>





More information about the gstreamer-devel mailing list