Lines Matching refs:dev
935 ACameraDevice* dev; in onMessageReceived() local
936 found = msg->findPointer(kDeviceKey, (void**) &dev); in onMessageReceived()
937 if (!found || dev == nullptr) { in onMessageReceived()
950 (*onDisconnected)(context, dev); in onMessageReceived()
955 ACameraDevice* dev; in onMessageReceived() local
956 found = msg->findPointer(kDeviceKey, (void**) &dev); in onMessageReceived()
957 if (!found || dev == nullptr) { in onMessageReceived()
976 (*onError)(context, dev, errorCode); in onMessageReceived()
1404 sp<CameraDevice> dev = mDevice.promote(); in onDeviceError() local
1405 if (dev == nullptr) { in onDeviceError()
1409 sp<ACameraCaptureSession> session = dev->mCurrentSession.promote(); in onDeviceError()
1410 Mutex::Autolock _l(dev->mDeviceLock); in onDeviceError()
1411 if (dev->mRemote == nullptr) { in onDeviceError()
1421 dev->mCurrentSession = nullptr; in onDeviceError()
1422 sp<AMessage> msg = new AMessage(kWhatOnDisconnected, dev->mHandler); in onDeviceError()
1423 msg->setPointer(kContextKey, dev->mAppCallbacks.context); in onDeviceError()
1424 msg->setPointer(kDeviceKey, (void*) dev->getWrapper()); in onDeviceError()
1425 msg->setPointer(kCallbackFpKey, (void*) dev->mAppCallbacks.onDisconnected); in onDeviceError()
1441 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_DEVICE); in onDeviceError()
1444 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_SERVICE); in onDeviceError()
1448 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_UNKNOWN); in onDeviceError()
1451 sp<AMessage> msg = new AMessage(kWhatOnError, dev->mHandler); in onDeviceError()
1452 msg->setPointer(kContextKey, dev->mAppCallbacks.context); in onDeviceError()
1453 msg->setPointer(kDeviceKey, (void*) dev->getWrapper()); in onDeviceError()
1454 msg->setPointer(kCallbackFpKey, (void*) dev->mAppCallbacks.onError); in onDeviceError()
1462 dev->onCaptureErrorLocked(errorCode, resultExtras); in onDeviceError()
1472 sp<CameraDevice> dev = mDevice.promote(); in onDeviceIdle() local
1473 if (dev == nullptr) { in onDeviceIdle()
1477 Mutex::Autolock _l(dev->mDeviceLock); in onDeviceIdle()
1478 if (dev->isClosed() || dev->mRemote == nullptr) { in onDeviceIdle()
1482 if (dev->mIdle) { in onDeviceIdle()
1487 if (dev->mCurrentSession != nullptr) { in onDeviceIdle()
1489 if (dev->mBusySession != dev->mCurrentSession) { in onDeviceIdle()
1491 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_DEVICE); in onDeviceIdle()
1495 sp<AMessage> msg = new AMessage(kWhatSessionStateCb, dev->mHandler); in onDeviceIdle()
1496 msg->setPointer(kContextKey, dev->mBusySession->mUserSessionCallback.context); in onDeviceIdle()
1497 msg->setObject(kSessionSpKey, dev->mBusySession); in onDeviceIdle()
1498 msg->setPointer(kCallbackFpKey, (void*) dev->mBusySession->mUserSessionCallback.onReady); in onDeviceIdle()
1501 dev->mBusySession.clear(); in onDeviceIdle()
1502 dev->postSessionMsgAndCleanup(msg); in onDeviceIdle()
1504 dev->mIdle = true; in onDeviceIdle()
1505 dev->mFlushing = false; in onDeviceIdle()
1515 sp<CameraDevice> dev = mDevice.promote(); in onCaptureStarted() local
1516 if (dev == nullptr) { in onCaptureStarted()
1519 Mutex::Autolock _l(dev->mDeviceLock); in onCaptureStarted()
1520 if (dev->isClosed() || dev->mRemote == nullptr) { in onCaptureStarted()
1527 auto it = dev->mSequenceCallbackMap.find(sequenceId); in onCaptureStarted()
1528 if (it != dev->mSequenceCallbackMap.end()) { in onCaptureStarted()
1535 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_SERVICE); in onCaptureStarted()
1538 sp<AMessage> msg = new AMessage(kWhatCaptureStart, dev->mHandler); in onCaptureStarted()
1544 dev->postSessionMsgAndCleanup(msg); in onCaptureStarted()
1556 sp<CameraDevice> dev = mDevice.promote(); in onResultReceived() local
1557 if (dev == nullptr) { in onResultReceived()
1563 bool isPartialResult = (resultExtras.partialResultCount < dev->mPartialResultCount); in onResultReceived()
1569 Mutex::Autolock _l(dev->mDeviceLock); in onResultReceived()
1570 if (dev->mRemote == nullptr) { in onResultReceived()
1574 if (dev->isClosed()) { in onResultReceived()
1576 dev->mFrameNumberTracker.updateTracker(frameNumber, /*isError*/false); in onResultReceived()
1583 metadataCopy.update(ANDROID_LENS_INFO_SHADING_MAP_SIZE, dev->mShadingMapSize, /*data_count*/2); in onResultReceived()
1586 auto it = dev->mSequenceCallbackMap.find(sequenceId); in onResultReceived()
1587 if (it != dev->mSequenceCallbackMap.end()) { in onResultReceived()
1593 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_SERVICE); in onResultReceived()
1603 dev->mHandler); in onResultReceived()
1619 dev->postSessionMsgAndCleanup(msg); in onResultReceived()
1623 dev->mFrameNumberTracker.updateTracker(frameNumber, /*isError*/false); in onResultReceived()
1624 dev->checkAndFireSequenceCompleteLocked(); in onResultReceived()
1647 sp<CameraDevice> dev = mDevice.promote(); in onRepeatingRequestError() local
1648 if (dev == nullptr) { in onRepeatingRequestError()
1652 Mutex::Autolock _l(dev->mDeviceLock); in onRepeatingRequestError()
1654 int repeatingSequenceId = dev->mRepeatingSequenceId; in onRepeatingRequestError()
1656 dev->mRepeatingSequenceId = REQUEST_ID_NONE; in onRepeatingRequestError()
1659 dev->checkRepeatingSequenceCompleteLocked(repeatingSequenceId, lastFrameNumber); in onRepeatingRequestError()