Camera: Consider the currently acquired input buffers
The maximum acquired count of the input buffer queue during surface sharing should be set considering the total maximum acquired count of individual registered outputs and also the current acquired count of the input buffer queue. The reason the two can be different is due to the fact that individual outputs can acquire and also block buffers from the input. The latter portion contains all buffers which are still queued but not acquired. This can happen in case some output acquires the maximum amount of buffers possible then stops consuming entirely and the camera client continues to reference it in subsequent capture requests. To handle this, track the number of acquired buffers in the input queue and expand (or contract) the maximum acquired count only if possible. The maximum shouldn't change otherwise because the blocked buffers could still be used by the unresponsive output at some later point in time. Bug: 117982710 Test: Camera CTS Change-Id: Ia4e743efdf59cb0c9baaea492f78c37d0f2c95b3
Loading
Please register or sign in to comment