set the "name" property on pad templates
authorAndy Wingo <wingo@pobox.com>
Fri, 26 Apr 2002 15:02:34 +0000 (15:02 +0000)
committerAndy Wingo <wingo@pobox.com>
Fri, 26 Apr 2002 15:02:34 +0000 (15:02 +0000)
Original commit message from CVS:
set the "name" property on pad templates

gst/gstelementfactory.c
gst/gstpad.c

index b5969c3..00b8dda 100644 (file)
@@ -249,8 +249,8 @@ gst_element_factory_create (GstElementFactory *factory,
     oclass->padtemplates = g_list_concat (oclass->padtemplates, factory->padtemplates);
     oclass->numpadtemplates += factory->numpadtemplates;
   }
-  
-  gst_object_set_name (GST_OBJECT (element),name);
+
+  gst_object_set_name (GST_OBJECT (element), name);
 
   return element;
 }
@@ -283,7 +283,7 @@ gst_element_factory_make (const gchar *factoryname, const gchar *name)
     GST_INFO (GST_CAT_ELEMENT_FACTORY,"no such elementfactory \"%s\"!",factoryname);
     return NULL;
   }
-  element = gst_element_factory_create(factory,name);
+  element = gst_element_factory_create (factory, name);
   if (element == NULL) {
     GST_INFO (GST_CAT_ELEMENT_FACTORY,"couldn't create instance of elementfactory \"%s\"!",factoryname);
     return NULL;
index 609709f..836f465 100644 (file)
@@ -2079,7 +2079,9 @@ gst_pad_template_new (gchar *name_template,
   if (!name_is_valid (name_template, presence))
     return NULL;
 
-  new = g_object_new(gst_pad_template_get_type () ,NULL);
+  new = g_object_new (gst_pad_template_get_type (),
+                      "name", name_template,
+                      NULL);
 
   GST_PAD_TEMPLATE_NAME_TEMPLATE (new) = name_template;
   GST_PAD_TEMPLATE_DIRECTION (new) = direction;