[PATCH v3 0/2] Add environment variable to order pipelines match
Julien Vuillaumier
julien.vuillaumier at nxp.com
Wed Mar 27 18:27:29 CET 2024
Hi All,
This is the v3 of the change to support the configuration of the order
of pipelines match, by using an environment variable.
v3:
- PipelineHandlerFactoryBase::getFactoryByName() unnecessary 'else' removed.
- CameraManager::pipelineFactoryMatch() declaration moved to match the
position of the method definition.
- Add to env variable documentation the information about how the pipeline
handlers names are defined in the source - also breaked long line at 80
characters.
- Fix and complement commit messages.
- Fix and complement source comments.
v2:
- Add 'get factory by name' helper to PipelineHandlerFactoryBase as a
preceding patch
- Move lamba pipeMatch() to a private class function
- Remove unnecessary string empty test
- Inline lamba nameMatch
- Update comments and variable names per v1 reviews
Link to v2: https://lists.libcamera.org/pipermail/libcamera-devel/2024-March/040859.html
Thanks
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.
Julien Vuillaumier (2):
libcamera: pipeline: Add a get factory by name helper
libcamera: camera_manager: Add environment variable to order pipelines
match
Documentation/environment_variables.rst | 8 +++
include/libcamera/internal/camera_manager.h | 1 +
include/libcamera/internal/pipeline_handler.h | 1 +
src/libcamera/camera_manager.cpp | 53 ++++++++++++++-----
src/libcamera/pipeline_handler.cpp | 22 ++++++++
5 files changed, 73 insertions(+), 12 deletions(-)
--
2.34.1
More information about the libcamera-devel
mailing list