*
* Create a new #GstDeviceMonitor
*
- * Returns: (transfer full): a new device monitor.
+ * Returns: (transfer floating): a new device monitor.
*
* Since: 1.4
*/
/**
* gst_device_provider_device_add:
* @provider: a #GstDeviceProvider
- * @device: (transfer full): a #GstDevice that has been added
+ * @device: (transfer floating): a #GstDevice that has been added
*
* Posts a message on the provider's #GstBus to inform applications that
* a new device has been added.
*
* This is for use by subclasses.
*
+ * @device's reference count will be incremented, and any floating reference
+ * will be removed (see gst_object_ref_sink()).
+ *
* Since: 1.4
*/
void
}
GST_OBJECT_LOCK (provider);
- provider->devices = g_list_prepend (provider->devices,
- gst_object_ref (device));
+ /* Take an additional reference so we can be sure nobody removed it from the
+ * provider in the meantime and we can safely emit the message */
+ gst_object_ref (device);
+ provider->devices = g_list_prepend (provider->devices, device);
GST_OBJECT_UNLOCK (provider);
message = gst_message_new_device_added (GST_OBJECT (provider), device);
/**
* gst_element_add_pad:
* @element: a #GstElement to add the pad to.
- * @pad: (transfer full): the #GstPad to add to the element.
+ * @pad: (transfer floating): the #GstPad to add to the element.
*
* Adds a pad (link point) to @element. @pad's parent will be set to @element;
* see gst_object_set_parent() for refcounting information.
/**
* gst_element_class_add_pad_template:
* @klass: the #GstElementClass to add the pad template to.
- * @templ: (transfer full): a #GstPadTemplate to add to the element class.
+ * @templ: (transfer floating): a #GstPadTemplate to add to the element class.
*
* Adds a padtemplate to an element class. This is mainly used in the _class_init
* functions of classes. If a pad template with the same name as an already
* existing one is added the old one is replaced by the new one.
*
+ * @templ's reference count will be incremented, and any floating
+ * reference will be removed (see gst_object_ref_sink())
+ *
*/
void
gst_element_class_add_pad_template (GstElementClass * klass,
*
* The created ghostpad will not have a padtemplate.
*
- * Returns: (transfer full) (nullable): a new #GstPad, or %NULL in
+ * Returns: (transfer floating) (nullable): a new #GstPad, or %NULL in
* case of an error.
*/
GstPad *
*
* Will ref the target.
*
- * Returns: (transfer full) (nullable): a new #GstPad, or %NULL in
+ * Returns: (transfer floating) (nullable): a new #GstPad, or %NULL in
* case of an error.
*/
* Create a new ghostpad based on @templ, without setting a target. The
* direction will be taken from the @templ.
*
- * Returns: (transfer full) (nullable): a new #GstPad, or %NULL in
+ * Returns: (transfer floating) (nullable): a new #GstPad, or %NULL in
* case of an error.
*/
GstPad *
/**
* gst_object_set_parent:
- * @object: a #GstObject
+ * @object: (transfer floating): a #GstObject
* @parent: new parent of object
*
* Sets the parent of @object to @parent. The object's reference count will
/**
* gst_object_add_control_binding:
* @object: the controller object
- * @binding: (transfer full): the #GstControlBinding that should be used
+ * @binding: (transfer floating): the #GstControlBinding that should be used
*
* Attach the #GstControlBinding to the object. If there already was a
* #GstControlBinding for this property it will be replaced.
*
- * The @object will take ownership of the @binding.
+ * The object's reference count will be incremented, and any floating
+ * reference will be removed (see gst_object_ref_sink())
*
* Returns: %FALSE if the given @binding has not been setup for this object or
* has been setup for a non suitable property, %TRUE otherwise.
*
* Converts a #GstStaticPadTemplate into a #GstPadTemplate.
*
- * Returns: (transfer full): a new #GstPadTemplate.
+ * Returns: (transfer floating): a new #GstPadTemplate.
*/
/* FIXME0.11: rename to gst_pad_template_new_from_static_pad_template() */
GstPadTemplate *
return symname;
}
+/* Note: The return value is (transfer full) although we work with floating
+ * references here. If a new plugin instance is created, it is always sinked
+ * in the registry first and a new reference is returned
+ */
GstPlugin *
_priv_gst_plugin_load_file_for_registry (const gchar * filename,
GstRegistry * registry, GError ** error)
/**
* gst_registry_add_plugin:
* @registry: the registry to add the plugin to
- * @plugin: (transfer full): the plugin to add
+ * @plugin: (transfer floating): the plugin to add
*
* Add the plugin to the registry. The plugin-added signal will be emitted.
- * This function will sink @plugin.
+ *
+ * @plugin's reference count will be incremented, and any floating
+ * reference will be removed (see gst_object_ref_sink())
*
* Returns: %TRUE on success.
*
/**
* gst_registry_add_feature:
* @registry: the registry to add the plugin to
- * @feature: (transfer full): the feature to add
+ * @feature: (transfer floating): the feature to add
*
* Add the feature to the registry. The feature-added signal will be emitted.
- * This function sinks @feature.
+ *
+ * @feature's reference count will be incremented, and any floating
+ * reference will be removed (see gst_object_ref_sink())
*
* Returns: %TRUE on success.
*
*
* Create a new #GstStreamCollection.
*
- * Returns: The new #GstStreamCollection.
+ * Returns: (transfer floating): The new #GstStreamCollection.
*
* Since: 1.10
*/
* Create a new #GstStream for the given @stream_id, @caps, @type
* and @flags
*
- * Returns: The new #GstStream
+ * Returns: (transfer floating): The new #GstStream
*
* Since: 1.10
*/
*
* > Please note that this is still under discussion and subject to change.
*
- * Returns: a new #GstTracerRecord
+ * Returns: (transfer floating): a new #GstTracerRecord
*/
GstTracerRecord *
gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
/**
* gst_bin_add_many:
* @bin: a #GstBin
- * @element_1: (transfer full): the #GstElement element to add to the bin
- * @...: (transfer full): additional elements to add to the bin
+ * @element_1: (transfer floating): the #GstElement element to add to the bin
+ * @...: (transfer floating): additional elements to add to the bin
*
* Adds a %NULL-terminated list of elements to a bin. This function is
* equivalent to calling gst_bin_add() for each member of the list. The return
* requests from @property_name on @object to the control binding at
* @ref_property_name on @ref_object.
*
- * Returns: a new #GstControlBinding that proxies the control interface between
+ * Returns: (transfer floating): a new #GstControlBinding that proxies the control interface between
* properties on different #GstObject's
*
* Since: 1.12
*
* Allows network clients to get the current time of @clock.
*
- * Returns: the new #GstNetTimeProvider, or NULL on error
+ * Returns: (transfer floating): the new #GstNetTimeProvider, or NULL on error
*/
GstNetTimeProvider *
gst_net_time_provider_new (GstClock * clock, const gchar * address, gint port)