Camera: Add support for dynamic depth if possible
Composite dynamic depth streams will be supported
in case camera devices include:
- Dense depth streams which are not exclusive.
- Jpeg/Blob output with sizes that either match depth
or are with similar aspect ratio.
Make a guesstimate regarding the dynamic depth minimum
frame and stall durations.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: I8a89c7895cf57ce4408e41b1afae9c85d48c4e07
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.h b/services/camera/libcameraservice/common/CameraProviderManager.h
index 0966743..1f34f2f 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.h
+++ b/services/camera/libcameraservice/common/CameraProviderManager.h
@@ -470,6 +470,22 @@
std::unordered_map<std::string, CameraMetadata> mPhysicalCameraCharacteristics;
void queryPhysicalCameraIds();
status_t fixupMonochromeTags();
+ status_t addDynamicDepthTags();
+ static void getSupportedSizes(const CameraMetadata& ch, uint32_t tag,
+ android_pixel_format_t format,
+ std::vector<std::tuple<size_t, size_t>> *sizes /*out*/);
+ void getSupportedDurations( const CameraMetadata& ch, uint32_t tag,
+ android_pixel_format_t format,
+ const std::vector<std::tuple<size_t, size_t>>& sizes,
+ std::vector<int64_t> *durations/*out*/);
+ void getSupportedDynamicDepthDurations(const std::vector<int64_t>& depthDurations,
+ const std::vector<int64_t>& blobDurations,
+ std::vector<int64_t> *dynamicDepthDurations /*out*/);
+ static void getSupportedDynamicDepthSizes(
+ const std::vector<std::tuple<size_t, size_t>>& blobSizes,
+ const std::vector<std::tuple<size_t, size_t>>& depthSizes,
+ std::vector<std::tuple<size_t, size_t>> *dynamicDepthSizes /*out*/,
+ std::vector<std::tuple<size_t, size_t>> *internalDepthSizes /*out*/);
status_t removeAvailableKeys(CameraMetadata& c, const std::vector<uint32_t>& keys,
uint32_t keyTag);
};