[gst-devel] GstMiniObject

David Schleef ds at schleef.org
Sun May 15 23:29:51 CEST 2005

I just checked in a patch that implements GstMiniObject, which can
be thought of as a stripped-down version of GObject.  Basically,
it's a GTypeInstance with atomic reference counting, inheritance,
and finalization.  It's intended to be a fast and lean base class
for things that are merely glorified structures.  In the near future,
it probably makes sense to add a few more features, especially
memchunk-like allocation and serialization/deserialization.

For the most part, GstData has been completely replaced by
GstMiniObject, so changes to elements are basically limited to
changing gst_data_ calls with gst_mini_object_ calls.  In addition,
I changed gst_buffer_copy_on_write() (and similarly named functions)
to gst_buffer_make_writable(), since it makes more sense.

One notable exception are for elements such as ximagesink, which
formerly created their own type of buffer.  Now, they create a
subclass of GstBuffer.  In the case of ximagesink, the buffer
subclass made a separate GstXImage structure redundant, so a bunch
of code was removed.

In this part of the patch, I only changed subtypes of GstData to
be subtypes of GstMiniObject.  Later, I'll change GstCaps and
GstStructure, too.

I'm not entirely happy with the name "MiniObject".  Feel free to
suggest alternatives to me on IRC; a mailing list discussion is
not appropriate.


David Schleef
Big Kitten LLC (http://www.bigkitten.com/) -- data acquisition on Linux

More information about the gstreamer-devel mailing list