Camera: Add DepthCompositeStream
Add the necessary logic to support dynamic depth metadata.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: Ic4710872dc596bc718270e1c79d4da53fb850875
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
index cee4a84..d6d34e9 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -58,6 +58,8 @@
} // anonymous namespace
+const float CameraProviderManager::kDepthARTolerance = .1f;
+
CameraProviderManager::HardwareServiceInteractionProxy
CameraProviderManager::sHardwareServiceInteractionProxy{};
@@ -576,10 +578,7 @@
// The dynamic depth spec. does not mention how close the AR ratio should be.
// Try using something appropriate.
- float ARTolerance = .01f;
-
- //TODO: Remove this before merging! This is for testing purposes only
- ARTolerance = 10.f;
+ float ARTolerance = kDepthARTolerance;
for (const auto& blobSize : blobSizes) {
float jpegAR = static_cast<float> (std::get<0>(blobSize)) /
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.h b/services/camera/libcameraservice/common/CameraProviderManager.h
index 1f34f2f..80ec130 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.h
+++ b/services/camera/libcameraservice/common/CameraProviderManager.h
@@ -265,6 +265,8 @@
bool isLogicalCamera(const std::string& id, std::vector<std::string>* physicalCameraIds);
bool isHiddenPhysicalCamera(const std::string& cameraId);
+
+ static const float kDepthARTolerance;
private:
// All private members, unless otherwise noted, expect mInterfaceMutex to be locked before use
mutable std::mutex mInterfaceMutex;