]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gstreamer-0.10: Fix several ownership transfer when adding children
authorJens Georg <mail@jensge.org>
Fri, 16 Dec 2011 12:33:29 +0000 (13:33 +0100)
committerJürg Billeter <j@bitron.ch>
Tue, 31 Jan 2012 11:36:57 +0000 (12:36 +0100)
gst_bin_add, gst_bin_add_many and gst_element_add_pad only transfer
ownership if the reference is floating, otherwise increasing the
refcount. The reference is added by gst_object_set_parent.

Fixes bug 666358.

vapi/gstreamer-0.10.vapi
vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata

index e083a9f41035bd74b427ed62b69c55e50f8bb293..554aa5ac18d1d847e81d8cfc79f54c9bf3407757 100644 (file)
@@ -43,10 +43,10 @@ namespace Gst {
                public bool state_dirty;
                [CCode (has_construct_function = false, type = "GstElement*")]
                public Bin (string? name);
-               public bool add (owned Gst.Element element);
+               public bool add (Gst.Element element);
                [NoWrapper]
                public virtual bool add_element (Gst.Element element);
-               public void add_many (params owned Gst.Element[] elements);
+               public void add_many (params Gst.Element[] elements);
                public Gst.Pad? find_unconnected_pad (Gst.PadDirection direction);
                public Gst.Pad? find_unlinked_pad (Gst.PadDirection direction);
                public Gst.Element? get_by_interface (GLib.Type iface);
@@ -411,7 +411,7 @@ namespace Gst {
                [CCode (has_construct_function = false)]
                protected Element ();
                public void abort_state ();
-               public bool add_pad (owned Gst.Pad pad);
+               public bool add_pad (Gst.Pad pad);
                [CCode (cname = "gst_element_class_add_pad_template")]
                public class void add_pad_template (Gst.PadTemplate templ);
                public virtual Gst.StateChangeReturn change_state (Gst.StateChange transition);
index dc85a053686727bc18e0299e1f74e26f9b7626f8..f99d1e4a23ec6b27781c2baa9299db98b3624b0a 100644 (file)
@@ -148,7 +148,7 @@ namespace Gst {
        }
 
        public class Bin {
-               public void add_many (params owned Gst.Element[] elements);
+               public void add_many (params Gst.Element[] elements);
                public void remove_many (params Gst.Element[] elements);
        }
 
index 264fd3eb380b9d348f9e864db1ba866d988f57d7..81015a02ff40c1bea18a7fd9d0d5d916e1430c19 100644 (file)
@@ -5,7 +5,6 @@ GstBin.priv hidden="1"
 GstBin.children type_arguments="Element"
 GstBin.messages type_arguments="Message"
 gst_bin_new.name nullable="1"
-gst_bin_add.element value_owned="1"
 gst_bin_remove.element
 gst_bin_add_many hidden="1"
 gst_bin_remove_many hidden="1"
@@ -122,7 +121,6 @@ GstElement.sinkpads type_arguments="Pad"
 GstElement.srcpads type_arguments="Pad"
 GstElement.abidata hidden="1"
 GstElementClass hidden="1"
-gst_element_add_pad.pad takes_ownership="1"
 gst_element_link_many ellipsis="1"
 gst_element_unlink_many ellipsis="1"
 gst_element_found_tags.list takes_ownership="1"