AImageReader has a public method acquireLatestImageAsync() which is used to acquire the latest image from the AImageReader queue.
We may fail to acquire the latest image due to various reasons.
For eg if we have already acquired maximum number of images concurrently from the Aimagereader queue without freeing any, we will not be able to acquire more images and acquireLatestImageAsync() will return error code AMEDIA_IMGREADER_MAX_IMAGES_ACQUIRED.
We expect that based on the current implementation of media video decoder path, above error should never happen.
Added a histogram to record error codes and also this bug to handle the errors if they occur.
If above error occurs, One possible solution could be to try to increase the imagereader queue size so that we can acquire more number of images concurrently OR try to free previously acquired images if possible.
Comment 1 by yini...@chromium.org
, Jun 1 2018