diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-16 01:01:47 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-16 01:01:47 +0000 |
| commit | b557568c448378212f064bde01329d670e15795c (patch) | |
| tree | 8c464cdc944a094c477f1f701525fbffc356f561 | |
| parent | ec8a268c0492432c5f10fd292e981723962aabd6 (diff) | |
| parent | 3af4327697c6710a7f1839cbf33faa55634c3dee (diff) | |
| download | platform_hardware_google_camera-android11-tests-release.tar.gz platform_hardware_google_camera-android11-tests-release.tar.bz2 platform_hardware_google_camera-android11-tests-release.zip | |
Snap for 6683823 from 3af4327697c6710a7f1839cbf33faa55634c3dee to rvc-releaseandroid-vts-11.0_r5android-vts-11.0_r4android-vts-11.0_r3android-vts-11.0_r2android-vts-11.0_r1android-security-11.0.0_r1android-platform-11.0.0_r2android-platform-11.0.0_r1android-cts-11.0_r5android-cts-11.0_r4android-cts-11.0_r3android-cts-11.0_r2android-cts-11.0_r1android-11.0.0_r5android-11.0.0_r4android-11.0.0_r3android-11.0.0_r25android-11.0.0_r2android-11.0.0_r17android-11.0.0_r1android11-tests-releaseandroid11-security-releaseandroid11-s1-releaseandroid11-release
Change-Id: Ic738e34fe93fe996d418ab6489ffe98e984a7e47
| -rw-r--r-- | common/hal/utils/zsl_buffer_manager.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/hal/utils/zsl_buffer_manager.cc b/common/hal/utils/zsl_buffer_manager.cc index 4855abf..9183476 100644 --- a/common/hal/utils/zsl_buffer_manager.cc +++ b/common/hal/utils/zsl_buffer_manager.cc @@ -407,6 +407,24 @@ void ZslBufferManager::GetMostRecentZslBuffers( zsl_buffer_iter++; } + // Fallback to realtime pipeline capture if there are any flash-fired frame + // in zsl buffers with AE_MODE_ON_AUTO_FLASH. + camera_metadata_ro_entry entry = {}; + res = zsl_buffer_iter->second.metadata->Get(ANDROID_CONTROL_AE_MODE, &entry); + if (res == OK && entry.data.u8[0] == ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH) { + for (auto search_iter = filled_zsl_buffers_.begin(); + search_iter != filled_zsl_buffers_.end(); search_iter++) { + res = search_iter->second.metadata->Get(ANDROID_FLASH_STATE, &entry); + if (res == OK && entry.count == 1) { + if (entry.data.u8[0] == ANDROID_FLASH_STATE_FIRED) { + ALOGD("%s: Returns empty zsl_buffers due to flash fired", + __FUNCTION__); + return; + } + } + } + } + for (uint32_t i = 0; i < num_buffers; i++) { camera_metadata_ro_entry entry = {}; int64_t buffer_timestamp; |
