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

Johan Dahlin johan at fluendo.com
Fri Aug 13 10:34:05 CEST 2004


> And how do we do runtime checks then? That's what GstImplementsInterface
> solves. Nothing more than that. GInterface doesn't solve it, so we need
> something else. What alternative solution did you have in mind?

enum + set accessor:

typedef enum {
  GST_V4LSRC_SUPPORTS_OVERLAY ...
  GST_V4LSRC_SUPPORTS_TUNER   ...
  ....
} GstV4lFeaturesMask;

Public getter:

GstV4lFeaturesMask gst_v4lsrc_get_features (GstV4lsrc *)

and a private setter

So if the user tries to call a xoverlay function on an element not
support it, it should either silently return a bad value or 
 (preferably) raise an error of some kind, that can be catched by user
code.
-- 
Johan Dahlin <johan at fluendo.com>





More information about the gstreamer-devel mailing list