/* This ref will never be dropped as the class is never destroyed */
GST_OBJECT_FLAG_SET (factory, GST_OBJECT_FLAG_MAY_BE_LEAKED);
+ /* Ensure that the reference is floating. Bindings might have a hard time
+ * making sure that the reference is indeed still floating after returning
+ * here */
+ if (element)
+ g_object_force_floating ((GObject *) element);
+
GST_DEBUG ("created element \"%s\"", GST_OBJECT_NAME (factory));
return element;
gst_element_factory_get_metadata (GstElementFactory * factory,
const gchar * key)
{
+ g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), NULL);
+
return gst_structure_get_string ((GstStructure *) factory->metadata, key);
}