Make interface hack work with multiple interfaces per element

Original commit message from CVS:
Make interface hack work with multiple interfaces per element
This commit is contained in:
Ronald S. Bultje 2003-09-13 15:47:33 +00:00
parent 2434fa9ebf
commit eb01d6187a
2 changed files with 7 additions and 4 deletions

View file

@ -29,7 +29,8 @@
#include "gstlog.h"
static void gst_interface_class_init (GstInterfaceClass *ifklass);
static gboolean gst_interface_supported_default (GstInterface *iface);
static gboolean gst_interface_supported_default (GstInterface *iface,
GType iface_type);
GType
gst_interface_get_type (void)
@ -65,7 +66,8 @@ gst_interface_class_init (GstInterfaceClass *klass)
}
static gboolean
gst_interface_supported_default (GstInterface *interface)
gst_interface_supported_default (GstInterface *interface,
GType iface_type)
{
/* Well, if someone didn't set the virtual function,
* then something is clearly wrong. So big no-no here */
@ -96,7 +98,7 @@ gst_element_implements_interface (GstElement *element,
ifclass = GST_INTERFACE_GET_CLASS (iface);
if (ifclass->supported != NULL &&
ifclass->supported (iface) == TRUE) {
ifclass->supported (iface, iface_type) == TRUE) {
return TRUE;
}
}

View file

@ -50,7 +50,8 @@ typedef struct _GstInterfaceClass {
GTypeInterface parent;
/* virtual functions */
gboolean (* supported) (GstInterface *iface);
gboolean (* supported) (GstInterface *iface,
GType iface_type);
} GstInterfaceClass;
#define GST_INTERFACE_CHECK_INSTANCE_CAST(obj, type, cast_t) \