From: <mn...@ke...> - 2009-08-31 14:03:07
|
Module: gstreamer Branch: master Commit: 1b6da398fb4e94e57c2612be7e364217407e4217 URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=1b6da398fb4e94e57c2612be7e364217407e4217 Author: Mark Nauwelaerts <mar...@co...> Date: Sat Aug 29 20:44:36 2009 +0200 registry: fill in elementfactory when registering element elementfactory field is filled in by gst_element_base_class_init, but it needs some info set on the element's type, so have it available prior to class structure creation spinning up. This affects elements that have a well-known/public type (e.g. pipeline) and can be created by other means than gst_element_factory_make (which will also fill in the element's factory). --- gst/gstelementfactory.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/gst/gstelementfactory.c b/gst/gstelementfactory.c index a4b1aa1..9c7701e 100644 --- a/gst/gstelementfactory.c +++ b/gst/gstelementfactory.c @@ -286,6 +286,8 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank, GST_LOG_OBJECT (factory, "Created new elementfactory for type %s", g_type_name (type)); + /* provide info needed during class structure setup */ + g_type_set_qdata (type, _gst_elementclass_factory, factory); klass = GST_ELEMENT_CLASS (g_type_class_ref (type)); if ((klass->details.longname == NULL) || (klass->details.klass == NULL) || (klass->details.author == NULL)) @@ -306,7 +308,6 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank, g_list_append (factory->staticpadtemplates, newt); } factory->numpadtemplates = klass->numpadtemplates; - g_type_set_qdata (type, _gst_elementclass_factory, factory); /* special stuff for URI handling */ if (g_type_is_a (type, GST_TYPE_URI_HANDLER)) { |