gstreamer.ObjectGst

Undocumented in source.

Public Imports

gstreamerc.gstreamertypes
public import gstreamerc.gstreamertypes;
Undocumented in source.
gtkc.gdktypes
public import gtkc.gdktypes;
Undocumented in source.

Members

Classes

ObjectGst
class ObjectGst

Description GstObject provides a root for the object hierarchy tree filed in by the GStreamer 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; 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: 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, which then manages the lifetime of the object itself: 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(). Special care has to be taken for all methods that gst_object_sink() an object since if the caller of those functions had a floating reference to the object, the object reference is now invalid. In contrast to GObject instances, GstObject adds a name property. The functions gst_object_set_name() and gst_object_get_name() are used to set/get the name of the object. Last reviewed on 2005-11-09 (0.9.4)

Meta