[EXT] Re: [PATCH v1 0/1] Add environment variable to order pipelines match

Julien Vuillaumier julien.vuillaumier at nxp.com
Wed Mar 6 18:57:45 CET 2024


Hi Kieran,

On 05/03/2024 07:45, Kieran Bingham wrote:
> Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
> 
> 
> Hi Julien,
> 
> Quoting Julien Vuillaumier (2024-03-04 18:18:15)
>>
>> Hello,
>>
>> There is currently no way to configure the order used by the CameraManager
>> to select the pipeline handlers to match devices from the DeviceEnumerator.
>> That is a limitation when multiple pipeline are compiled in, capable of
>> handling the devices of the platform. In that case, user can not specify
>> the pipeline that will bind to the devices and handle the cameras.
>>
>> This change adds an environment variable, optionnaly initialized with an
>> ordered list of candidate pipelines that CameraManager shall use to match
>> the devices. When the variable is not set, CameraManager behavior is
>> unchanged: every registered pipeline is selected in turn to attempt device
>> matching.
>>
>> Using that variable, user has the option to explicitly select the pipeline
>> or the subset of available pipelines that CameraManager shall consider
>> for matching.
> 
> This indeed is a problem to solve. This looks like a good way to handle
> it, I think it's an indication that we need a libcamera configuration
> file soon though, which would let these magic environment controls be
> set from either a config file or overridden by the environment.
> 
> I have also wondered about setting 'prioirities' to pipeline handlers,
> such as making the simple pipeline handler a low priority handler, but
> that doesn't solve individual cases for instance if that was the
> preferred choice, so I think we do need some explicit control from the
> users environment.

Assigning priorities to pipelines would be an option indeed, if 
priorities can be reconfigured at runtime to select the desired 
pipeline(s). Though an ordered list seems to give the same flexibility 
and be slightly easier to handle.

Using config file would also be a convenient way of specifying the 
pipelines to select. It could come at some point in addition to the 
environment variable, for instance to setup a static pipeline 
configuration for a platform. The environment variable would still 
remain a convenient option for engineering and testing though.

Thanks,
Julien


> 
> --
> Kieran
> 
> 
>> Thanks
>>
>>
>> Julien Vuillaumier (1):
>>    libcamera: camera_manager: Add environment variable to order pipelines
>>      match
>>
>>   Documentation/environment_variables.rst |  5 +++
>>   src/libcamera/camera_manager.cpp        | 51 +++++++++++++++++++++----
>>   2 files changed, 48 insertions(+), 8 deletions(-)
>>
>> --
>> 2.34.1
>>



More information about the libcamera-devel mailing list