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
parent 9df69622
common @ 4dab7609
Subproject commit 8579ce0ed656e0c512b37ff70bebd54cab4d4e7d
Subproject commit 4dab76096cb84988dc2b6366cf5bd964fe5857d7
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment