Add static version of removed gsT_element_factory_make_or_warn()

Original commit message from CVS:
Add static version of removed gsT_element_factory_make_or_warn()
This commit is contained in:
Ronald S. Bultje 2003-11-02 23:06:23 +00:00
parent 02a374443e
commit fbaf64a46d

View file

@ -30,6 +30,19 @@ typedef struct
GstElement *bin; GstElement *bin;
} dyn_link; } dyn_link;
static GstElement *
gst_element_factory_make_or_warn (gchar *type, gchar *name)
{
GstElement *element = gst_element_factory_make (type, name);
if (!element) {
g_warning ("Failed to create element %s of type %s",
name, type);
}
return element;
}
static void static void
dynamic_link (GstPadTemplate *templ, GstPad *newpad, gpointer data) dynamic_link (GstPadTemplate *templ, GstPad *newpad, gpointer data)
{ {