Lines Matching refs:res

51     status_t res = OK;  in connect()  local
71 res = addOutputLocked(it.first, it.second); in connect()
72 if (res != OK) { in connect()
74 __FUNCTION__, strerror(-res), res); in connect()
75 return res; in connect()
98 res = mProducer->setAsyncMode(true); in connect()
99 if (res != OK) { in connect()
101 strerror(-res), res); in connect()
102 return res; in connect()
105 res = mConsumer->consumerConnect(this, /* controlledByApp */ false); in connect()
114 return res; in connect()
167 status_t res = addOutputLocked(surfaceId, outputQueue); in addOutput() local
169 if (res != OK) { in addOutput()
170 SP_LOGE("%s: addOutputLocked failed %d", __FUNCTION__, res); in addOutput()
171 return res; in addOutput()
175 res = mConsumer->setMaxAcquiredBufferCount(mMaxConsumerBuffers); in addOutput()
178 return res; in addOutput()
193 status_t res = native_window_set_buffers_dimensions(outputQueue.get(), in addOutputLocked() local
195 if (res != NO_ERROR) { in addOutputLocked()
196 SP_LOGE("addOutput: failed to set buffer dimensions (%d)", res); in addOutputLocked()
197 return res; in addOutputLocked()
199 res = native_window_set_buffers_format(outputQueue.get(), in addOutputLocked()
201 if (res != OK) { in addOutputLocked()
204 return res; in addOutputLocked()
211 res = outputQueue->connect(NATIVE_WINDOW_API_CAMERA, listener); in addOutputLocked()
212 if (res != NO_ERROR) { in addOutputLocked()
213 SP_LOGE("addOutput: failed to connect (%d)", res); in addOutputLocked()
214 return res; in addOutputLocked()
219 res = static_cast<ANativeWindow*>(outputQueue.get())->query( in addOutputLocked()
222 if (res != OK) { in addOutputLocked()
225 return res; in addOutputLocked()
235 res = native_window_set_buffer_count(outputQueue.get(), in addOutputLocked()
237 if (res != OK) { in addOutputLocked()
240 return res; in addOutputLocked()
246 res = native_window_get_consumer_usage(static_cast<ANativeWindow*>(outputQueue.get()), &usage); in addOutputLocked()
253 res = gbp->allowAllocation(false); in addOutputLocked()
254 if (res != OK) { in addOutputLocked()
256 return res; in addOutputLocked()
277 status_t res = removeOutputLocked(surfaceId); in removeOutput() local
278 if (res != OK) { in removeOutput()
279 SP_LOGE("%s: removeOutputLocked failed %d", __FUNCTION__, res); in removeOutput()
280 return res; in removeOutput()
284 res = mConsumer->setMaxAcquiredBufferCount(mMaxConsumerBuffers); in removeOutput()
285 if (res != OK) { in removeOutput()
286 SP_LOGE("%s: setMaxAcquiredBufferCount failed %d", __FUNCTION__, res); in removeOutput()
287 return res; in removeOutput()
291 return res; in removeOutput()
324 auto res = IInterface::asBinder(gbp)->unlinkToDeath(mNotifiers[gbp]); in removeOutputLocked() local
325 if (res != OK) { in removeOutputLocked()
326 SP_LOGE("%s: Failed to unlink producer death listener: %d ", __FUNCTION__, res); in removeOutputLocked()
327 return res; in removeOutputLocked()
330 res = gbp->disconnect(NATIVE_WINDOW_API_CAMERA); in removeOutputLocked()
331 if (res != OK) { in removeOutputLocked()
332 SP_LOGE("%s: Unable disconnect from producer interface: %d ", __FUNCTION__, res); in removeOutputLocked()
333 return res; in removeOutputLocked()
340 return res; in removeOutputLocked()
346 status_t res; in outputBufferLocked() local
364 res = output->queueBuffer(slot, queueInput, &queueOutput); in outputBufferLocked()
368 __FUNCTION__, output.get(), slot, res); in outputBufferLocked()
372 return res; in outputBufferLocked()
374 if (res != OK) { in outputBufferLocked()
375 if (res != NO_INIT && res != DEAD_OBJECT) { in outputBufferLocked()
376 SP_LOGE("Queuing buffer to output failed (%d)", res); in outputBufferLocked()
383 return res; in outputBufferLocked()
393 return res; in outputBufferLocked()
416 status_t res = OK; in attachBufferToOutputs() local
442 res = gbp->attachBuffer(&slot, gb); in attachBufferToOutputs()
444 if (res != OK) { in attachBufferToOutputs()
446 __FUNCTION__, gbp.get(), strerror(-res), res); in attachBufferToOutputs()
448 return res; in attachBufferToOutputs()
477 return res; in attachBufferToOutputs()
486 status_t res = mConsumer->acquireBuffer(&bufferItem, /* presentWhen */ 0); in onFrameAvailable() local
487 if (res != NO_ERROR) { in onFrameAvailable()
488 SP_LOGE("%s: Acquiring buffer from input failed (%d)", __FUNCTION__, res); in onFrameAvailable()
489 mOnFrameAvailableRes.store(res); in onFrameAvailable()
533 res = outputBufferLocked(mOutputs[id], bufferItem, id); in onFrameAvailable()
534 if (res != OK) { in onFrameAvailable()
535 SP_LOGE("%s: outputBufferLocked failed %d", __FUNCTION__, res); in onFrameAvailable()
536 mOnFrameAvailableRes.store(res); in onFrameAvailable()
543 mOnFrameAvailableRes.store(res); in onFrameAvailable()
602 int res = NO_ERROR; in decrementBufRefCountLocked() local
605 res = consumer->detachBuffer(consumerSlot); in decrementBufRefCountLocked()
607 res = consumer->releaseBuffer(consumerSlot, frameNumber, in decrementBufRefCountLocked()
615 if (res != NO_ERROR) { in decrementBufRefCountLocked()
617 SP_LOGE("%s: detachBuffer returns %d", __FUNCTION__, res); in decrementBufRefCountLocked()
619 SP_LOGE("%s: releaseBuffer returns %d", __FUNCTION__, res); in decrementBufRefCountLocked()
636 auto res = from->dequeueBuffer(&slot, &fence, mWidth, mHeight, mFormat, mProducerUsage, in onBufferReleasedByOutput() local
639 handleOutputDequeueStatusLocked(res, slot); in onBufferReleasedByOutput()
640 if (res != OK) { in onBufferReleasedByOutput()
667 auto res = from->dequeueBuffer(&slot, &fence, mWidth, mHeight, mFormat, mProducerUsage, in onBufferReplacedLocked() local
669 handleOutputDequeueStatusLocked(res, slot); in onBufferReplacedLocked()
670 if (res != OK) { in onBufferReplacedLocked()
698 auto res = from->detachBuffer(slot); in returnOutputBufferLocked() local
699 if (res == NO_ERROR) { in returnOutputBufferLocked()
702 SP_LOGE("%s: detach buffer from output failed (%d)", __FUNCTION__, res); in returnOutputBufferLocked()
710 void Camera3StreamSplitter::handleOutputDequeueStatusLocked(status_t res, int slot) { in handleOutputDequeueStatusLocked() argument
711 if (res == NO_INIT) { in handleOutputDequeueStatusLocked()
715 } else if (res == IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION) { in handleOutputDequeueStatusLocked()
718 } else if (res == IGraphicBufferProducer::RELEASE_ALL_BUFFERS) { in handleOutputDequeueStatusLocked()
721 } else if (res == NO_MEMORY) { in handleOutputDequeueStatusLocked()
723 } else if (res == WOULD_BLOCK) { in handleOutputDequeueStatusLocked()
725 } else if (res != OK || (slot == BufferItem::INVALID_BUFFER_SLOT)) { in handleOutputDequeueStatusLocked()
726 SP_LOGE("%s: dequeue buffer from output failed (%d)", __FUNCTION__, res); in handleOutputDequeueStatusLocked()