OSDN Git Service

mediaplayer: keep more buffers with the BufferQueue
authorLajos Molnar <lajos@google.com>
Thu, 13 Feb 2014 23:29:49 +0000 (15:29 -0800)
committerLajos Molnar <lajos@google.com>
Wed, 19 Mar 2014 02:15:24 +0000 (02:15 +0000)
commitb635b0e66b257ab442e230bca96afd5105cf6829
treece27a9ac30a219e6895cffddd6c4f9ab873ca19a
parent43ca783effd99bba0e6e2dd6fe177a8888578ef8
mediaplayer: keep more buffers with the BufferQueue

Change OMX buffer allocation policy to allocate
nBufferCountMin + what is required for the BQ.

For the BQ, try to allocate 2 additional buffers than
the minimum undequeued count.

Also account for the fact that BQ may return one less
than the actual minimum undequeued count.

In most cases the resulting number of buffers ends up
being the same as with the previous policy, but we
keep more buffers with the BQ.

Change-Id: I826db8bf7dd333b620299dba60bf1b81b228275d
Bug: 13170236
include/media/stagefright/ACodec.h
media/libstagefright/ACodec.cpp
media/libstagefright/OMXCodec.cpp