element: emit tracer's element-new hook from 'constructed'

It allows to properly emitting it for all newly created elements

https://bugzilla.gnome.org/show_bug.cgi?id=757045
This commit is contained in:
Thiago Santos 2015-10-28 17:31:07 -03:00
parent cf5e7c03c2
commit 973cd86c99
2 changed files with 9 additions and 2 deletions

View file

@ -120,6 +120,7 @@ static void gst_element_init (GstElement * element);
static void gst_element_base_class_init (gpointer g_class);
static void gst_element_base_class_finalize (gpointer g_class);
static void gst_element_constructed (GObject * object);
static void gst_element_dispose (GObject * object);
static void gst_element_finalize (GObject * object);
@ -232,6 +233,7 @@ gst_element_class_init (GstElementClass * klass)
gobject_class->dispose = gst_element_dispose;
gobject_class->finalize = gst_element_finalize;
gobject_class->constructed = gst_element_constructed;
klass->change_state = GST_DEBUG_FUNCPTR (gst_element_change_state_func);
klass->set_state = GST_DEBUG_FUNCPTR (gst_element_set_state_func);
@ -303,6 +305,13 @@ gst_element_init (GstElement * element)
g_cond_init (&element->state_cond);
}
static void
gst_element_constructed (GObject * object)
{
GST_TRACER_ELEMENT_NEW (GST_ELEMENT_CAST (object));
G_OBJECT_CLASS (parent_class)->constructed (object);
}
/**
* gst_element_release_request_pad:
* @element: a #GstElement to release the request pad of.

View file

@ -449,8 +449,6 @@ gst_element_factory_make (const gchar * factoryname, const gchar * name)
gst_object_unref (factory);
GST_TRACER_ELEMENT_NEW (element);
return element;
/* ERRORS */