]> git.sesse.net Git - vlc/commit
mmal/codec: Rework buffer handling
authorJulian Scheel <julian@jusst.de>
Fri, 29 Aug 2014 07:09:35 +0000 (09:09 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 1 Sep 2014 18:44:31 +0000 (21:44 +0300)
commit0bf3d5ace8063213d412d710083d3a8a275d6572
tree7d6fd2a70e311956a2515a196bed08a09347326a
parentbdb1d86acfb0d0068e57281b6fbfc52345960d29
mmal/codec: Rework buffer handling

This patch reduces the number of required pictures in the picture pool as well
as the number of required buffer headers on the mmal component. If
MMAL_ENCODING_OPAQUE is used as data format the number of buffers which have
to be provided to the components ports are very critical and there is a
relation between the configured number of buffers at the port and the actual
number of buffers which are available at a port at any time.
The previous approach was rather conservative and allocated a lot of extra
buffers to ensure that things are smooth all the time. This has the drawback
of wasting memory though. Especially when adding another mmal element
(deinterlace filter) it caused a situation where we run out of resources. This
new approach reduces the required resources so that another mmal component can
be added to the chain.

Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/hw/mmal/codec.c