[libcamera-devel] [PATCH v3 3/4] pipeline: raspberrypi: Only enabled embedded stream when available

Naushir Patuck naush at raspberrypi.com
Tue Feb 23 08:51:58 CET 2021


Hi Laurent,

On Mon, 22 Feb 2021 at 13:40, Naushir Patuck <naush at raspberrypi.com> wrote:

<snip>

One option to move this to match() time would be for the IPA to return
>> if the sensor supports metadata from init() instead of configure(). That
>> would require passing the sensor name to the IPA in init() too.
>>
>
>> It's the mix n' match that bothers me I think. I don't mind if we decide
>> to model the pipeline handler and IPA with the assumption that there can
>> only be a single camera, with a hardcoded pipeline known from the very
>> beginning, or in a more dynamic way that could allow runtime switching
>> between sensors, but it would be nice if the architecture of the
>> pipeline handler and IPA was consistent relatively to the model we pick.
>> Does this make sense ?
>>
>
> Yes, I do agree with this as well.  I am happy for ipa->init() to pass
> back the required
> parameters so match() can be used to open the embedded data node if
> required.
> I presume we have all the tools needed to do this with the IPA interfaces
> change to
> use mojom definitions?  If so I can update the signature of ipa->init() to
> pass in the
> sensor name and return out the "SensorConfig" parameters.
>

I had a very brief go at prototyping ipa->init() returning the SensorConfig
parameters, but
unfortunately I ran into a few issues.  It seems like the mojom interface
generating script
(mojom_libcamera_generator.py) requires the init() method to return out
only one integer
parameters:

    # Validate parameters to init()
    ValidateSingleLength(f_init.parameters, 'input parameter to init()')
    ValidateSingleLength(f_init.response_parameters, 'output parameter from
init()')
    if f_init.parameters[0].kind.mojom_name != 'IPASettings':
        raise Exception('init() must have single IPASettings input
parameter')
    if f_init.response_parameters[0].kind.spec != 'i32':
        raise Exception('init() must have single int32 output parameter')

Simply commenting out these lines does not help me either, as I think the
IPA proxy
template(?) requires a specific signature as well.

Any advice on how to get around this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210223/e534b62c/attachment.htm>


More information about the libcamera-devel mailing list