[v4,0/3] Add environment variable to order pipelines match
mbox series

Message ID 20240503144919.2371357-1-julien.vuillaumier@nxp.com
Headers show
Series
  • Add environment variable to order pipelines match
Related show

Message

Julien Vuillaumier May 3, 2024, 2:49 p.m. UTC
Hi All,

This is the v4 of the change to support the configuration of the order
of pipelines match, by using an environment variable.

As suggested in v3 review comments, this series adds a preceding patch
that renames pipeline handlers with the short name used in meson files
(pipeline subdirectory name in the source tree).

Related updates are listed in the change history below. Changes for the
renaming were kept in a single commit to have a buildable/testable history.

v4:
- Pipeline handlers renamed to use short name - same as in meson files:
  * REGISTER_PIPELINE_HANDLER updated with additional 'name' parameter
  * For each pipeline handler: registration updated with short name
  * For each IPA module: IPAModuleInfo definition updated with new name
  * Unit test cases using pipeline handler name updated
  * Patch (3/3) usage example in commit message updated

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 v3: https://lists.libcamera.org/pipermail/libcamera-devel/2024-March/041254.html

Thanks,
Julien


Julien Vuillaumier (3):
  libcamera: pipeline: Rename pipelines to a shorter name
  libcamera: pipeline: Add a get factory by name helper
  libcamera: camera_manager: Add environment variable to order pipelines
    match

 Documentation/environment_variables.rst       |  8 +++
 Documentation/guides/pipeline-handler.rst     |  4 +-
 include/libcamera/internal/camera_manager.h   |  1 +
 include/libcamera/internal/pipeline_handler.h |  5 +-
 src/ipa/ipu3/ipu3.cpp                         |  2 +-
 src/ipa/rkisp1/rkisp1.cpp                     |  2 +-
 src/ipa/rpi/vc4/vc4.cpp                       |  2 +-
 src/ipa/simple/soft_simple.cpp                |  2 +-
 src/ipa/vimc/vimc.cpp                         |  2 +-
 src/libcamera/camera_manager.cpp              | 53 ++++++++++++++-----
 src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  |  2 +-
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  2 +-
 src/libcamera/pipeline/mali-c55/mali-c55.cpp  |  2 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |  2 +-
 src/libcamera/pipeline/rpi/vc4/vc4.cpp        |  2 +-
 src/libcamera/pipeline/simple/simple.cpp      |  2 +-
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |  2 +-
 src/libcamera/pipeline/vimc/vimc.cpp          |  2 +-
 src/libcamera/pipeline_handler.cpp            | 24 +++++++++
 test/ipa/ipa_interface_test.cpp               |  2 +-
 test/ipa/ipa_module_test.cpp                  |  2 +-
 21 files changed, 95 insertions(+), 30 deletions(-)