Lines Matching defs:capacity
279 * Return an ABuffer object whose size is at least |capacity|.
281 * \param capacity requested capacity
282 * \return nullptr if the pool capacity is reached
285 sp<ABuffer> newBuffer(size_t capacity) {
289 [capacity](const std::vector<uint8_t> &vec) {
290 return vec.capacity() >= capacity;
297 if (mUsedSize + capacity > mPoolCapacity) {
299 mUsedSize -= mPool.back().capacity();
302 if (mUsedSize + capacity > mPoolCapacity) {
303 ALOGD("mUsedSize = %zu, capacity = %zu, mPoolCapacity = %zu",
304 mUsedSize, capacity, mPoolCapacity);
308 std::vector<uint8_t> vec(capacity);
309 mUsedSize += vec.capacity();
328 : ABuffer(vec.data(), vec.capacity()),
394 [localBufferPool](size_t capacity) {
395 return localBufferPool->newBuffer(capacity);
523 (*buffer)->setRange(0, (*buffer)->capacity());
650 int32_t capacity = kLinearBufferSize;
651 (void)mFormat->findInt32(KEY_MAX_INPUT_SIZE, &capacity);
654 sp<Codec2Buffer> newBuffer = alloc((size_t)capacity);
674 int32_t capacity = kLinearBufferSize;
675 (void)mFormat->findInt32(C2_NAME_STREAM_MAX_BUFFER_SIZE_SETTING, &capacity);
683 [this, capacity] () -> sp<Codec2Buffer> { return alloc(capacity); });
949 && clientBuffer->capacity() >= csd->flexCount();
1111 [lbp = mLocalBufferPool](size_t capacity) {
1112 return lbp->newBuffer(capacity);
1118 [lbp = mLocalBufferPool](size_t capacity) {
1119 return lbp->newBuffer(capacity);
1127 [lbp = mLocalBufferPool](size_t capacity) {
1128 return lbp->newBuffer(capacity);