How can I unref buffers that I cannot process?
t.i.m at zen.co.uk
Mon Jul 15 14:48:58 PDT 2013
On Mon, 2013-07-15 at 16:33 -0400, Santiago Olivera wrote:
> Hi, I have a plugin that processes images. It can only process about
> five per second (variable: Sometimes may be four, others may be 6).
> However I receive data via UDPSRC at rates that can go up to 30 images
> per second. It seems that the buffers received while my module is busy
> processing an image are creating a big memory leak. How can I, inside
> my module, unref those buffers that I am not able to process?
Taking a step back, the question is where do you throw buffers away /
throttle, and how.
The easiest way would be to have a very small (max-size-buffers=3 or so)
"leaky" (leak=downstream) queue between your image processing element
and udpsrc. That way the queue will throw away buffers that can't be
handled right now.
More information about the gstreamer-devel