EmulatedFakeCamera2: Add shim to work around FORMAT_ZSL.
Emulator does not need FORMAT_ZSL, so treat it as IMPLEMENTATION_DEFINED. Bug: 6243944 Change-Id: I9eeb48f6197ff9979f7823b8dc912346158fd6f1
This commit is contained in:
@@ -266,6 +266,11 @@ int EmulatedFakeCamera2::allocateStream(
|
|||||||
uint32_t *max_buffers) {
|
uint32_t *max_buffers) {
|
||||||
Mutex::Autolock l(mMutex);
|
Mutex::Autolock l(mMutex);
|
||||||
|
|
||||||
|
// Temporary shim until FORMAT_ZSL is removed
|
||||||
|
if (format == CAMERA2_HAL_PIXEL_FORMAT_ZSL) {
|
||||||
|
format = HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED;
|
||||||
|
}
|
||||||
|
|
||||||
if (format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
|
if (format != HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED) {
|
||||||
unsigned int numFormats = sizeof(kAvailableFormats) / sizeof(uint32_t);
|
unsigned int numFormats = sizeof(kAvailableFormats) / sizeof(uint32_t);
|
||||||
unsigned int formatIdx = 0;
|
unsigned int formatIdx = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user