Lines Matching refs:transferBuf
356 MediaBuffer *transferBuf = nullptr; in onTransact() local
363 transferBuf = buf; in onTransact()
367 (MediaBufferBase **)&transferBuf, false /* nonBlocking */, length); in onTransact()
369 || transferBuf == nullptr in onTransact()
370 || transferBuf->mMemory == nullptr) { in onTransact()
373 if (transferBuf != nullptr) { in onTransact()
374 transferBuf->release(); in onTransact()
375 transferBuf = nullptr; in onTransact()
380 memcpy(transferBuf->data(), (uint8_t*)buf->data() + offset, length); in onTransact()
388 if (transferBuf != nullptr) { // Using shared buffers. in onTransact()
389 if (!transferBuf->isObserved() && transferBuf != buf) { in onTransact()
391 ALOGV("adding shared memory buffer %p to local group", transferBuf); in onTransact()
392 mGroup->add_buffer(transferBuf); in onTransact()
393 transferBuf->add_ref(); // We have already acquired buffer. in onTransact()
395 uint64_t index = mIndexCache.lookup(transferBuf->mMemory); in onTransact()
397 index = mIndexCache.insert(transferBuf->mMemory); in onTransact()
400 reply->writeStrongBinder(IInterface::asBinder(transferBuf->mMemory)); in onTransact()
402 transferBuf, (unsigned long long)index); in onTransact()
407 transferBuf, (unsigned long long)index); in onTransact()
412 transferBuf->addRemoteRefcount(1); in onTransact()
413 if (transferBuf != buf) { in onTransact()
414 transferBuf->release(); // release local ref in onTransact()