<div dir="auto"><div dir="ltr">Thanks Jacopo for clarifying. I misthought this value will limit the available buffers on the consumer side (chrome capture stack in this case), but it should not.<div>I'm not familiar with how frame control affects this, and the value is for this moment, so it's up to you.</div><div><br></div><div>Thanks!</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 28, 2019 at 11:41 PM Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank" rel="noreferrer">jacopo@jmondi.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello Ren-Pei,<br>
<br>
On Wed, Aug 28, 2019 at 11:16:20PM +0800, Ren-Pei Zeng wrote:<br>
> Thanks for working on this!<br>
><br>
> +       uint8_t maxPipelineDepth = 1;<br>
> Should this keep the original value, i.e. = 5?<br>
<br>
My understanding is that as long as the HAL reports to support LEGACY<br>
mode this should not be a big issue, as the maxDepth is relevant only<br>
in regards to the dynamic control android.sync.frameNumber, which we<br>
currently don't report and should be probably set to UNKNOWN as long<br>
as we work in backward compatibility mode.<br>
<br>
Is my understanding correct here in your opinion?<br>
<br>
I chose 1 because we actually don't apply any control at the moment,<br>
and the value there should depend on the platform specific pipeline<br>
handler characteristics.<br>
<br>
Why would you prefer to keep a value of 5 here ? I'm not opposed to<br>
it, just for my better understanding!<br>
<br>
Thanks<br>
   j<br>
<br>
><br>
> On Wed, Aug 28, 2019 at 10:12 PM Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank" rel="noreferrer">jacopo@jmondi.org</a>> wrote:<br>
><br>
> > The ANDROID_REQUEST_PIPELINE_MAX_DEPTH metadata tag was wrongly<br>
> > reported in the capture settings template, while it is actually a static<br>
> > camera metadata.<br>
> ><br>
> > As of Chromium R78 the absence of this specific metadata tag causes a<br>
> > system crash. Fix this by reporting the maximum pipeline depth in the<br>
> > static metadata pack and set its value to 1 as currently no control is<br>
> > applied to the image capture pipeline.<br>
> ><br>
> > Reported-by: Laurent Pinchart <<a href="mailto:laurent.pinchart@ideasonboard.com" target="_blank" rel="noreferrer">laurent.pinchart@ideasonboard.com</a>><br>
> > Suggested-by: Ren-Pei Zeng <<a href="mailto:kamesan@google.com" target="_blank" rel="noreferrer">kamesan@google.com</a>><br>
> > Signed-off-by: Jacopo Mondi <<a href="mailto:jacopo@jmondi.org" target="_blank" rel="noreferrer">jacopo@jmondi.org</a>><br>
> ><br>
> > ---<br>
> > Laurent, as you're running R78 and first reported the crash, could you<br>
> > please<br>
> > give this a spin and report if the issue is still present?<br>
> ><br>
> > ---<br>
> >  src/android/camera_device.cpp | 13 +++++++------<br>
> >  1 file changed, 7 insertions(+), 6 deletions(-)<br>
> ><br>
> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp<br>
> > index c27175ac090d..7c69d0810eee 100644<br>
> > --- a/src/android/camera_device.cpp<br>
> > +++ b/src/android/camera_device.cpp<br>
> > @@ -281,6 +281,13 @@ camera_metadata_t *CameraDevice::getStaticMetadata()<br>
> >                         ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL,<br>
> >                         &supportedHWLevel, 1);<br>
> ><br>
> > +       /* Request static metadata. */<br>
> > +       uint8_t maxPipelineDepth = 1;<br>
> > +       ret = add_camera_metadata_entry(staticMetadata_,<br>
> > +                       ANDROID_REQUEST_PIPELINE_MAX_DEPTH,<br>
> > +                       &maxPipelineDepth, 1);<br>
> > +       METADATA_ASSERT(ret);<br>
> > +<br>
> >         return staticMetadata_;<br>
> >  }<br>
> ><br>
> > @@ -340,12 +347,6 @@ const camera_metadata_t<br>
> > *CameraDevice::constructDefaultRequestSettings(int type)<br>
> >                         maxOutStream, 3);<br>
> >         METADATA_ASSERT(ret);<br>
> ><br>
> > -       uint8_t maxPipelineDepth = 5;<br>
> > -       ret = add_camera_metadata_entry(requestTemplate_,<br>
> > -                       ANDROID_REQUEST_PIPELINE_MAX_DEPTH,<br>
> > -                       &maxPipelineDepth, 1);<br>
> > -       METADATA_ASSERT(ret);<br>
> > -<br>
> >         int32_t inputStreams = 0;<br>
> >         ret = add_camera_metadata_entry(requestTemplate_,<br>
> >                         ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS,<br>
> > --<br>
> > 2.23.0<br>
> ><br>
> ><br>
</blockquote></div>