[gst-devel] Can I force the filesink element to "notify" with an upstream event?

Michael Smith msmith at xiph.org
Mon Aug 4 19:17:47 CEST 2008


On Mon, Aug 4, 2008 at 2:59 AM, Topi Hukkanen <topi.hukkanen at gmail.com> wrote:
> I have a My-videosrc element, and the HW is handled in such a way that the
> buffer provided by the video source must be released...  eventually.  There
> is an available pool of buffers, so I can afford to send the data pointer
> through the pipeline and then release it later.  I am also trying to avoid
> unnecessary data copies, so I want to release this video data buffer only
> when the gstreamer buffer has reached the filesink element and has been
> recorded to file.
>
> Can I "mark" the gst-buffer somehow, so the filesink will send an upstream
> event to My-videosrc, at which point I can release the data so the buffer
> can be re-used by the video hw?

Topi,

For this, you can (and should) create a subclass of GstBuffer. Your
subclass can have whatever other extra behaviour it's convenient for
you to have, but most importantly should have its own finalize
function - here, you will release your video resources.

Mike




More information about the gstreamer-devel mailing list