Lines Matching refs:transferBuf
359 MediaBuffer *transferBuf = nullptr; in onTransact() local
366 transferBuf = buf; in onTransact()
370 &transferBuf, false /* nonBlocking */, length); in onTransact()
372 || transferBuf == nullptr in onTransact()
373 || transferBuf->mMemory == nullptr) { in onTransact()
376 if (transferBuf != nullptr) { in onTransact()
377 transferBuf->release(); in onTransact()
378 transferBuf = nullptr; in onTransact()
383 memcpy(transferBuf->data(), (uint8_t*)buf->data() + offset, length); in onTransact()
391 if (transferBuf != nullptr) { // Using shared buffers. in onTransact()
392 if (!transferBuf->isObserved() && transferBuf != buf) { in onTransact()
394 ALOGV("adding shared memory buffer %p to local group", transferBuf); in onTransact()
395 mGroup->add_buffer(transferBuf); in onTransact()
396 transferBuf->add_ref(); // We have already acquired buffer. in onTransact()
398 uint64_t index = mIndexCache.lookup(transferBuf->mMemory); in onTransact()
400 index = mIndexCache.insert(transferBuf->mMemory); in onTransact()
403 reply->writeStrongBinder(IInterface::asBinder(transferBuf->mMemory)); in onTransact()
405 transferBuf, (unsigned long long)index); in onTransact()
410 transferBuf, (unsigned long long)index); in onTransact()
415 transferBuf->addRemoteRefcount(1); in onTransact()
416 if (transferBuf != buf) { in onTransact()
417 transferBuf->release(); // release local ref in onTransact()