From: Michael S. <ms...@xi...> - 2008-08-04 17:17:37
|
On Mon, Aug 4, 2008 at 2:59 AM, Topi Hukkanen <top...@gm...> 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 |