strange this didn't get commited on a regular commit

Original commit message from CVS:
strange this didn't get commited on a regular commit
This commit is contained in:
Thomas Vander Stichele 2002-06-13 15:08:52 +00:00
parent 9df69622d9
commit 319a6a3672
3 changed files with 24 additions and 2 deletions

2
common

@ -1 +1 @@
Subproject commit 8579ce0ed656e0c512b37ff70bebd54cab4d4e7d
Subproject commit 4dab76096cb84988dc2b6366cf5bd964fe5857d7

View file

@ -346,8 +346,8 @@ gboolean gst_element_factory_can_sink_caps (GstElementFactory *factory,
GstElement* gst_element_factory_create (GstElementFactory *factory,
const gchar *name);
/* FIXME this name is wrong, probably so is the one above it */
GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name);
GstElement* gst_element_factory_make_or_warn (const gchar *factoryname, const gchar *name);
void gst_element_factory_set_rank (GstElementFactory *factory, guint16 rank);

View file

@ -259,6 +259,28 @@ gst_element_factory_make (const gchar *factoryname, const gchar *name)
return element;
}
/**
* gst_element_factory_make_or_warn:
* @factoryname: a named factory to instantiate
* @name: name of new element
*
* Create a new element of the type defined by the given element factory
* using #gst_element_factory_make.
* Will use g_warning if the element could not be created.
*
* Returns: new #GstElement (or NULL if unable to create element)
*/
GstElement*
gst_element_factory_make_or_warn (const gchar *factoryname, const gchar *name)
{
GstElement *element = gst_element_factory_make (factoryname, name);
if (element == NULL)
g_warning ("Could not create element from factory %s !\n", factoryname);
return element;
}
/**
* gst_element_factory_add_pad_template :
* @elementfactory: factory to add the src id to