bufferpool: is it possible wait all memory writalbe, nor free the buffer?

Bing Song Kevin.Song at freescale.com
Fri Jan 9 18:06:00 PST 2015


Another method is manage the memory in allocator. Not free it when allocator_free. Re-use it when allocator_allocate. But the allocator_allocate will blocked until the memory freed to allocator. Don't know how to handle flushing for the block. No chance to get another buffer which returned to buffer pool when blocked on allocator_allocate.

Regards,
Song Bing.

-----Original Message-----
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Nicolas Dufresne
Sent: Saturday, January 10, 2015 3:06 AM
To: gstreamer-devel at lists.freedesktop.org
Subject: Re: bufferpool: is it possible wait all memory writalbe, nor free the buffer?



Le 01/09/2015 11:33 AM, Bing Song a écrit :
> Our expection of video buffer pool is reuse memory. Is it possible only release buffer to buffer pool when memory refer count is zero? Nor buffer ref count is zero.

The memory are reference by the buffer itself, so they won't reach zero.
That is why is not so trivial to catch when GstMemory are now writable again. Some core changes would be needed. Also, buffers may have been changed in a way that they are no longer recoverable. This case is unfortunate and element should not do that unless the gain of doing so is bigger then the gain of pooling.

cheers,
Nicolas
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list