diff options
author | Igor Murashkin <iam@google.com> | 2013-04-02 12:32:32 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-02 21:09:35 +0000 |
commit | d2c90696403bb3c9e28d7b51d65c9468bdf8e78b (patch) | |
tree | 17859e9a9b790c55412f0adff92cd4731f0acb41 /services | |
parent | e574eecea416c813d539a0977d5393c3ed291a1c (diff) | |
download | frameworks_av-d2c90696403bb3c9e28d7b51d65c9468bdf8e78b.zip frameworks_av-d2c90696403bb3c9e28d7b51d65c9468bdf8e78b.tar.gz frameworks_av-d2c90696403bb3c9e28d7b51d65c9468bdf8e78b.tar.bz2 |
Camera3: Fix metadata result not being rewritten after capture
Generally this problem manifested itself as the Frame Count not being set,
which then errored out ProFrameProcessor with a "Success" error.
Change-Id: Ifa927f43d0ce92100651ad3f714099a2f1ec4c2a
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/Camera3Device.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/services/camera/libcameraservice/Camera3Device.cpp b/services/camera/libcameraservice/Camera3Device.cpp index 6cf652c..f2c8c04 100644 --- a/services/camera/libcameraservice/Camera3Device.cpp +++ b/services/camera/libcameraservice/Camera3Device.cpp @@ -899,11 +899,19 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { // Push result metadata into queue mResultQueue.push_back(CameraMetadata()); - CameraMetadata &captureResult = *(mResultQueue.end()); + // Lets avoid copies! Too bad there's not a #back method + CameraMetadata &captureResult = *(--mResultQueue.end()); captureResult = result->result; - captureResult.update(ANDROID_REQUEST_FRAME_COUNT, - (int32_t*)&result->frame_number, 1); + if (captureResult.update(ANDROID_REQUEST_FRAME_COUNT, + (int32_t*)&result->frame_number, 1) != OK) { + ALOGE("%s: Camera %d: Failed to set frame# in metadata (%d)", + __FUNCTION__, mId, result->frame_number); + // TODO: Report error upstream + } else { + ALOGVV("%s: Camera %d: Set frame# in metadata (%d)", + __FUNCTION__, mId, result->frame_number); + } // Get timestamp from result metadata |