Lines Matching refs:l
64 SharedParameters::Lock l(mParameters); in Camera2Client() local
65 l.mParameters.state = Parameters::DISCONNECTED; in Camera2Client()
82 SharedParameters::Lock l(mParameters); in initialize() local
84 res = l.mParameters.initialize(&(mDevice->info()), mDeviceVersion); in initialize()
144 SharedParameters::Lock l(mParameters); in initialize() local
147 ALOGD("%s", l.mParameters.paramsFlattened.string()); in initialize()
408 SharedParameters::Lock l(mParameters); in disconnect() local
409 if (l.mParameters.state == Parameters::DISCONNECTED) return; in disconnect()
410 l.mParameters.state = Parameters::DISCONNECTED; in disconnect()
506 SharedParameters::Lock l(mParameters); in unlock() local
507 if (l.mParameters.state == Parameters::RECORD || in unlock()
508 l.mParameters.state == Parameters::VIDEO_SNAPSHOT) { in unlock()
556 SharedParameters::Lock l(mParameters); in setPreviewWindowL() local
557 state = l.mParameters.state; in setPreviewWindowL()
593 SharedParameters::Lock l(mParameters); in setPreviewWindowL() local
594 l.mParameters.state = state; in setPreviewWindowL()
595 return startPreviewL(l.mParameters, false); in setPreviewWindowL()
608 SharedParameters::Lock l(mParameters); in setPreviewCallbackFlag() local
609 setPreviewCallbackFlagL(l.mParameters, flag); in setPreviewCallbackFlag()
681 SharedParameters::Lock l(mParameters); in setPreviewCallbackTarget() local
685 l.mParameters.previewCallbackFlags = CAMERA_FRAME_CALLBACK_FLAG_NOOP; in setPreviewCallbackTarget()
686 l.mParameters.previewCallbackOneShot = false; in setPreviewCallbackTarget()
687 l.mParameters.previewCallbackSurface = true; in setPreviewCallbackTarget()
690 l.mParameters.previewCallbackSurface = false; in setPreviewCallbackTarget()
693 switch(l.mParameters.state) { in setPreviewCallbackTarget()
695 res = startPreviewL(l.mParameters, true); in setPreviewCallbackTarget()
699 res = startRecordingL(l.mParameters, true); in setPreviewCallbackTarget()
707 Parameters::getStateName(l.mParameters.state)); in setPreviewCallbackTarget()
720 SharedParameters::Lock l(mParameters); in startPreview() local
721 return startPreviewL(l.mParameters, false); in startPreview()
899 SharedParameters::Lock l(mParameters); in stopPreviewL() local
900 state = l.mParameters.state; in stopPreviewL()
943 SharedParameters::Lock l(mParameters); in stopPreviewL() local
944 l.mParameters.state = Parameters::STOPPED; in stopPreviewL()
945 commandStopFaceDetectionL(l.mParameters); in stopPreviewL()
960 SharedParameters::Lock l(mParameters); in previewEnabled() local
961 return l.mParameters.state == Parameters::PREVIEW; in previewEnabled()
970 SharedParameters::Lock l(mParameters); in storeMetaDataInBuffers() local
971 switch (l.mParameters.state) { in storeMetaDataInBuffers()
976 Parameters::getStateName(l.mParameters.state)); in storeMetaDataInBuffers()
983 l.mParameters.storeMetadataInBuffers = enabled; in storeMetaDataInBuffers()
994 SharedParameters::Lock l(mParameters); in startRecording() local
996 return startRecordingL(l.mParameters, false); in startRecording()
1189 SharedParameters::Lock l(mParameters); in stopRecording() local
1194 switch (l.mParameters.state) { in stopRecording()
1205 Parameters::getStateName(l.mParameters.state)); in stopRecording()
1212 if (!l.mParameters.recordingHint && l.mParameters.isJpegSizeOverridden()) { in stopRecording()
1230 l.mParameters.recoverOverriddenJpegSize(); in stopRecording()
1233 res = startPreviewL(l.mParameters, true); in stopRecording()
1251 SharedParameters::Lock l(mParameters); in recordingEnabledL() local
1253 return (l.mParameters.state == Parameters::RECORD in recordingEnabledL()
1254 || l.mParameters.state == Parameters::VIDEO_SNAPSHOT); in recordingEnabledL()
1276 SharedParameters::Lock l(mParameters); in autoFocus() local
1277 if (l.mParameters.state < Parameters::PREVIEW) { in autoFocus()
1279 __FUNCTION__, mCameraId, l.mParameters.state); in autoFocus()
1291 if (l.mParameters.focusMode == Parameters::FOCUS_MODE_FIXED || in autoFocus()
1292 l.mParameters.focusMode == Parameters::FOCUS_MODE_INFINITY) { in autoFocus()
1301 if ( (l.mParameters.focusMode == Parameters::FOCUS_MODE_CONTINUOUS_PICTURE || in autoFocus()
1302 l.mParameters.focusMode == Parameters::FOCUS_MODE_CONTINUOUS_VIDEO) && in autoFocus()
1303 l.mParameters.focusState == ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED ) { in autoFocus()
1311 SharedCameraCallbacks::Lock l(mSharedCameraCallbacks); in autoFocus() local
1312 if (l.mRemoteCallback != 0) { in autoFocus()
1313 l.mRemoteCallback->notifyCallback(CAMERA_MSG_FOCUS, in autoFocus()
1321 if (l.mParameters.quirks.triggerAfWithAuto && in autoFocus()
1322 l.mParameters.sceneMode != ANDROID_CONTROL_SCENE_MODE_DISABLED && in autoFocus()
1323 l.mParameters.focusMode != Parameters::FOCUS_MODE_AUTO && in autoFocus()
1324 !l.mParameters.focusingAreas[0].isEmpty()) { in autoFocus()
1326 __FUNCTION__, l.mParameters.focusMode); in autoFocus()
1327 l.mParameters.shadowFocusMode = l.mParameters.focusMode; in autoFocus()
1328 l.mParameters.focusMode = Parameters::FOCUS_MODE_AUTO; in autoFocus()
1329 updateRequests(l.mParameters); in autoFocus()
1332 l.mParameters.currentAfTriggerId = ++l.mParameters.afTriggerCounter; in autoFocus()
1333 triggerId = l.mParameters.currentAfTriggerId; in autoFocus()
1353 SharedParameters::Lock l(mParameters); in cancelAutoFocus() local
1355 if (l.mParameters.focusMode == Parameters::FOCUS_MODE_FIXED || in cancelAutoFocus()
1356 l.mParameters.focusMode == Parameters::FOCUS_MODE_INFINITY) { in cancelAutoFocus()
1361 if (l.mParameters.afTriggerCounter == l.mParameters.currentAfTriggerId) { in cancelAutoFocus()
1362 ATRACE_ASYNC_END(kAutofocusLabel, l.mParameters.currentAfTriggerId); in cancelAutoFocus()
1365 triggerId = ++l.mParameters.afTriggerCounter; in cancelAutoFocus()
1370 if (l.mParameters.shadowFocusMode != Parameters::FOCUS_MODE_INVALID) { in cancelAutoFocus()
1372 l.mParameters.shadowFocusMode); in cancelAutoFocus()
1373 l.mParameters.focusMode = l.mParameters.shadowFocusMode; in cancelAutoFocus()
1374 l.mParameters.shadowFocusMode = Parameters::FOCUS_MODE_INVALID; in cancelAutoFocus()
1375 updateRequests(l.mParameters); in cancelAutoFocus()
1379 if (l.mParameters.zslMode) { in cancelAutoFocus()
1398 SharedParameters::Lock l(mParameters); in takePicture() local
1399 switch (l.mParameters.state) { in takePicture()
1408 res = commandStopFaceDetectionL(l.mParameters); in takePicture()
1414 l.mParameters.state = Parameters::STILL_CAPTURE; in takePicture()
1417 if (l.mParameters.isJpegSizeOverridden() && in takePicture()
1441 l.mParameters.recoverOverriddenJpegSize(); in takePicture()
1446 l.mParameters.state = Parameters::VIDEO_SNAPSHOT; in takePicture()
1458 res = updateProcessorStream(mJpegProcessor, l.mParameters); in takePicture()
1461 if (res == BAD_VALUE && l.mParameters.state == Parameters::VIDEO_SNAPSHOT) { in takePicture()
1462 overrideVideoSnapshotSize(l.mParameters); in takePicture()
1463 res = updateProcessorStream(mJpegProcessor, l.mParameters); in takePicture()
1470 takePictureCounter = ++l.mParameters.takePictureCounter; in takePicture()
1474 if (l.mParameters.zslMode && jpegStreamChanged) { in takePicture()
1502 SharedParameters::Lock l(mParameters); in setParameters() local
1504 Parameters::focusMode_t focusModeBefore = l.mParameters.focusMode; in setParameters()
1505 res = l.mParameters.set(params); in setParameters()
1507 Parameters::focusMode_t focusModeAfter = l.mParameters.focusMode; in setParameters()
1509 if (l.mParameters.zslMode && focusModeAfter != focusModeBefore) { in setParameters()
1513 res = updateRequests(l.mParameters); in setParameters()
1525 SharedParameters::ReadLock l(mParameters); in getParameters() local
1527 return l.mParameters.get(); in getParameters()
1553 SharedParameters::Lock l(mParameters); in sendCommand() local
1554 return commandStopFaceDetectionL(l.mParameters); in sendCommand()
1587 SharedParameters::Lock l(mParameters); in commandSetDisplayOrientationL() local
1588 if (transform != l.mParameters.previewTransform && in commandSetDisplayOrientationL()
1592 l.mParameters.previewTransform = transform; in commandSetDisplayOrientationL()
1597 SharedParameters::Lock l(mParameters); in commandEnableShutterSoundL() local
1599 l.mParameters.playShutterSound = true; in commandEnableShutterSoundL()
1606 l.mParameters.playShutterSound = false; in commandEnableShutterSoundL()
1624 l.mParameters.playShutterSound = false; in commandEnableShutterSoundL()
1637 SharedParameters::Lock l(mParameters); in commandStartFaceDetectionL() local
1638 switch (l.mParameters.state) { in commandStartFaceDetectionL()
1653 if (l.mParameters.fastInfo.bestFaceDetectMode == in commandStartFaceDetectionL()
1659 if (l.mParameters.enableFaceDetect) return OK; in commandStartFaceDetectionL()
1661 l.mParameters.enableFaceDetect = true; in commandStartFaceDetectionL()
1663 res = updateRequests(l.mParameters); in commandStartFaceDetectionL()
1687 SharedParameters::Lock l(mParameters); in commandEnableFocusMoveMsgL() local
1688 l.mParameters.enableFocusMoveMessages = enable; in commandEnableFocusMoveMsgL()
1695 SharedParameters::Lock l(mParameters); in commandPingL() local
1696 if (l.mParameters.state != Parameters::DISCONNECTED) { in commandPingL()
1723 SharedParameters::Lock l(mParameters); in notifyAutoFocus() local
1726 if (l.mParameters.afStateCounter > 0) { in notifyAutoFocus()
1728 ANDROID_CONTROL_AF_STATE, l.mParameters.focusState, tmp, sizeof(tmp)); in notifyAutoFocus()
1729 ATRACE_ASYNC_END(tmp, l.mParameters.afStateCounter); in notifyAutoFocus()
1733 l.mParameters.focusState = newState; in notifyAutoFocus()
1734 l.mParameters.afStateCounter++; in notifyAutoFocus()
1739 ANDROID_CONTROL_AF_STATE, l.mParameters.focusState, tmp, sizeof(tmp)); in notifyAutoFocus()
1740 ATRACE_ASYNC_BEGIN(tmp, l.mParameters.afStateCounter); in notifyAutoFocus()
1742 switch (l.mParameters.focusMode) { in notifyAutoFocus()
1748 if (triggerId != l.mParameters.currentAfTriggerId) break; in notifyAutoFocus()
1755 l.mParameters.currentAfTriggerId = -1; in notifyAutoFocus()
1783 if (triggerId != l.mParameters.currentAfTriggerId) break; in notifyAutoFocus()
1786 if (l.mParameters.enableFocusMoveMessages && in notifyAutoFocus()
1787 l.mParameters.afInMotion) { in notifyAutoFocus()
1790 l.mParameters.currentAfTriggerId = -1; in notifyAutoFocus()
1796 if (l.mParameters.enableFocusMoveMessages && in notifyAutoFocus()
1797 l.mParameters.afInMotion) { in notifyAutoFocus()
1808 if (l.mParameters.enableFocusMoveMessages) { in notifyAutoFocus()
1813 l.mParameters.afInMotion = afInMotion; in notifyAutoFocus()
1823 l.mParameters.focusMode); in notifyAutoFocus()
1828 SharedCameraCallbacks::Lock l(mSharedCameraCallbacks); in notifyAutoFocus() local
1829 if (l.mRemoteCallback != 0) { in notifyAutoFocus()
1830 l.mRemoteCallback->notifyCallback(CAMERA_MSG_FOCUS_MOVE, in notifyAutoFocus()
1836 SharedCameraCallbacks::Lock l(mSharedCameraCallbacks); in notifyAutoFocus() local
1837 if (l.mRemoteCallback != 0) { in notifyAutoFocus()
1838 l.mRemoteCallback->notifyCallback(CAMERA_MSG_FOCUS, in notifyAutoFocus()