[libcamera-devel] [PATCH 3/3] android: camera_device: Report number of out streams
Jacopo Mondi
jacopo at jmondi.org
Wed Dec 9 18:35:19 CET 2020
Report the number of supported output streams through the
ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS static metadata.
The camera HAL currently supports:
- 1 RAW stream
- 2 YUV streams
- 1 JPEG stream
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/android/camera_device.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 13194d1ea5cc..e9fb23175d27 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -550,10 +550,10 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
{
/*
* \todo Keep this in sync with the actual number of entries.
- * Currently: 52 entries, 698 bytes of static metadata
+ * Currently: 53 entries, 714 bytes of static metadata
*/
- uint32_t numEntries = 52;
- uint32_t byteSize = 698;
+ uint32_t numEntries = 53;
+ uint32_t byteSize = 714;
/*
* Calculate space occupation in bytes for dynamically built metadata
@@ -939,6 +939,11 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
&maxPipelineDepth, 1);
}
+ /* Number of { RAW, YUV, JPEG } supported output streams */
+ int32_t numOutStreams[] = { 1, 2, 1 };
+ staticMetadata_->addEntry(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
+ &numOutStreams, 3);
+
/* LIMITED does not support reprocessing. */
uint32_t maxNumInputStreams = 0;
staticMetadata_->addEntry(ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
@@ -1009,6 +1014,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL,
ANDROID_REQUEST_PARTIAL_RESULT_COUNT,
ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
+ ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
ANDROID_REQUEST_AVAILABLE_CAPABILITIES,
};
--
2.29.1
More information about the libcamera-devel
mailing list