+2007-07-25 Wim Taymans <wim.taymans@gmail.com>
+
+ * gst/gstelementfactory.c: (gst_element_factory_has_interface):
+ * gst/gstelementfactory.h:
+ API: gst_element_factory_has_interface()
+ Added method to check if an element factory implements a named
+ interface.
+
2007-07-25 Stefan Kost <ensonic@users.sf.net>
* configure.ac:
return factory->uri_protocols;
}
+
+/**
+ * gst_element_factory_has_interface:
+ * @factory: a #GstElementFactory
+ * @interfacename: an interface name
+ *
+ * Check if @factory implements the interface with name @interfacename.
+ *
+ * Returns: #TRUE when @factory implement the interface.
+ *
+ * Since: 0.10.14
+ */
+gboolean
+gst_element_factory_has_interface (GstElementFactory * factory,
+ const gchar * interfacename)
+{
+ GList *walk;
+
+ g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), FALSE);
+
+ for (walk = factory->interfaces; walk; walk = g_list_next (walk)) {
+ gchar *iname = (gchar *) walk->data;
+
+ if (!strcmp (iname, interfacename))
+ return TRUE;
+ }
+ return FALSE;
+}
G_CONST_RETURN GList * gst_element_factory_get_static_pad_templates (GstElementFactory *factory);
gint gst_element_factory_get_uri_type (GstElementFactory *factory);
gchar ** gst_element_factory_get_uri_protocols (GstElementFactory *factory);
+gboolean gst_element_factory_has_interface (GstElementFactory *factory,
+ const gchar *interfacename);
GstElement* gst_element_factory_create (GstElementFactory *factory,
const gchar *name);