summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-09-13 15:47:33 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-09-13 15:47:33 +0000
commiteb01d6187ada353403a3e8462bbda19c621173b5 (patch)
tree092010154f969400520e458a1c2f2ed7f31dd567
parent2434fa9ebfe4854923eafde69a2b9686dbe62d69 (diff)
downloadgstreamer-eb01d6187ada353403a3e8462bbda19c621173b5.tar.gz
Make interface hack work with multiple interfaces per element
Original commit message from CVS: Make interface hack work with multiple interfaces per element
-rw-r--r--gst/gstinterface.c8
-rw-r--r--gst/gstinterface.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/gst/gstinterface.c b/gst/gstinterface.c
index 4c1245275d..862a37fab6 100644
--- a/gst/gstinterface.c
+++ b/gst/gstinterface.c
@@ -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;
}
}
diff --git a/gst/gstinterface.h b/gst/gstinterface.h
index 4024fd283a..137b6ccda8 100644
--- a/gst/gstinterface.h
+++ b/gst/gstinterface.h
@@ -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) \