mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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:
parent
2434fa9ebf
commit
eb01d6187a
2 changed files with 7 additions and 4 deletions
|
@ -29,7 +29,8 @@
|
||||||
#include "gstlog.h"
|
#include "gstlog.h"
|
||||||
|
|
||||||
static void gst_interface_class_init (GstInterfaceClass *ifklass);
|
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
|
GType
|
||||||
gst_interface_get_type (void)
|
gst_interface_get_type (void)
|
||||||
|
@ -65,7 +66,8 @@ gst_interface_class_init (GstInterfaceClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
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,
|
/* Well, if someone didn't set the virtual function,
|
||||||
* then something is clearly wrong. So big no-no here */
|
* 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);
|
ifclass = GST_INTERFACE_GET_CLASS (iface);
|
||||||
|
|
||||||
if (ifclass->supported != NULL &&
|
if (ifclass->supported != NULL &&
|
||||||
ifclass->supported (iface) == TRUE) {
|
ifclass->supported (iface, iface_type) == TRUE) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,8 @@ typedef struct _GstInterfaceClass {
|
||||||
GTypeInterface parent;
|
GTypeInterface parent;
|
||||||
|
|
||||||
/* virtual functions */
|
/* virtual functions */
|
||||||
gboolean (* supported) (GstInterface *iface);
|
gboolean (* supported) (GstInterface *iface,
|
||||||
|
GType iface_type);
|
||||||
} GstInterfaceClass;
|
} GstInterfaceClass;
|
||||||
|
|
||||||
#define GST_INTERFACE_CHECK_INSTANCE_CAST(obj, type, cast_t) \
|
#define GST_INTERFACE_CHECK_INSTANCE_CAST(obj, type, cast_t) \
|
||||||
|
|
Loading…
Reference in a new issue