Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -2676,6 +2676,7 @@ void CameraDeviceClient::onResultAvailable(const CaptureResult& result) { } void CameraDeviceClient::markClientActive() { Mutex::Autolock l(mDevice->mSharedDeviceActiveLock); if (mDeviceActive) { // Already in active state. return; Loading @@ -2689,6 +2690,7 @@ void CameraDeviceClient::markClientActive() { } void CameraDeviceClient::markClientIdle() { Mutex::Autolock l(mDevice->mSharedDeviceActiveLock); if (!mDeviceActive) { // Already in idle state. return; Loading services/camera/libcameraservice/common/CameraDeviceBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -594,6 +594,9 @@ class CameraDeviceBase : public virtual FrameProducer { virtual status_t injectSessionParams( const CameraMetadata& sessionParams) = 0; // Lock to synchronize onDeviceActive and onDeviceIdle callbacks when camera // has been opened in shared mode. mutable Mutex mSharedDeviceActiveLock; protected: bool mImageDumpMask = 0; std::vector<int64_t> mStreamUseCaseOverrides; Loading services/camera/libcameraservice/device3/aidl/AidlCamera3SharedDevice.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -591,6 +591,7 @@ void AidlCamera3SharedDevice::notifyError( } status_t AidlCamera3SharedDevice::notifyActive(float maxPreviewFps) { Mutex::Autolock l(mSharedDeviceActiveLock); for (auto activeClient : mClientRequestIds) { sp<NotificationListener> listener = mClientListeners[activeClient.first].promote(); if (listener != NULL) { Loading @@ -605,6 +606,7 @@ void AidlCamera3SharedDevice::notifyIdle(int64_t requestCount, int64_t resultEr bool deviceError, std::pair<int32_t, int32_t> mostRequestedFpsRange, const std::vector<hardware::CameraStreamStats>& stats) { Mutex::Autolock l(mSharedDeviceActiveLock); for (auto clientListener : mClientListeners) { sp<NotificationListener> listener = clientListener.second.promote(); if (listener != NULL) { Loading Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -2676,6 +2676,7 @@ void CameraDeviceClient::onResultAvailable(const CaptureResult& result) { } void CameraDeviceClient::markClientActive() { Mutex::Autolock l(mDevice->mSharedDeviceActiveLock); if (mDeviceActive) { // Already in active state. return; Loading @@ -2689,6 +2690,7 @@ void CameraDeviceClient::markClientActive() { } void CameraDeviceClient::markClientIdle() { Mutex::Autolock l(mDevice->mSharedDeviceActiveLock); if (!mDeviceActive) { // Already in idle state. return; Loading
services/camera/libcameraservice/common/CameraDeviceBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -594,6 +594,9 @@ class CameraDeviceBase : public virtual FrameProducer { virtual status_t injectSessionParams( const CameraMetadata& sessionParams) = 0; // Lock to synchronize onDeviceActive and onDeviceIdle callbacks when camera // has been opened in shared mode. mutable Mutex mSharedDeviceActiveLock; protected: bool mImageDumpMask = 0; std::vector<int64_t> mStreamUseCaseOverrides; Loading
services/camera/libcameraservice/device3/aidl/AidlCamera3SharedDevice.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -591,6 +591,7 @@ void AidlCamera3SharedDevice::notifyError( } status_t AidlCamera3SharedDevice::notifyActive(float maxPreviewFps) { Mutex::Autolock l(mSharedDeviceActiveLock); for (auto activeClient : mClientRequestIds) { sp<NotificationListener> listener = mClientListeners[activeClient.first].promote(); if (listener != NULL) { Loading @@ -605,6 +606,7 @@ void AidlCamera3SharedDevice::notifyIdle(int64_t requestCount, int64_t resultEr bool deviceError, std::pair<int32_t, int32_t> mostRequestedFpsRange, const std::vector<hardware::CameraStreamStats>& stats) { Mutex::Autolock l(mSharedDeviceActiveLock); for (auto clientListener : mClientListeners) { sp<NotificationListener> listener = clientListener.second.promote(); if (listener != NULL) { Loading