summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuzhen Wang <shuzhenwang@google.com>2016-10-15 00:17:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-10-15 00:17:20 +0000
commitcd64df6a88ff074e7d304d68e1fb3f3205747487 (patch)
tree3009f3326dcbb7882fc63ca9b46fc001af3fe48a
parentf29de7cb50d492f04ccdd73f9f60f79794ecae81 (diff)
parent7d16805be5224c5d581704d3447c2880a98477dd (diff)
downloadbullhead-cd64df6a88ff074e7d304d68e1fb3f3205747487.tar.gz
Merge "QCamera2: HAL3: Report ERROR_RESULT when metadata is dropped" into nyc-mr1-dev
-rw-r--r--camera/QCamera2/HAL3/QCamera3HWI.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 680850d..227ca00 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -2580,17 +2580,22 @@ void QCamera3HardwareInterface::handleMetadataWithLock(
i++;
continue;
} else {
- ALOGE("%s: Fatal: Missing metadata buffer for frame number %d", __func__, i->frame_number);
- if (free_and_bufdone_meta_buf) {
- mMetadataChannel->bufDone(metadata_buf);
- free(metadata_buf);
- }
+ ALOGE("%s: Missing metadata buffer for frame number %d, reporting CAMERA3_MSG_ERROR_RESULT",
+ __func__, i->frame_number);
+
+ mPendingLiveRequest--;
+
+ CameraMetadata dummyMetadata;
+ dummyMetadata.update(ANDROID_REQUEST_ID, &(i->request_id), 1);
+ result.result = dummyMetadata.release();
+
camera3_notify_msg_t notify_msg;
memset(&notify_msg, 0, sizeof(notify_msg));
notify_msg.type = CAMERA3_MSG_ERROR;
- notify_msg.message.error.error_code = CAMERA3_MSG_ERROR_DEVICE;
+ notify_msg.message.error.error_code = CAMERA3_MSG_ERROR_RESULT;
+ notify_msg.message.error.error_stream = NULL;
+ notify_msg.message.error.frame_number = i->frame_number;
mCallbackOps->notify(mCallbackOps, &notify_msg);
- goto done_metadata;
}
} else {
i->partial_result_cnt++;