Lines Matching refs:dev
992 ACameraDevice* dev; in onMessageReceived() local
993 found = msg->findPointer(kDeviceKey, (void**) &dev); in onMessageReceived()
994 if (!found || dev == nullptr) { in onMessageReceived()
1007 (*onDisconnected)(context, dev); in onMessageReceived()
1012 ACameraDevice* dev; in onMessageReceived() local
1013 found = msg->findPointer(kDeviceKey, (void**) &dev); in onMessageReceived()
1014 if (!found || dev == nullptr) { in onMessageReceived()
1033 (*onError)(context, dev, errorCode); in onMessageReceived()
1562 sp<CameraDevice> dev = mDevice.promote(); in onDeviceError() local
1563 if (dev == nullptr) { in onDeviceError()
1567 sp<ACameraCaptureSession> session = dev->mCurrentSession.promote(); in onDeviceError()
1568 Mutex::Autolock _l(dev->mDeviceLock); in onDeviceError()
1569 if (dev->mRemote == nullptr) { in onDeviceError()
1579 dev->mCurrentSession = nullptr; in onDeviceError()
1580 sp<AMessage> msg = new AMessage(kWhatOnDisconnected, dev->mHandler); in onDeviceError()
1581 msg->setPointer(kContextKey, dev->mAppCallbacks.context); in onDeviceError()
1582 msg->setPointer(kDeviceKey, (void*) dev->getWrapper()); in onDeviceError()
1583 msg->setPointer(kCallbackFpKey, (void*) dev->mAppCallbacks.onDisconnected); in onDeviceError()
1599 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_DEVICE); in onDeviceError()
1602 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_SERVICE); in onDeviceError()
1606 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_UNKNOWN); in onDeviceError()
1609 sp<AMessage> msg = new AMessage(kWhatOnError, dev->mHandler); in onDeviceError()
1610 msg->setPointer(kContextKey, dev->mAppCallbacks.context); in onDeviceError()
1611 msg->setPointer(kDeviceKey, (void*) dev->getWrapper()); in onDeviceError()
1612 msg->setPointer(kCallbackFpKey, (void*) dev->mAppCallbacks.onError); in onDeviceError()
1620 dev->onCaptureErrorLocked(errorCode, resultExtras); in onDeviceError()
1630 sp<CameraDevice> dev = mDevice.promote(); in onDeviceIdle() local
1631 if (dev == nullptr) { in onDeviceIdle()
1635 Mutex::Autolock _l(dev->mDeviceLock); in onDeviceIdle()
1636 if (dev->isClosed() || dev->mRemote == nullptr) { in onDeviceIdle()
1640 dev->removeCompletedCallbackHolderLocked( in onDeviceIdle()
1643 if (dev->mIdle) { in onDeviceIdle()
1648 if (dev->mCurrentSession != nullptr) { in onDeviceIdle()
1650 if (dev->mBusySession != dev->mCurrentSession) { in onDeviceIdle()
1652 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_DEVICE); in onDeviceIdle()
1656 sp<AMessage> msg = new AMessage(kWhatSessionStateCb, dev->mHandler); in onDeviceIdle()
1657 msg->setPointer(kContextKey, dev->mBusySession->mUserSessionCallback.context); in onDeviceIdle()
1658 msg->setObject(kSessionSpKey, dev->mBusySession); in onDeviceIdle()
1659 msg->setPointer(kCallbackFpKey, (void*) dev->mBusySession->mUserSessionCallback.onReady); in onDeviceIdle()
1662 dev->mBusySession.clear(); in onDeviceIdle()
1663 dev->postSessionMsgAndCleanup(msg); in onDeviceIdle()
1665 dev->mIdle = true; in onDeviceIdle()
1666 dev->mFlushing = false; in onDeviceIdle()
1675 sp<CameraDevice> dev = mDevice.promote(); in onCaptureStarted() local
1676 if (dev == nullptr) { in onCaptureStarted()
1679 Mutex::Autolock _l(dev->mDeviceLock); in onCaptureStarted()
1680 if (dev->isClosed() || dev->mRemote == nullptr) { in onCaptureStarted()
1684 dev->removeCompletedCallbackHolderLocked( in onCaptureStarted()
1691 auto it = dev->mSequenceCallbackMap.find(sequenceId); in onCaptureStarted()
1692 if (it != dev->mSequenceCallbackMap.end()) { in onCaptureStarted()
1701 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_SERVICE); in onCaptureStarted()
1706 msg = new AMessage(kWhatCaptureStart2, dev->mHandler); in onCaptureStarted()
1709 msg = new AMessage(kWhatCaptureStart, dev->mHandler); in onCaptureStarted()
1717 dev->postSessionMsgAndCleanup(msg); in onCaptureStarted()
1729 sp<CameraDevice> dev = mDevice.promote(); in onResultReceived() local
1730 if (dev == nullptr) { in onResultReceived()
1736 bool isPartialResult = (resultExtras.partialResultCount < dev->mPartialResultCount); in onResultReceived()
1742 Mutex::Autolock _l(dev->mDeviceLock); in onResultReceived()
1743 if (dev->mRemote == nullptr) { in onResultReceived()
1747 if (dev->isClosed()) { in onResultReceived()
1749 dev->mFrameNumberTracker.updateTracker(frameNumber, /*isError*/false); in onResultReceived()
1756 metadataCopy.update(ANDROID_LENS_INFO_SHADING_MAP_SIZE, dev->mShadingMapSize, /*data_count*/2); in onResultReceived()
1759 auto it = dev->mSequenceCallbackMap.find(sequenceId); in onResultReceived()
1760 if (it != dev->mSequenceCallbackMap.end()) { in onResultReceived()
1766 dev->setCameraDeviceErrorLocked(ACAMERA_ERROR_CAMERA_SERVICE); in onResultReceived()
1776 dev->mHandler); in onResultReceived()
1792 dev->postSessionMsgAndCleanup(msg); in onResultReceived()
1796 dev->mFrameNumberTracker.updateTracker(frameNumber, /*isError*/false); in onResultReceived()
1797 dev->checkAndFireSequenceCompleteLocked(); in onResultReceived()
1807 sp<CameraDevice> dev = mDevice.promote(); in onPrepared() local
1808 if (dev == nullptr) { in onPrepared()
1811 Mutex::Autolock _l(dev->mDeviceLock); in onPrepared()
1812 if (dev->isClosed() || dev->mRemote == nullptr) { in onPrepared()
1815 auto it = dev->mConfiguredOutputs.find(streamId); in onPrepared()
1816 if (it == dev->mConfiguredOutputs.end()) { in onPrepared()
1820 sp<ACameraCaptureSession> session = dev->mCurrentSession.promote(); in onPrepared()
1827 sp<AMessage> msg = new AMessage(kWhatPreparedCb, dev->mHandler); in onPrepared()
1832 dev->postSessionMsgAndCleanup(msg); in onPrepared()
1848 sp<CameraDevice> dev = mDevice.promote(); in onRepeatingRequestError() local
1849 if (dev == nullptr) { in onRepeatingRequestError()
1853 Mutex::Autolock _l(dev->mDeviceLock); in onRepeatingRequestError()
1855 int repeatingSequenceId = dev->mRepeatingSequenceId; in onRepeatingRequestError()
1857 dev->mRepeatingSequenceId = REQUEST_ID_NONE; in onRepeatingRequestError()
1860 dev->checkRepeatingSequenceCompleteLocked(repeatingSequenceId, lastFrameNumber); in onRepeatingRequestError()