Camera: Handle physical camera metadata tracking for multi-res output
The Inflight metadata tracking needs to be modified to handle
multi-resolution output stream. Because the HAL gets to decide which
physical camera outputs the image, the physical result metadata may
originate from a different physical camera.
The status tracker is fine because the tracking starts when buffer is
dequeued from the stream.
Bug: 156254356
Test: Camera CTS
Change-Id: I9487ae4df1b4f37ab41771ce90ad8b71239eb105
diff --git a/services/camera/libcameraservice/device3/InFlightRequest.h b/services/camera/libcameraservice/device3/InFlightRequest.h
index e3aaf44..523a2c7 100644
--- a/services/camera/libcameraservice/device3/InFlightRequest.h
+++ b/services/camera/libcameraservice/device3/InFlightRequest.h
@@ -96,7 +96,10 @@
ERROR_BUF_STRATEGY errorBufStrategy;
// The physical camera ids being requested.
- std::set<String8> physicalCameraIds;
+ // For request on a physical camera stream, the inside set contains one Id
+ // For request on a stream group containing physical camera streams, the
+ // inside set contains all stream Ids in the group.
+ std::set<std::set<String8>> physicalCameraIds;
// Map of physicalCameraId <-> Metadata
std::vector<PhysicalCaptureResultInfo> physicalMetadatas;
@@ -142,7 +145,7 @@
InFlightRequest(int numBuffers, CaptureResultExtras extras, bool hasInput,
bool hasAppCallback, nsecs_t maxDuration,
- const std::set<String8>& physicalCameraIdSet, bool isStillCapture,
+ const std::set<std::set<String8>>& physicalCameraIdSet, bool isStillCapture,
bool isZslCapture, bool rotateAndCropAuto, const std::set<std::string>& idsWithZoom,
nsecs_t requestNs, const SurfaceMap& outSurfaces = SurfaceMap{}) :
shutterTimestamp(0),