Lines Matching refs:res

78     status_t res = mDevice->createDefaultRequest(CAMERA2_TEMPLATE_STILL_CAPTURE, &stillTemplate);  in isZslEnabledInStillTemplate()  local
79 if (res == OK) { in isZslEnabledInStillTemplate()
94 status_t res; in initializeImpl() local
96 res = Camera2ClientBase::initialize(providerPtr, monitorTags); in initializeImpl()
97 if (res != OK) { in initializeImpl()
98 return res; in initializeImpl()
104 res = l.mParameters.initialize(mDevice.get(), mDeviceVersion); in initializeImpl()
105 if (res != OK) { in initializeImpl()
107 __FUNCTION__, mCameraId, strerror(-res), res); in initializeImpl()
401 binder::Status res = binder::Status::ok(); in disconnect() local
404 if (callingPid != mClientPid && callingPid != mServicePid) return res; in disconnect()
406 if (mDevice == 0) return res; in disconnect()
420 if (l.mParameters.state == Parameters::DISCONNECTED) return res; in disconnect()
460 return res; in disconnect()
534 status_t res; in setPreviewTarget() local
535 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setPreviewTarget()
552 status_t res; in setPreviewWindowL() local
580 res = stopStream(); in setPreviewWindowL()
581 if (res != OK) { in setPreviewWindowL()
583 __FUNCTION__, strerror(-res), res); in setPreviewWindowL()
584 return res; in setPreviewWindowL()
591 res = mStreamingProcessor->setPreviewWindow(window); in setPreviewWindowL()
592 if (res != OK) { in setPreviewWindowL()
594 __FUNCTION__, strerror(-res), res); in setPreviewWindowL()
595 return res; in setPreviewWindowL()
619 status_t res = OK; in setPreviewCallbackFlagL() local
645 res = mCallbackProcessor->setCallbackWindow(NULL); in setPreviewCallbackFlagL()
646 if (res != OK) { in setPreviewCallbackFlagL()
648 " %s (%d)", __FUNCTION__, mCameraId, strerror(-res), res); in setPreviewCallbackFlagL()
657 res = startPreviewL(params, true); in setPreviewCallbackFlagL()
658 if (res != OK) { in setPreviewCallbackFlagL()
672 status_t res; in setPreviewCallbackTarget() local
673 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setPreviewCallbackTarget()
680 res = mCallbackProcessor->setCallbackWindow(window); in setPreviewCallbackTarget()
681 if (res != OK) { in setPreviewCallbackTarget()
683 __FUNCTION__, mCameraId, strerror(-res), res); in setPreviewCallbackTarget()
684 return res; in setPreviewCallbackTarget()
701 res = startPreviewL(l.mParameters, true); in setPreviewCallbackTarget()
705 res = startRecordingL(l.mParameters, true); in setPreviewCallbackTarget()
710 if (res != OK) { in setPreviewCallbackTarget()
724 status_t res; in startPreview() local
725 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in startPreview()
732 status_t res; in startPreviewL() local
763 res = mStreamingProcessor->updatePreviewStream(params); in startPreviewL()
764 if (res != OK) { in startPreviewL()
766 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
767 return res; in startPreviewL()
788 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in startPreviewL()
789 if (res != OK) { in startPreviewL()
791 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
793 res = mDevice->waitUntilDrained(); in startPreviewL()
794 if (res != OK) { in startPreviewL()
796 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
800 res = mJpegProcessor->deleteStream(); in startPreviewL()
802 if (res != OK) { in startPreviewL()
804 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
808 res = mStreamingProcessor->togglePauseStream(/*pause*/false); in startPreviewL()
809 if (res != OK) { in startPreviewL()
811 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
816 res = updateProcessorStream(mJpegProcessor, params); in startPreviewL()
817 if (res != OK) { in startPreviewL()
820 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
821 return res; in startPreviewL()
837 res = mStreamingProcessor->stopStream(); in startPreviewL()
838 if (res != OK) { in startPreviewL()
841 return res; in startPreviewL()
843 res = mStreamingProcessor->deleteRecordingStream(); in startPreviewL()
844 if (res != OK) { in startPreviewL()
847 strerror(-res), res); in startPreviewL()
848 return res; in startPreviewL()
852 res = mCallbackProcessor->updateStream(params); in startPreviewL()
853 if (res != OK) { in startPreviewL()
855 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
856 return res; in startPreviewL()
866 res = mCallbackProcessor->deleteStream(); in startPreviewL()
867 if (res != OK) { in startPreviewL()
869 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
870 return res; in startPreviewL()
876 res = updateProcessorStream(mZslProcessor, params); in startPreviewL()
877 if (res != OK) { in startPreviewL()
879 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
880 return res; in startPreviewL()
903 res = mStreamingProcessor->updatePreviewRequest(params); in startPreviewL()
904 if (res != OK) { in startPreviewL()
907 strerror(-res), res); in startPreviewL()
908 return res; in startPreviewL()
911 res = mStreamingProcessor->startStream(StreamingProcessor::PREVIEW, in startPreviewL()
915 res = mStreamingProcessor->updateRecordingRequest(params); in startPreviewL()
916 if (res != OK) { in startPreviewL()
919 strerror(-res), res); in startPreviewL()
920 return res; in startPreviewL()
923 res = mStreamingProcessor->startStream(StreamingProcessor::RECORD, in startPreviewL()
926 if (res != OK) { in startPreviewL()
928 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
929 return res; in startPreviewL()
940 status_t res; in stopPreview() local
941 if ( (res = checkPid(__FUNCTION__) ) != OK) return; in stopPreview()
947 status_t res; in stopPreviewL() local
972 res = stopStream(); in stopPreviewL()
973 if (res != OK) { in stopPreviewL()
975 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
980 res = mDevice->flush(); in stopPreviewL()
981 if (res != OK) { in stopPreviewL()
983 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
986 res = mDevice->waitUntilDrained(); in stopPreviewL()
987 if (res != OK) { in stopPreviewL()
989 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
992 res = mStreamingProcessor->deleteRecordingStream(); in stopPreviewL()
993 if (res != OK) { in stopPreviewL()
996 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
1014 status_t res; in previewEnabled() local
1015 if ( (res = checkPid(__FUNCTION__) ) != OK) return false; in previewEnabled()
1024 status_t res; in setVideoBufferMode() local
1025 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setVideoBufferMode()
1054 status_t res; in startRecording() local
1055 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in startRecording()
1062 status_t res = OK; in startRecordingL() local
1068 res = startPreviewL(params, false); in startRecordingL()
1069 if (res != OK) return res; in startRecordingL()
1105 if (res != OK) { in startRecordingL()
1107 __FUNCTION__, mCameraId, strerror(-res), res); in startRecordingL()
1108 return res; in startRecordingL()
1117 res = mStreamingProcessor->stopStream(); in startRecordingL()
1118 if (res != OK) { in startRecordingL()
1121 return res; in startRecordingL()
1123 res = mCallbackProcessor->deleteStream(); in startRecordingL()
1124 if (res != OK) { in startRecordingL()
1127 strerror(-res), res); in startRecordingL()
1128 return res; in startRecordingL()
1136 res = mStreamingProcessor->stopStream(); in startRecordingL()
1137 if (res != OK) { in startRecordingL()
1140 return res; in startRecordingL()
1142 res = mDevice->waitUntilDrained(); in startRecordingL()
1143 if (res != OK) { in startRecordingL()
1145 __FUNCTION__, mCameraId, strerror(-res), res); in startRecordingL()
1147 res = mZslProcessor->clearZslQueue(); in startRecordingL()
1148 if (res != OK) { in startRecordingL()
1151 return res; in startRecordingL()
1153 res = mZslProcessor->deleteStream(); in startRecordingL()
1154 if (res != OK) { in startRecordingL()
1157 strerror(-res), res); in startRecordingL()
1158 return res; in startRecordingL()
1170 res = mStreamingProcessor->recordingStreamNeedsUpdate(params, &recordingStreamNeedsUpdate); in startRecordingL()
1171 if (res != OK) { in startRecordingL()
1174 return res; in startRecordingL()
1181 res = mStreamingProcessor->stopStream(); in startRecordingL()
1182 if (res != OK) { in startRecordingL()
1185 return res; in startRecordingL()
1187 res = mDevice->waitUntilDrained(); in startRecordingL()
1188 if (res != OK) { in startRecordingL()
1191 strerror(-res), res); in startRecordingL()
1194 res = updateProcessorStream< in startRecordingL()
1199 if (res != OK) { in startRecordingL()
1202 strerror(-res), res); in startRecordingL()
1203 return res; in startRecordingL()
1211 res = mStreamingProcessor->startStream(StreamingProcessor::RECORD, in startRecordingL()
1217 if (res == BAD_VALUE) { in startRecordingL()
1219 res = mStreamingProcessor->startStream(StreamingProcessor::RECORD, in startRecordingL()
1223 if (res != OK) { in startRecordingL()
1225 __FUNCTION__, mCameraId, strerror(-res), res); in startRecordingL()
1226 return res; in startRecordingL()
1242 status_t res; in stopRecording() local
1243 if ( (res = checkPid(__FUNCTION__) ) != OK) return; in stopRecording()
1263 res = stopStream(); in stopRecording()
1264 if (res != OK) { in stopRecording()
1266 __FUNCTION__, mCameraId, strerror(-res), res); in stopRecording()
1269 res = mDevice->waitUntilDrained(); in stopRecording()
1270 if (res != OK) { in stopRecording()
1272 __FUNCTION__, mCameraId, strerror(-res), res); in stopRecording()
1275 res = mStreamingProcessor->deleteRecordingStream(); in stopRecording()
1276 if (res != OK) { in stopRecording()
1279 __FUNCTION__, mCameraId, strerror(-res), res); in stopRecording()
1284 res = startPreviewL(l.mParameters, true); in stopRecording()
1285 if (res != OK) { in stopRecording()
1331 status_t res; in autoFocus() local
1332 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in autoFocus()
1410 status_t res; in cancelAutoFocus() local
1411 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in cancelAutoFocus()
1455 status_t res; in takePicture() local
1456 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in takePicture()
1471 res = commandStopFaceDetectionL(l.mParameters); in takePicture()
1472 if (res != OK) { in takePicture()
1475 return res; in takePicture()
1482 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in takePicture()
1483 if (res != OK) { in takePicture()
1485 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1487 res = mDevice->waitUntilDrained(); in takePicture()
1488 if (res != OK) { in takePicture()
1490 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1493 res = mStreamingProcessor->deleteRecordingStream(); in takePicture()
1494 if (res != OK) { in takePicture()
1497 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1499 res = mStreamingProcessor->togglePauseStream(/*pause*/false); in takePicture()
1500 if (res != OK) { in takePicture()
1502 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1522 res = updateProcessorStream(mJpegProcessor, l.mParameters); in takePicture()
1527 if (res == BAD_VALUE && l.mParameters.state == Parameters::VIDEO_SNAPSHOT) { in takePicture()
1529 res = updateProcessorStream(mJpegProcessor, l.mParameters); in takePicture()
1531 if (res != OK) { in takePicture()
1533 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1534 return res; in takePicture()
1563 res = mCaptureSequencer->startCapture(); in takePicture()
1564 if (res != OK) { in takePicture()
1566 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1569 return res; in takePicture()
1576 status_t res; in setParameters() local
1577 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setParameters()
1582 res = l.mParameters.set(params); in setParameters()
1583 if (res != OK) return res; in setParameters()
1590 res = updateRequests(l.mParameters); in setParameters()
1592 return res; in setParameters()
1610 status_t res; in sendCommand() local
1611 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in sendCommand()
1695 status_t res; in commandStartFaceDetectionL() local
1722 res = updateRequests(l.mParameters); in commandStartFaceDetectionL()
1724 return res; in commandStartFaceDetectionL()
1728 status_t res = OK; in commandStopFaceDetectionL() local
1739 res = updateRequests(params); in commandStopFaceDetectionL()
1742 return res; in commandStopFaceDetectionL()
1995 status_t res = OK; in createJpegStreamL() local
2001 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in createJpegStreamL()
2002 if (res != OK) { in createJpegStreamL()
2004 __FUNCTION__, mCameraId, strerror(-res), res); in createJpegStreamL()
2005 return res; in createJpegStreamL()
2008 res = mDevice->flush(); in createJpegStreamL()
2009 if (res != OK) { in createJpegStreamL()
2011 __FUNCTION__, mCameraId, strerror(-res), res); in createJpegStreamL()
2012 return res; in createJpegStreamL()
2017 res = mDevice->waitUntilDrained(); in createJpegStreamL()
2018 if (res != OK) { in createJpegStreamL()
2020 __FUNCTION__, mCameraId, strerror(-res), res); in createJpegStreamL()
2023 res = updateProcessorStream(mJpegProcessor, params); in createJpegStreamL()
2024 return res; in createJpegStreamL()
2037 status_t res; in updateRequests() local
2041 res = mStreamingProcessor->incrementStreamingIds(); in updateRequests()
2042 if (res != OK) { in updateRequests()
2044 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2045 return res; in updateRequests()
2048 res = mStreamingProcessor->updatePreviewRequest(params); in updateRequests()
2049 if (res != OK) { in updateRequests()
2051 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2052 return res; in updateRequests()
2054 res = mStreamingProcessor->updateRecordingRequest(params); in updateRequests()
2055 if (res != OK) { in updateRequests()
2057 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2058 return res; in updateRequests()
2062 res = startPreviewL(params, true); in updateRequests()
2063 if (res != OK) { in updateRequests()
2065 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2066 return res; in updateRequests()
2070 res = startRecordingL(params, true); in updateRequests()
2071 if (res != OK) { in updateRequests()
2073 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2074 return res; in updateRequests()
2077 return res; in updateRequests()
2112 status_t res; in syncWithDevice() local
2117 res = mDevice->waitUntilRequestReceived(activeRequestId, kMaxSyncTimeout); in syncWithDevice()
2118 if (res == TIMED_OUT) { in syncWithDevice()
2121 } else if (res != OK) { in syncWithDevice()
2125 return res; in syncWithDevice()
2140 status_t res; in updateProcessorStream() local
2144 res = (processorPtr->*updateStreamF)(params); in updateProcessorStream()
2152 if (res == -EBUSY) { in updateProcessorStream()
2155 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in updateProcessorStream()
2156 if (res != OK) { in updateProcessorStream()
2158 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2161 res = mDevice->waitUntilDrained(); in updateProcessorStream()
2162 if (res != OK) { in updateProcessorStream()
2164 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2167 res = (processorPtr->*updateStreamF)(params); in updateProcessorStream()
2168 if (res != OK) { in updateProcessorStream()
2171 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2174 res = mStreamingProcessor->togglePauseStream(/*pause*/false); in updateProcessorStream()
2175 if (res != OK) { in updateProcessorStream()
2177 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2181 return res; in updateProcessorStream()
2188 status_t res = updateProcessorStream(mJpegProcessor, params); in overrideVideoSnapshotSize() local
2189 if (res != OK) { in overrideVideoSnapshotSize()
2191 __FUNCTION__, mCameraId, strerror(-res), res); in overrideVideoSnapshotSize()
2193 return res; in overrideVideoSnapshotSize()
2200 status_t res; in setVideoTarget() local
2201 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setVideoTarget()
2222 if ((res = anw->query(anw, NATIVE_WINDOW_FORMAT, &format)) != OK) { in setVideoTarget()
2224 return res; in setVideoTarget()
2227 if ((res = anw->query(anw, NATIVE_WINDOW_DEFAULT_DATASPACE, in setVideoTarget()
2230 return res; in setVideoTarget()
2258 res = mStreamingProcessor->setRecordingWindow(window); in setVideoTarget()
2259 if (res != OK) { in setVideoTarget()
2261 __FUNCTION__, strerror(-res), res); in setVideoTarget()
2262 return res; in setVideoTarget()
2296 auto res = waitUntilRequestIdApplied(activeRequestId, in waitUntilCurrentRequestIdLocked() local
2298 if (res == TIMED_OUT) { in waitUntilCurrentRequestIdLocked()
2301 return res; in waitUntilCurrentRequestIdLocked()
2302 } else if (res != OK) { in waitUntilCurrentRequestIdLocked()
2305 return res; in waitUntilCurrentRequestIdLocked()
2317 auto res = mLatestRequestSignal.waitRelative(mLatestRequestMutex, timeout); in waitUntilRequestIdApplied() local
2318 if (res != OK) return res; in waitUntilRequestIdApplied()