diff options
author | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-08-22 02:53:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-22 02:53:51 +0000 |
commit | fa1fc7086313f2f1868cae4c1a5698e592a437cb (patch) | |
tree | 22700441032922ce1a6108a9a4d4b927f5095303 /services/camera | |
parent | ef8ae4cbec0c9f49a24625d4316ec9bfde4e75c3 (diff) | |
parent | c00a25ccce0734bf5627cf02d0c4fb3cf051ce15 (diff) | |
download | frameworks_av-fa1fc7086313f2f1868cae4c1a5698e592a437cb.zip frameworks_av-fa1fc7086313f2f1868cae4c1a5698e592a437cb.tar.gz frameworks_av-fa1fc7086313f2f1868cae4c1a5698e592a437cb.tar.bz2 |
Merge "Camera: fix triggerId logic" into lmp-dev
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.cpp | 13 | ||||
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.h | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index 93c8662..0d33406 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -2138,6 +2138,8 @@ Camera3Device::RequestThread::RequestThread(wp<Camera3Device> parent, mPaused(true), mFrameNumber(0), mLatestRequestId(NAME_NOT_FOUND), + mCurrentAfTriggerId(0), + mCurrentPreCaptureTriggerId(0), mRepeatingLastFrameNumber(NO_IN_FLIGHT_REPEATING_FRAMES) { mStatusId = statusTracker->addComponent(); } @@ -2620,6 +2622,8 @@ sp<Camera3Device::CaptureRequest> if (nextRequest != NULL) { nextRequest->mResultExtras.frameNumber = mFrameNumber++; + nextRequest->mResultExtras.afTriggerId = mCurrentAfTriggerId; + nextRequest->mResultExtras.precaptureTriggerId = mCurrentPreCaptureTriggerId; } return nextRequest; } @@ -2699,8 +2703,13 @@ status_t Camera3Device::RequestThread::insertTriggers( if (tag == ANDROID_CONTROL_AF_TRIGGER_ID || tag == ANDROID_CONTROL_AE_PRECAPTURE_ID) { bool isAeTrigger = (trigger.metadataTag == ANDROID_CONTROL_AE_PRECAPTURE_ID); uint32_t triggerId = static_cast<uint32_t>(trigger.entryValue); - isAeTrigger ? request->mResultExtras.precaptureTriggerId = triggerId : - request->mResultExtras.afTriggerId = triggerId; + if (isAeTrigger) { + request->mResultExtras.precaptureTriggerId = triggerId; + mCurrentPreCaptureTriggerId = triggerId; + } else { + request->mResultExtras.afTriggerId = triggerId; + mCurrentAfTriggerId = triggerId; + } if (parent->mDeviceVersion >= CAMERA_DEVICE_API_VERSION_3_2) { continue; // Trigger ID tag is deprecated since device HAL 3.2 } diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h index e071cc2..915c024 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.h +++ b/services/camera/libcameraservice/device3/Camera3Device.h @@ -486,6 +486,8 @@ class Camera3Device : TriggerMap mTriggerMap; TriggerMap mTriggerRemovedMap; TriggerMap mTriggerReplacedMap; + uint32_t mCurrentAfTriggerId; + uint32_t mCurrentPreCaptureTriggerId; int64_t mRepeatingLastFrameNumber; }; |