Lines Matching refs:res
221 status_t res; in getBufferLocked() local
222 res = getBufferLockedCommon(&anb, &fenceFd); in getBufferLocked()
223 if (res != OK) { in getBufferLocked()
224 return res; in getBufferLocked()
238 status_t res; in getBuffersLocked() local
240 if ((res = getBufferPreconditionCheckLocked()) != OK) { in getBuffersLocked()
241 return res; in getBuffersLocked()
268 res = consumer->dequeueBuffers(&buffers); in getBuffersLocked()
274 if (res != OK) { in getBuffersLocked()
275 if (shouldLogError(res, mState)) { in getBuffersLocked()
277 __FUNCTION__, mId, numBuffersRequested, strerror(-res), res); in getBuffersLocked()
279 checkRetAndSetAbandonedLocked(res); in getBuffersLocked()
280 return res; in getBuffersLocked()
312 status_t res = returnAnyBufferLocked(buffer, timestamp, readoutTimestamp, in returnBufferLocked() local
315 if (res != OK) { in returnBufferLocked()
316 return res; in returnBufferLocked()
333 status_t res = in fixUpHidlJpegBlobHeader() local
337 if (res != OK) { in fixUpHidlJpegBlobHeader()
338 ALOGE("%s: Failed to lock the buffer: %s (%d)", __FUNCTION__, strerror(-res), res); in fixUpHidlJpegBlobHeader()
339 return res; in fixUpHidlJpegBlobHeader()
406 status_t res; in returnBufferCheckedLocked() local
437 res = currentConsumer->cancelBuffer(currentConsumer.get(), in returnBufferCheckedLocked()
440 if (shouldLogError(res, state)) { in returnBufferCheckedLocked()
442 " %s (%d)", __FUNCTION__, mId, strerror(-res), res); in returnBufferCheckedLocked()
479 res = mPreviewFrameSpacer->queuePreviewBuffer(captureTime, readoutTime, in returnBufferCheckedLocked()
481 if (res != OK) { in returnBufferCheckedLocked()
483 __FUNCTION__, mId, strerror(-res), res); in returnBufferCheckedLocked()
484 return res; in returnBufferCheckedLocked()
492 res = native_window_set_buffers_timestamp(mConsumer.get(), presentTime); in returnBufferCheckedLocked()
493 if (res != OK) { in returnBufferCheckedLocked()
495 __FUNCTION__, mId, strerror(-res), res); in returnBufferCheckedLocked()
496 return res; in returnBufferCheckedLocked()
501 res = queueBufferToConsumer(currentConsumer, anwBuffer, anwReleaseFence, surface_ids); in returnBufferCheckedLocked()
502 if (shouldLogError(res, state)) { in returnBufferCheckedLocked()
504 " %s (%d)", __FUNCTION__, mId, strerror(-res), res); in returnBufferCheckedLocked()
522 return res; in returnBufferCheckedLocked()
550 status_t res = OK; in setTransformLocked() local
552 if (transform == -1) return res; in setTransformLocked()
561 res = native_window_set_buffers_transform(mConsumer.get(), in setTransformLocked()
563 if (res != OK) { in setTransformLocked()
565 __FUNCTION__, transform, strerror(-res), res); in setTransformLocked()
568 return res; in setTransformLocked()
572 status_t res; in configureQueueLocked() local
575 if ((res = Camera3IOStreamBase::configureQueueLocked()) != OK) { in configureQueueLocked()
576 return res; in configureQueueLocked()
579 if ((res = configureConsumerQueueLocked(true /*allowPreviewRespace*/)) != OK) { in configureQueueLocked()
580 return res; in configureQueueLocked()
604 status_t res; in configureConsumerQueueLocked() local
612 res = mConsumer->connect(NATIVE_WINDOW_API_CAMERA, in configureConsumerQueueLocked()
615 if (res != OK) { in configureConsumerQueueLocked()
618 return res; in configureConsumerQueueLocked()
623 res = native_window_set_usage(mConsumer.get(), mUsage); in configureConsumerQueueLocked()
624 if (res != OK) { in configureConsumerQueueLocked()
627 return res; in configureConsumerQueueLocked()
630 res = native_window_set_scaling_mode(mConsumer.get(), in configureConsumerQueueLocked()
632 if (res != OK) { in configureConsumerQueueLocked()
634 __FUNCTION__, strerror(-res), res); in configureConsumerQueueLocked()
635 return res; in configureConsumerQueueLocked()
640 res = native_window_set_buffers_dimensions(mConsumer.get(), in configureConsumerQueueLocked()
644 res = native_window_set_buffers_dimensions(mConsumer.get(), in configureConsumerQueueLocked()
647 if (res != OK) { in configureConsumerQueueLocked()
652 return res; in configureConsumerQueueLocked()
654 res = native_window_set_buffers_format(mConsumer.get(), in configureConsumerQueueLocked()
656 if (res != OK) { in configureConsumerQueueLocked()
659 return res; in configureConsumerQueueLocked()
662 res = native_window_set_buffers_data_space(mConsumer.get(), in configureConsumerQueueLocked()
664 if (res != OK) { in configureConsumerQueueLocked()
667 return res; in configureConsumerQueueLocked()
671 res = static_cast<ANativeWindow*>(mConsumer.get())->query( in configureConsumerQueueLocked()
674 if (res != OK) { in configureConsumerQueueLocked()
677 return res; in configureConsumerQueueLocked()
713 res = mPreviewFrameSpacer->run(String8::format("PreviewSpacer-%d", mId).string()); in configureConsumerQueueLocked()
714 if (res != OK) { in configureConsumerQueueLocked()
716 strerror(-res), res); in configureConsumerQueueLocked()
717 return res; in configureConsumerQueueLocked()
746 res = native_window_set_buffer_count(mConsumer.get(), in configureConsumerQueueLocked()
748 if (res != OK) { in configureConsumerQueueLocked()
751 return res; in configureConsumerQueueLocked()
754 res = native_window_set_buffers_transform(mConsumer.get(), in configureConsumerQueueLocked()
756 if (res != OK) { in configureConsumerQueueLocked()
758 __FUNCTION__, mTransform, strerror(-res), res); in configureConsumerQueueLocked()
759 return res; in configureConsumerQueueLocked()
783 res = mBufferManager->registerStream(weakThis, in configureConsumerQueueLocked()
785 if (res == OK) { in configureConsumerQueueLocked()
793 __FUNCTION__, mId, res, strerror(-res)); in configureConsumerQueueLocked()
802 status_t res; in getBufferLockedCommon() local
804 if ((res = getBufferPreconditionCheckLocked()) != OK) { in getBufferLockedCommon()
805 return res; in getBufferLockedCommon()
812 res = mBufferManager->getBufferForStream(getId(), getStreamSetId(), in getBufferLockedCommon()
814 if (res == OK) { in getBufferLockedCommon()
818 res = mConsumer->attachBuffer(*anb); in getBufferLockedCommon()
819 if (shouldLogError(res, mState)) { in getBufferLockedCommon()
821 __FUNCTION__, mId, strerror(-res), res); in getBufferLockedCommon()
823 if (res != OK) { in getBufferLockedCommon()
824 checkRetAndSetAbandonedLocked(res); in getBufferLockedCommon()
825 return res; in getBufferLockedCommon()
829 } else if (res == ALREADY_EXISTS) { in getBufferLockedCommon()
834 } else if (res != OK) { in getBufferLockedCommon()
836 __FUNCTION__, mId, strerror(-res), res); in getBufferLockedCommon()
837 return res; in getBufferLockedCommon()
862 res = anw->dequeueBuffer(anw.get(), anb, fenceFd); in getBufferLockedCommon()
865 res = OK; in getBufferLockedCommon()
878 res = consumer->dequeueBuffers(&batchedBuffers); in getBufferLockedCommon()
880 if (res != OK) { in getBufferLockedCommon()
882 __FUNCTION__, strerror(-res), res); in getBufferLockedCommon()
888 if (res == OK) { in getBufferLockedCommon()
901 if (mUseBufferManager && res == TIMED_OUT) { in getBufferLockedCommon()
905 res = mBufferManager->getBufferForStream( in getBufferLockedCommon()
909 if (res == OK) { in getBufferLockedCommon()
913 res = mConsumer->attachBuffer(*anb); in getBufferLockedCommon()
917 if (res != OK) { in getBufferLockedCommon()
918 if (shouldLogError(res, mState)) { in getBufferLockedCommon()
920 " %s (%d)", __FUNCTION__, mId, strerror(-res), res); in getBufferLockedCommon()
922 checkRetAndSetAbandonedLocked(res); in getBufferLockedCommon()
923 return res; in getBufferLockedCommon()
927 " %s (%d)", __FUNCTION__, mId, strerror(-res), res); in getBufferLockedCommon()
928 return res; in getBufferLockedCommon()
930 } else if (res != OK) { in getBufferLockedCommon()
931 if (shouldLogError(res, mState)) { in getBufferLockedCommon()
933 __FUNCTION__, mId, strerror(-res), res); in getBufferLockedCommon()
935 checkRetAndSetAbandonedLocked(res); in getBufferLockedCommon()
936 return res; in getBufferLockedCommon()
940 if (res == OK) { in getBufferLockedCommon()
944 return res; in getBufferLockedCommon()
949 status_t res = mConsumer->getAndFlushRemovedBuffers(&removedBuffers); in checkRemovedBuffersLocked() local
950 if (res == OK) { in checkRemovedBuffersLocked()
960 void Camera3OutputStream::checkRetAndSetAbandonedLocked(status_t res) { in checkRetAndSetAbandonedLocked() argument
963 if ((res == NO_INIT || res == DEAD_OBJECT) && mState == STATE_CONFIGURED) { in checkRetAndSetAbandonedLocked()
968 bool Camera3OutputStream::shouldLogError(status_t res, StreamState state) { in shouldLogError() argument
969 if (res == OK) { in shouldLogError()
972 if ((res == DEAD_OBJECT || res == NO_INIT) && state == STATE_ABANDONED) { in shouldLogError()
987 status_t res; in disconnectLocked() local
989 if ((res = Camera3IOStreamBase::disconnectLocked()) != OK) { in disconnectLocked()
990 return res; in disconnectLocked()
1007 res = native_window_api_disconnect(mConsumer.get(), in disconnectLocked()
1014 if (res == DEAD_OBJECT) { in disconnectLocked()
1018 else if (res != OK) { in disconnectLocked()
1021 __FUNCTION__, mId, res, strerror(-res)); in disconnectLocked()
1023 return res; in disconnectLocked()
1029 res = mBufferManager->unregisterStream(getId(), getStreamSetId(), isMultiResolution()); in disconnectLocked()
1030 if (res != OK) { in disconnectLocked()
1032 "(error %d %s)", __FUNCTION__, mId, res, strerror(-res)); in disconnectLocked()
1034 return res; in disconnectLocked()
1051 status_t res; in getEndpointUsage() local
1059 res = getEndpointUsageForSurface(usage, mConsumer); in getEndpointUsage()
1061 return res; in getEndpointUsage()
1086 status_t res; in getEndpointUsageForSurface() local
1089 res = native_window_get_consumer_usage(static_cast<ANativeWindow*>(surface.get()), &u); in getEndpointUsageForSurface()
1092 return res; in getEndpointUsageForSurface()
1097 status_t res = getEndpointUsage(&usage); in isVideoStream() local
1098 if (res != OK) { in isVideoStream()
1099 ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); in isVideoStream()
1140 status_t res = stream->mBufferManager->onBufferReleased( in onBufferReleased() local
1143 if (res != OK) { in onBufferReleased()
1145 strerror(-res), res); in onBufferReleased()
1201 status_t res = mConsumer->detachNextBuffer(buffer, &fence); in detachBufferLocked() local
1202 if (res == NO_MEMORY) { in detachBufferLocked()
1209 } else if (res != OK) { in detachBufferLocked()
1211 if (shouldLogError(res, mState)) { in detachBufferLocked()
1212 ALOGE("%s: detach next buffer failed: %s (%d).", __FUNCTION__, strerror(-res), res); in detachBufferLocked()
1215 return res; in detachBufferLocked()
1228 return res; in detachBufferLocked()
1278 status_t res = getEndpointUsage(&usage); in isConsumedByHWComposer() local
1279 if (res != OK) { in isConsumedByHWComposer()
1280 ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); in isConsumedByHWComposer()
1289 status_t res = getEndpointUsage(&usage); in isConsumedByHWTexture() local
1290 if (res != OK) { in isConsumedByHWTexture()
1291 ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); in isConsumedByHWTexture()
1300 status_t res = getEndpointUsage(&usage); in isConsumedByCPU() local
1301 if (res != OK) { in isConsumedByCPU()
1302 ALOGE("%s: getting end point usage failed: %s (%d).", __FUNCTION__, strerror(-res), res); in isConsumedByCPU()
1325 status_t res = graphicBuffer->lockAsync(GraphicBuffer::USAGE_SW_READ_OFTEN, &mapped, in dumpImageToDisk() local
1327 if (res != OK) { in dumpImageToDisk()
1328 ALOGE("%s: Failed to lock the buffer: %s (%d)", __FUNCTION__, strerror(-res), res); in dumpImageToDisk()
1422 auto res = mDisplayEventReceiver.getLatestVsyncEventData(&parcelableVsyncEventData); in syncTimestampToDisplayLocked() local
1423 if (res != OK) { in syncTimestampToDisplayLocked()
1425 __FUNCTION__, mId, strerror(-res), res); in syncTimestampToDisplayLocked()
1627 bool Camera3OutputStream::shouldLogError(status_t res) { in shouldLogError() argument
1629 return shouldLogError(res, mState); in shouldLogError()