diff options
author | Shuzhen Wang <shuzhenwang@google.com> | 2022-03-08 12:08:42 -0800 |
---|---|---|
committer | Shuzhen Wang <shuzhenwang@google.com> | 2022-03-09 22:55:25 +0000 |
commit | 0dd7eae42978cc816f6b8387da0de681171c30cc (patch) | |
tree | 126dab06c73efd7dbc95db9afcf9e24333b165ab | |
parent | 5e30f1d8c65f22d8c03129a7e65033c47174c28a (diff) | |
download | camera-0dd7eae42978cc816f6b8387da0de681171c30cc.tar.gz |
EmulatedCamera: Convert stream use case flag to 64 bit
Test: Camera CTS
Bug: 223387965
Change-Id: Ic69cf082cdb5b4d80bf3f6a3e867362fcc665efb
-rw-r--r-- | devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h | 2 | ||||
-rw-r--r-- | devices/EmulatedCamera/hwl/EmulatedRequestState.cpp | 12 | ||||
-rw-r--r-- | devices/EmulatedCamera/hwl/EmulatedRequestState.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h b/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h index 8200807..adedc21 100644 --- a/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h +++ b/devices/EmulatedCamera/hwl/EmulatedLogicalRequestState.h @@ -32,7 +32,7 @@ struct EmulatedStream : public HalStream { size_t buffer_size; bool is_input; int32_t group_id; - int32_t use_case; + int64_t use_case; }; struct EmulatedPipeline { diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp b/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp index ada28dd..f5f1f2b 100644 --- a/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp +++ b/devices/EmulatedCamera/hwl/EmulatedRequestState.cpp @@ -51,7 +51,7 @@ const std::set<uint8_t> EmulatedRequestState::kSupportedHWLevels = { ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_3, }; -const std::vector<int32_t> EmulatedRequestState::kSupportedUseCases = { +const std::vector<int64_t> EmulatedRequestState::kSupportedUseCases = { ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW, ANDROID_SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE, @@ -2861,11 +2861,11 @@ status_t EmulatedRequestState::InitializeRequestDefaults() { ALOGE("%s: No available stream use cases!", __FUNCTION__); return BAD_VALUE; } - for (int32_t useCase : kSupportedUseCases) { - if (std::find(entry.data.i32, entry.data.i32 + entry.count, useCase) == - entry.data.i32 + entry.count) { - ALOGE("%s: Mandatory stream use case %d not found!", __FUNCTION__, - useCase); + for (int64_t useCase : kSupportedUseCases) { + if (std::find(entry.data.i64, entry.data.i64 + entry.count, useCase) == + entry.data.i64 + entry.count) { + ALOGE("%s: Mandatory stream use case %" PRId64 " not found!", + __FUNCTION__, useCase); return BAD_VALUE; } } diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestState.h b/devices/EmulatedCamera/hwl/EmulatedRequestState.h index d8082ee..8bf5408 100644 --- a/devices/EmulatedCamera/hwl/EmulatedRequestState.h +++ b/devices/EmulatedCamera/hwl/EmulatedRequestState.h @@ -96,7 +96,7 @@ class EmulatedRequestState { static const std::set<uint8_t> kSupportedCapabilites; static const std::set<uint8_t> kSupportedHWLevels; std::unique_ptr<HalCameraMetadata> static_metadata_; - static const std::vector<int32_t> kSupportedUseCases; + static const std::vector<int64_t> kSupportedUseCases; // android.blacklevel.* uint8_t black_level_lock_ = ANDROID_BLACK_LEVEL_LOCK_ON; |