mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/gstelementfactory.*: API: gst_element_factory_has_interface()
Original commit message from CVS: * 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.
This commit is contained in:
parent
d53d6fb8a8
commit
2906fa0f47
3 changed files with 38 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
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:
|
||||
|
|
|
@ -649,3 +649,31 @@ gst_element_factory_get_uri_protocols (GstElementFactory * factory)
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -146,6 +146,8 @@ guint gst_element_factory_get_num_pad_templates (GstElementFactory *factory);
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue