AnsweredAssumed Answered

How to increase the number of inputBuffer for MediaCodec on Android4.4.3

Question asked by yuuki on Jan 5, 2016
Latest reply on Jul 4, 2016 by Subash Kumar
Branched to a new discussion

Dear all,


We run Android4.4.3 with MX6Q-SABRE-SDB board.

(This Android4.4.3 is IMX6_KK443_200_ANDROID_SOURCE_BSP of NXP.)

And, Extended Feature Packages(omx player package) are implemented.


On this system, We want to use Android MediaCodec API Demo.


This MediaCodec seems to use only one InputBuffer for the decode.


Can we increase the number of inputBuffer?

If it is possible, would you tell me the method (procedure)?



In the following cord.


ByteBuffer[] inputBuffers = decoder.getInputBuffers();

ByteBuffer[] outputBuffers = decoder.getOutputBuffers();

BufferInfo info = new BufferInfo();

boolean isEOS = false;

long startMs = System.currentTimeMillis();


while (!Thread.interrupted()) {

              if (!isEOS) {

                            int inIndex = decoder.dequeueInputBuffer(100000);



When the dequeueInputBuffer function was called, value "0" is returned to Index, and this processing takes an about 20msec.


It seems to be caused by the fact that this inputBuffer is SingleBuffer.

We want to shorten the processing time by increasing InputBuffer.


May I have advice?


Best Regards,