<div dir="ltr"><div dir="ltr">Hi Laurent,<div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 22 Feb 2021 at 13:40, Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>> wrote:<br></div><div dir="ltr" class="gmail_attr"><br></div><div class="gmail_attr"><snip></div><div class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
One option to move this to match() time would be for the IPA to return<br>
if the sensor supports metadata from init() instead of configure(). That<br>
would require passing the sensor name to the IPA in init() too.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
It's the mix n' match that bothers me I think. I don't mind if we decide<br>
to model the pipeline handler and IPA with the assumption that there can<br>
only be a single camera, with a hardcoded pipeline known from the very<br>
beginning, or in a more dynamic way that could allow runtime switching<br>
between sensors, but it would be nice if the architecture of the<br>
pipeline handler and IPA was consistent relatively to the model we pick.<br>
Does this make sense ?<br></blockquote><div><br></div><div>Yes, I do agree with this as well.  I am happy for ipa->init() to pass back the required</div><div>parameters so match() can be used to open the embedded data node if required.</div><div>I presume we have all the tools needed to do this with the IPA interfaces change to</div><div>use mojom definitions?  If so I can update the signature of ipa->init() to pass in the</div><div>sensor name and return out the "SensorConfig" parameters.</div></div></div></blockquote><div><br></div><div>I had a very brief go at prototyping ipa->init() returning the SensorConfig parameters, but</div><div>unfortunately I ran into a few issues.  It seems like the mojom interface generating script</div><div>(mojom_libcamera_generator.py) requires the init() method to return out only one integer</div><div>parameters:</div><div><br></div><div>    # Validate parameters to init()<br>    ValidateSingleLength(f_init.parameters, 'input parameter to init()')<br>    ValidateSingleLength(f_init.response_parameters, 'output parameter from init()')<br>    if f_init.parameters[0].kind.mojom_name != 'IPASettings':<br>        raise Exception('init() must have single IPASettings input parameter')<br>    if f_init.response_parameters[0].kind.spec != 'i32':<br>        raise Exception('init() must have single int32 output parameter')<br></div><div><br></div><div>Simply commenting out these lines does not help me either, as I think the IPA proxy</div><div>template(?) requires a specific signature as well.</div><div><br></div><div>Any advice on how to get around this?</div><div><br></div></div></div>