[libcamera-devel] [PATCH] android: camera_device: Add pipeline max depth static metadata

Ren-Pei Zeng kamesan at google.com
Wed Aug 28 17:16:20 CEST 2019


Thanks for working on this!

+       uint8_t maxPipelineDepth = 1;
Should this keep the original value, i.e. = 5?

On Wed, Aug 28, 2019 at 10:12 PM Jacopo Mondi <jacopo at jmondi.org> wrote:

> The ANDROID_REQUEST_PIPELINE_MAX_DEPTH metadata tag was wrongly
> reported in the capture settings template, while it is actually a static
> camera metadata.
>
> As of Chromium R78 the absence of this specific metadata tag causes a
> system crash. Fix this by reporting the maximum pipeline depth in the
> static metadata pack and set its value to 1 as currently no control is
> applied to the image capture pipeline.
>
> Reported-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Suggested-by: Ren-Pei Zeng <kamesan at google.com>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
>
> ---
> Laurent, as you're running R78 and first reported the crash, could you
> please
> give this a spin and report if the issue is still present?
>
> ---
>  src/android/camera_device.cpp | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index c27175ac090d..7c69d0810eee 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -281,6 +281,13 @@ camera_metadata_t *CameraDevice::getStaticMetadata()
>                         ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL,
>                         &supportedHWLevel, 1);
>
> +       /* Request static metadata. */
> +       uint8_t maxPipelineDepth = 1;
> +       ret = add_camera_metadata_entry(staticMetadata_,
> +                       ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
> +                       &maxPipelineDepth, 1);
> +       METADATA_ASSERT(ret);
> +
>         return staticMetadata_;
>  }
>
> @@ -340,12 +347,6 @@ const camera_metadata_t
> *CameraDevice::constructDefaultRequestSettings(int type)
>                         maxOutStream, 3);
>         METADATA_ASSERT(ret);
>
> -       uint8_t maxPipelineDepth = 5;
> -       ret = add_camera_metadata_entry(requestTemplate_,
> -                       ANDROID_REQUEST_PIPELINE_MAX_DEPTH,
> -                       &maxPipelineDepth, 1);
> -       METADATA_ASSERT(ret);
> -
>         int32_t inputStreams = 0;
>         ret = add_camera_metadata_entry(requestTemplate_,
>                         ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,
> --
> 2.23.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20190828/a7d6f9be/attachment.html>


More information about the libcamera-devel mailing list