GstObject Base class for the GStreamer object hierarchy GstObject provides a root for the object hierarchy tree filed in by the GST library. It is currently a thin wrapper on top of GObject. It is an abstract class that is not very usable on its own. GstObject gives us basic refcounting, parenting functionality and locking. Most of the function are just extended for special gstreamer needs and can be found under the same name in the base class of GstObject which is GObject (e.g. g_object_ref becomes gst_object_ref). The most interesting difference between GstObject and GObject is the "floating" reference count. A GObject is created with a reference count of 1, owned by the creator of the GObject. (The owner of a reference is the code section that has the right to call gst_object_unref() in order to remove that reference.) A GstObject is created with a reference count of 1 also, but it isn't owned by anyone; calling gst_object_unref() on the newly-created GtkObject is incorrect. Instead, the initial reference count of a GstObject is "floating". The floating reference can be removed by anyone at any time, by calling gst_object_sink(). gst_object_sink() does nothing if an object is already sunk (has no floating reference). When you add a GstElement to its parent container, the parent container will do this: gst_object_ref (GST_OBJECT (child_element)); gst_object_sink (GST_OBJECT (child_element)); This means that the container now owns a reference to the child element (since it called gst_object_ref()), and the child element has no floating reference. The purpose of the floating reference is to keep the child element alive until you add it to a parent container: element = gst_element_factory_make (factoryname, name); /* element has one floating reference to keep it alive */ gtk_bin_add (GTK_BIN (bin), element); /* element has one non-floating reference owned by the container */ Another effect of this is, that calling gst_object_unref() on a bin object, will also destoy all the GstElement objects in it. The same is true for calling gst_bin_remove(). gst_object_set_name() and gst_object_get_name() are used to set/get the name of the object. @refcount: @lock: @name: @name_prefix: @parent: @flags: The deep notify signal is used to be notified of property changes. it is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin. @gstobject: the object which received the signal. @arg1: the object that originated the signal @arg2: the property that changed Is trigered whenever a new object is saved to XML. You can connect to this signal to insert custom XML tags into the core XML. @gstobject: the object which received the signal. @arg1: the xmlNodePtr of the parent node Is emitted when the parent of an object is set. @gstobject: the object which received the signal. @arg1: the new parent Is emitted when the parent of an object is unset. @gstobject: the object which received the signal. @arg1: the old parent The name of the object Flags for an object @GST_OBJECT_DISPOSING: @GST_OBJECT_DESTROYED: @GST_OBJECT_FLOATING: @GST_OBJECT_FLAG_LAST: subclasses can add additional flags starting from this flag This macro returns the entire set of flags for the object. @obj: Object to return flags for. This macro checks to see if the given flag is set. @obj: GstSrc to check for flag in. @flag: Flag to check for, must be a single bit in guint32. This macro sets the given bits. @obj: Object to set flag in. @flag: Flag to set, can by any number of bits in guint32. This macro usets the given bits. @obj: Object to unset flag in. @flag: Flag to set, must be a single bit in guint32. Get the name of this object @obj: Object to get the name of. Get the parent of this object @obj: Object to get the parent of. This macro will obtain a lock on the object, making serialization possible. @obj: Object to lock. This macro will try to obtain a lock on the object, but will return with FALSE if it can't get it immediately. @obj: Object to try to get a lock on. This macro releases a lock on the object. @obj: Object to unlock. Acquire a reference to the mutex of this object. @obj: Object to get the mutex of. @object: @name: @Returns: @object: @Returns: @object: @parent: @Returns: @object: @Returns: @object: @object: @orig: @pspec: @excluded_props: @list: @name: @Returns: @object: @parent: @Returns: @object: @self: @object: the object @Returns: @object: the object @Returns: @object: the object @oldobj: @newobj: @object: @Returns: @klass: @name: @func: @func_data: @Returns: @object: @name: @self: