Lines Matching refs:res
100 status_t res = mDevice->createDefaultRequest( in isZslEnabledInStillTemplate() local
102 if (res == OK) { in isZslEnabledInStillTemplate()
117 status_t res; in initializeImpl() local
119 res = Camera2ClientBase::initialize(providerPtr, monitorTags); in initializeImpl()
120 if (res != OK) { in initializeImpl()
121 return res; in initializeImpl()
127 res = l.mParameters.initialize(mDevice.get()); in initializeImpl()
128 if (res != OK) { in initializeImpl()
130 __FUNCTION__, mCameraId, strerror(-res), res); in initializeImpl()
149 res = mFrameProcessor->run((threadName + "-FrameProc").c_str()); in initializeImpl()
150 if (res != OK) { in initializeImpl()
152 __FUNCTION__, strerror(-res), res); in initializeImpl()
153 return res; in initializeImpl()
157 res = mCaptureSequencer->run((threadName + "-CaptureSeq").c_str()); in initializeImpl()
158 if (res != OK) { in initializeImpl()
160 __FUNCTION__, strerror(-res), res); in initializeImpl()
161 return res; in initializeImpl()
165 res = mJpegProcessor->run((threadName + "-JpegProc").c_str()); in initializeImpl()
166 if (res != OK) { in initializeImpl()
168 __FUNCTION__, strerror(-res), res); in initializeImpl()
169 return res; in initializeImpl()
173 res = mZslProcessor->run((threadName + "-ZslProc").c_str()); in initializeImpl()
174 if (res != OK) { in initializeImpl()
176 __FUNCTION__, strerror(-res), res); in initializeImpl()
177 return res; in initializeImpl()
181 res = mCallbackProcessor->run((threadName + "-CallbkProc").c_str()); in initializeImpl()
182 if (res != OK) { in initializeImpl()
184 __FUNCTION__, strerror(-res), res); in initializeImpl()
185 return res; in initializeImpl()
446 binder::Status res = binder::Status::ok(); in disconnect() local
449 if (callingPid != mClientPid && callingPid != mServicePid) return res; in disconnect()
451 if (mDevice == 0) return res; in disconnect()
465 if (l.mParameters.state == Parameters::DISCONNECTED) return res; in disconnect()
509 return res; in disconnect()
583 status_t res; in setPreviewTarget() local
584 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setPreviewTarget()
601 status_t res; in setPreviewWindowL() local
629 res = stopStream(); in setPreviewWindowL()
630 if (res != OK) { in setPreviewWindowL()
632 __FUNCTION__, strerror(-res), res); in setPreviewWindowL()
633 return res; in setPreviewWindowL()
640 res = mStreamingProcessor->setPreviewWindow(window); in setPreviewWindowL()
641 if (res != OK) { in setPreviewWindowL()
643 __FUNCTION__, strerror(-res), res); in setPreviewWindowL()
644 return res; in setPreviewWindowL()
668 status_t res = OK; in setPreviewCallbackFlagL() local
694 res = mCallbackProcessor->setCallbackWindow(NULL); in setPreviewCallbackFlagL()
695 if (res != OK) { in setPreviewCallbackFlagL()
697 " %s (%d)", __FUNCTION__, mCameraId, strerror(-res), res); in setPreviewCallbackFlagL()
706 res = startPreviewL(params, true); in setPreviewCallbackFlagL()
707 if (res != OK) { in setPreviewCallbackFlagL()
721 status_t res; in setPreviewCallbackTarget() local
722 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setPreviewCallbackTarget()
729 res = mCallbackProcessor->setCallbackWindow(window); in setPreviewCallbackTarget()
730 if (res != OK) { in setPreviewCallbackTarget()
732 __FUNCTION__, mCameraId, strerror(-res), res); in setPreviewCallbackTarget()
733 return res; in setPreviewCallbackTarget()
750 res = startPreviewL(l.mParameters, true); in setPreviewCallbackTarget()
754 res = startRecordingL(l.mParameters, true); in setPreviewCallbackTarget()
759 if (res != OK) { in setPreviewCallbackTarget()
773 status_t res; in startPreview() local
774 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in startPreview()
781 status_t res; in startPreviewL() local
812 res = mStreamingProcessor->updatePreviewStream(params); in startPreviewL()
813 if (res != OK) { in startPreviewL()
815 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
816 return res; in startPreviewL()
837 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in startPreviewL()
838 if (res != OK) { in startPreviewL()
840 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
842 res = mDevice->waitUntilDrained(); in startPreviewL()
843 if (res != OK) { in startPreviewL()
845 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
849 res = mJpegProcessor->deleteStream(); in startPreviewL()
851 if (res != OK) { in startPreviewL()
853 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
857 res = mStreamingProcessor->togglePauseStream(/*pause*/false); in startPreviewL()
858 if (res != OK) { in startPreviewL()
860 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
865 res = updateProcessorStream(mJpegProcessor, params); in startPreviewL()
866 if (res != OK) { in startPreviewL()
869 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
870 return res; in startPreviewL()
886 res = mStreamingProcessor->stopStream(); in startPreviewL()
887 if (res != OK) { in startPreviewL()
890 return res; in startPreviewL()
892 res = mStreamingProcessor->deleteRecordingStream(); in startPreviewL()
893 if (res != OK) { in startPreviewL()
896 strerror(-res), res); in startPreviewL()
897 return res; in startPreviewL()
901 res = mCallbackProcessor->updateStream(params); in startPreviewL()
902 if (res != OK) { in startPreviewL()
904 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
905 return res; in startPreviewL()
915 res = mCallbackProcessor->deleteStream(); in startPreviewL()
916 if (res != OK) { in startPreviewL()
918 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
919 return res; in startPreviewL()
925 res = updateProcessorStream(mZslProcessor, params); in startPreviewL()
926 if (res != OK) { in startPreviewL()
928 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
929 return res; in startPreviewL()
952 res = mStreamingProcessor->updatePreviewRequest(params); in startPreviewL()
953 if (res != OK) { in startPreviewL()
956 strerror(-res), res); in startPreviewL()
957 return res; in startPreviewL()
960 res = mStreamingProcessor->startStream(StreamingProcessor::PREVIEW, in startPreviewL()
964 res = mStreamingProcessor->updateRecordingRequest(params); in startPreviewL()
965 if (res != OK) { in startPreviewL()
968 strerror(-res), res); in startPreviewL()
969 return res; in startPreviewL()
972 res = mStreamingProcessor->startStream(StreamingProcessor::RECORD, in startPreviewL()
975 if (res != OK) { in startPreviewL()
977 __FUNCTION__, mCameraId, strerror(-res), res); in startPreviewL()
978 return res; in startPreviewL()
990 status_t res; in stopPreview() local
991 if ( (res = checkPid(__FUNCTION__) ) != OK) return; in stopPreview()
997 status_t res; in stopPreviewL() local
1023 res = stopStream(); in stopPreviewL()
1024 if (res != OK) { in stopPreviewL()
1026 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
1031 res = mDevice->flush(); in stopPreviewL()
1032 if (res != OK) { in stopPreviewL()
1034 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
1037 res = mDevice->waitUntilDrained(); in stopPreviewL()
1038 if (res != OK) { in stopPreviewL()
1040 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
1043 res = mStreamingProcessor->deleteRecordingStream(); in stopPreviewL()
1044 if (res != OK) { in stopPreviewL()
1047 __FUNCTION__, mCameraId, strerror(-res), res); in stopPreviewL()
1065 status_t res; in previewEnabled() local
1066 if ( (res = checkPid(__FUNCTION__) ) != OK) return false; in previewEnabled()
1075 status_t res; in setVideoBufferMode() local
1076 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setVideoBufferMode()
1105 status_t res; in startRecording() local
1106 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in startRecording()
1113 status_t res = OK; in startRecordingL() local
1119 res = startPreviewL(params, false); in startRecordingL()
1120 if (res != OK) return res; in startRecordingL()
1156 if (res != OK) { in startRecordingL()
1158 __FUNCTION__, mCameraId, strerror(-res), res); in startRecordingL()
1159 return res; in startRecordingL()
1168 res = mStreamingProcessor->stopStream(); in startRecordingL()
1169 if (res != OK) { in startRecordingL()
1172 return res; in startRecordingL()
1174 res = mCallbackProcessor->deleteStream(); in startRecordingL()
1175 if (res != OK) { in startRecordingL()
1178 strerror(-res), res); in startRecordingL()
1179 return res; in startRecordingL()
1187 res = mStreamingProcessor->stopStream(); in startRecordingL()
1188 if (res != OK) { in startRecordingL()
1191 return res; in startRecordingL()
1193 res = mDevice->waitUntilDrained(); in startRecordingL()
1194 if (res != OK) { in startRecordingL()
1196 __FUNCTION__, mCameraId, strerror(-res), res); in startRecordingL()
1198 res = mZslProcessor->clearZslQueue(); in startRecordingL()
1199 if (res != OK) { in startRecordingL()
1202 return res; in startRecordingL()
1204 res = mZslProcessor->deleteStream(); in startRecordingL()
1205 if (res != OK) { in startRecordingL()
1208 strerror(-res), res); in startRecordingL()
1209 return res; in startRecordingL()
1221 res = mStreamingProcessor->recordingStreamNeedsUpdate(params, &recordingStreamNeedsUpdate); in startRecordingL()
1222 if (res != OK) { in startRecordingL()
1225 return res; in startRecordingL()
1232 res = mStreamingProcessor->stopStream(); in startRecordingL()
1233 if (res != OK) { in startRecordingL()
1236 return res; in startRecordingL()
1238 res = mDevice->waitUntilDrained(); in startRecordingL()
1239 if (res != OK) { in startRecordingL()
1242 strerror(-res), res); in startRecordingL()
1245 res = updateProcessorStream< in startRecordingL()
1250 if (res != OK) { in startRecordingL()
1253 strerror(-res), res); in startRecordingL()
1254 return res; in startRecordingL()
1262 res = mStreamingProcessor->startStream(StreamingProcessor::RECORD, in startRecordingL()
1268 if (res == BAD_VALUE) { in startRecordingL()
1270 res = mStreamingProcessor->startStream(StreamingProcessor::RECORD, in startRecordingL()
1274 if (res != OK) { in startRecordingL()
1276 __FUNCTION__, mCameraId, strerror(-res), res); in startRecordingL()
1277 return res; in startRecordingL()
1293 status_t res; in stopRecording() local
1294 if ( (res = checkPid(__FUNCTION__) ) != OK) return; in stopRecording()
1314 res = stopStream(); in stopRecording()
1315 if (res != OK) { in stopRecording()
1317 __FUNCTION__, mCameraId, strerror(-res), res); in stopRecording()
1320 res = mDevice->waitUntilDrained(); in stopRecording()
1321 if (res != OK) { in stopRecording()
1323 __FUNCTION__, mCameraId, strerror(-res), res); in stopRecording()
1326 res = mStreamingProcessor->deleteRecordingStream(); in stopRecording()
1327 if (res != OK) { in stopRecording()
1330 __FUNCTION__, mCameraId, strerror(-res), res); in stopRecording()
1335 res = startPreviewL(l.mParameters, true); in stopRecording()
1336 if (res != OK) { in stopRecording()
1379 status_t res; in autoFocus() local
1380 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in autoFocus()
1458 status_t res; in cancelAutoFocus() local
1459 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in cancelAutoFocus()
1508 status_t res; in takePicture() local
1509 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in takePicture()
1524 res = commandStopFaceDetectionL(l.mParameters); in takePicture()
1525 if (res != OK) { in takePicture()
1528 return res; in takePicture()
1535 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in takePicture()
1536 if (res != OK) { in takePicture()
1538 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1540 res = mDevice->waitUntilDrained(); in takePicture()
1541 if (res != OK) { in takePicture()
1543 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1546 res = mStreamingProcessor->deleteRecordingStream(); in takePicture()
1547 if (res != OK) { in takePicture()
1550 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1552 res = mStreamingProcessor->togglePauseStream(/*pause*/false); in takePicture()
1553 if (res != OK) { in takePicture()
1555 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1575 res = updateProcessorStream(mJpegProcessor, l.mParameters); in takePicture()
1580 if (res == BAD_VALUE && l.mParameters.state == Parameters::VIDEO_SNAPSHOT) { in takePicture()
1582 res = updateProcessorStream(mJpegProcessor, l.mParameters); in takePicture()
1584 if (res != OK) { in takePicture()
1586 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1587 return res; in takePicture()
1616 res = mCaptureSequencer->startCapture(); in takePicture()
1617 if (res != OK) { in takePicture()
1619 __FUNCTION__, mCameraId, strerror(-res), res); in takePicture()
1622 return res; in takePicture()
1629 status_t res; in setParameters() local
1630 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setParameters()
1635 res = l.mParameters.set(params); in setParameters()
1636 if (res != OK) return res; in setParameters()
1643 res = updateRequests(l.mParameters); in setParameters()
1645 return res; in setParameters()
1663 status_t res; in sendCommand() local
1664 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in sendCommand()
1756 status_t res; in commandStartFaceDetectionL() local
1783 res = updateRequests(l.mParameters); in commandStartFaceDetectionL()
1785 return res; in commandStartFaceDetectionL()
1789 status_t res = OK; in commandStopFaceDetectionL() local
1800 res = updateRequests(params); in commandStopFaceDetectionL()
1803 return res; in commandStopFaceDetectionL()
2056 status_t res = OK; in createJpegStreamL() local
2062 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in createJpegStreamL()
2063 if (res != OK) { in createJpegStreamL()
2065 __FUNCTION__, mCameraId, strerror(-res), res); in createJpegStreamL()
2066 return res; in createJpegStreamL()
2069 res = mDevice->flush(); in createJpegStreamL()
2070 if (res != OK) { in createJpegStreamL()
2072 __FUNCTION__, mCameraId, strerror(-res), res); in createJpegStreamL()
2073 return res; in createJpegStreamL()
2078 res = mDevice->waitUntilDrained(); in createJpegStreamL()
2079 if (res != OK) { in createJpegStreamL()
2081 __FUNCTION__, mCameraId, strerror(-res), res); in createJpegStreamL()
2084 res = updateProcessorStream(mJpegProcessor, params); in createJpegStreamL()
2085 return res; in createJpegStreamL()
2098 status_t res; in updateRequests() local
2102 res = mStreamingProcessor->incrementStreamingIds(); in updateRequests()
2103 if (res != OK) { in updateRequests()
2105 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2106 return res; in updateRequests()
2109 res = mStreamingProcessor->updatePreviewRequest(params); in updateRequests()
2110 if (res != OK) { in updateRequests()
2112 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2113 return res; in updateRequests()
2115 res = mStreamingProcessor->updateRecordingRequest(params); in updateRequests()
2116 if (res != OK) { in updateRequests()
2118 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2119 return res; in updateRequests()
2123 res = startPreviewL(params, true); in updateRequests()
2124 if (res != OK) { in updateRequests()
2126 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2127 return res; in updateRequests()
2131 res = startRecordingL(params, true); in updateRequests()
2132 if (res != OK) { in updateRequests()
2134 __FUNCTION__, mCameraId, strerror(-res), res); in updateRequests()
2135 return res; in updateRequests()
2138 return res; in updateRequests()
2173 status_t res; in syncWithDevice() local
2178 res = mDevice->waitUntilRequestReceived(activeRequestId, kMaxSyncTimeout); in syncWithDevice()
2179 if (res == TIMED_OUT) { in syncWithDevice()
2182 } else if (res != OK) { in syncWithDevice()
2186 return res; in syncWithDevice()
2201 status_t res; in updateProcessorStream() local
2205 res = (processorPtr->*updateStreamF)(params); in updateProcessorStream()
2213 if (res == -EBUSY) { in updateProcessorStream()
2216 res = mStreamingProcessor->togglePauseStream(/*pause*/true); in updateProcessorStream()
2217 if (res != OK) { in updateProcessorStream()
2219 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2222 res = mDevice->waitUntilDrained(); in updateProcessorStream()
2223 if (res != OK) { in updateProcessorStream()
2225 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2228 res = (processorPtr->*updateStreamF)(params); in updateProcessorStream()
2229 if (res != OK) { in updateProcessorStream()
2232 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2235 res = mStreamingProcessor->togglePauseStream(/*pause*/false); in updateProcessorStream()
2236 if (res != OK) { in updateProcessorStream()
2238 __FUNCTION__, mCameraId, strerror(-res), res); in updateProcessorStream()
2242 return res; in updateProcessorStream()
2249 status_t res = updateProcessorStream(mJpegProcessor, params); in overrideVideoSnapshotSize() local
2250 if (res != OK) { in overrideVideoSnapshotSize()
2252 __FUNCTION__, mCameraId, strerror(-res), res); in overrideVideoSnapshotSize()
2254 return res; in overrideVideoSnapshotSize()
2261 status_t res; in setVideoTarget() local
2262 if ( (res = checkPid(__FUNCTION__) ) != OK) return res; in setVideoTarget()
2283 if ((res = anw->query(anw, NATIVE_WINDOW_FORMAT, &format)) != OK) { in setVideoTarget()
2285 return res; in setVideoTarget()
2288 if ((res = anw->query(anw, NATIVE_WINDOW_DEFAULT_DATASPACE, in setVideoTarget()
2291 return res; in setVideoTarget()
2319 res = mStreamingProcessor->setRecordingWindow(window); in setVideoTarget()
2320 if (res != OK) { in setVideoTarget()
2322 __FUNCTION__, strerror(-res), res); in setVideoTarget()
2323 return res; in setVideoTarget()
2403 auto res = waitUntilRequestIdApplied(activeRequestId, in waitUntilCurrentRequestIdLocked() local
2405 if (res == TIMED_OUT) { in waitUntilCurrentRequestIdLocked()
2408 return res; in waitUntilCurrentRequestIdLocked()
2409 } else if (res != OK) { in waitUntilCurrentRequestIdLocked()
2412 return res; in waitUntilCurrentRequestIdLocked()
2427 auto res = mLatestRequestSignal.waitRelative(mLatestRequestMutex, timeout); in waitUntilRequestIdApplied() local
2428 if (res != OK) return res; in waitUntilRequestIdApplied()