e93355155764df62c1bb71f67a0796b33fe7a452 |
|
04-May-2018 |
Pin-chih Lin <johnylin@google.com> |
codec2: fully buffer-recycled BufferQueue block pool This block pool supports to request arbitrary number of graphic buffers from producer, and recycles these buffers when client requests more buffers. Specific function: requestNewBufferSet(bufferCount) This is called from codec component to request arbitrary number of graphic buffers. If producer is given, set maxDequeuedBufferCount as the requested buffer count to producer, and set allow allocation. Component calls fetchGraphicBlock to dequeue a buffer from producer. If the dequeued slot is not in |mSloAllocations| and BUFFER_NEEDS_REALLOCATION is returned, allocate new buffer from producer by requestBuffer and record the buffer and its slot index into |mSlotAllocations|. When the size of |mSlotAllocations| reaches the requested buffer count, set disallow allocation to producer. After that only slots with allocated buffer could be dequeued and reused by component. Bug: 79239042 Test: CtsMediaTestCases android.media.cts.MediaPlayerTest#testLocalVideo_MP4_H264_480x360_1000kbps_25fps_AAC_Stereo_128kbps_44110Hz Change-Id: I320dad37118e667aec63279e663cb3db726b1e6d
/hardware/google/av/codec2/vndk/v4l2/C2VdaBqBlockPool.cpp
|