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,
_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to