Camera: Check for failing request ids when syncing with device
Capture requests especially those near the end of a capture session
can fail due to various reasons like Hal errors, invalid output
surfaces etc. Avoid possible timeouts when waiting for a request id
to return by checking the respective error notifications.
Bug: 159476108
Test: Legacy API Camera CTS
Change-Id: I84dedfbee1eeb0ff8cddf67fdb36c5dfafbb70ef
diff --git a/services/camera/libcameraservice/api1/Camera2Client.h b/services/camera/libcameraservice/api1/Camera2Client.h
index 3144e0e..03ca44a 100644
--- a/services/camera/libcameraservice/api1/Camera2Client.h
+++ b/services/camera/libcameraservice/api1/Camera2Client.h
@@ -237,6 +237,7 @@
mutable Mutex mLatestRequestMutex;
Condition mLatestRequestSignal;
int32_t mLatestRequestId = -1;
+ int32_t mLatestFailedRequestId = -1;
status_t waitUntilRequestIdApplied(int32_t requestId, nsecs_t timeout);
status_t waitUntilCurrentRequestIdLocked();
};