[libcamera-devel] [PATCH 3/3] android: camera_device: Report number of out streams
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Dec 10 10:54:37 CET 2020
Hi Jacopo,
On 09/12/2020 17:35, Jacopo Mondi wrote:
> 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 };
Is this constant? or pipeline handler specific?
I guess constant is ok for now - but if we need to update this to query
the pipeline handler perhaps we need a todo.
Aside from that.
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> + 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,
> };
>
--
Regards
--
Kieran
More information about the libcamera-devel
mailing list