[SailfishDevel] one question on GstDroidBufferPool
Mohammed Hassan
mohammed.hassan at jollamobile.com
Thu Jul 9 14:31:27 UTC 2015
On Thu, Jul 09, 2015 at 08:14:09PM +0800, Halley wrote:
> why release_buffer is not required in the GstDroidBufferPool?
>
> from my understanding, release_buffer is opposite to alloc_buffer;
>
> when we "++dpool->num_buffers" in alloc_buffer, should we
> "--dpool->num_buffers" in release_buffer?
GstDroidBufferPool is kind of a hack to throttle the decoder output a bit.
Since we never reallocate the buffers then it is safe to ignore resetting
num_buffers. We also reset it in _start().
The pool recycles the buffers so we decrease num_buffers when we hand a buffer to
the decoder and increment it again when we get a buffer back in _reset_buffer()
Cheers,
More information about the Devel
mailing list