[gst-devel] free of a a buffer allocated by a propriatary method

Tim Müller t.i.m at zen.co.uk
Fri May 19 07:20:07 CEST 2006

On Fri, 2006-05-19 at 16:04 +0200, Matthieu Laurent wrote:

> I would like to know if there is a way to specify the free function to
> be used in order to free a buffer allocated by a propriatory method.
> In fact, if my plugin allocates a buffer by a propriatory method and
> that it pushes it to the next element, this last element will use by
> default g_free and not the desired free propriatory method.

You can do that if you derive your own GstBuffer type, see gstfilesrc.c
in gstreamer/plugins/elements/ for an example. filesrc creates buffers
that hold mmap()ed data and needs to know when it can unmap() pages


More information about the gstreamer-devel mailing list