[libcamera-devel,0/8] libcamera: Use class templates for auto-registration
mbox series

Message ID 20221003212128.32429-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Use class templates for auto-registration
Related show

Message

Laurent Pinchart Oct. 3, 2022, 9:21 p.m. UTC
Hello,

This patch series refactors auto-registration of the CameraSensorHelper
and PipelineHandler instances to use class templates instead of
generating code with a macro. This follows the method used for the
Algorithm registration in libipa, and matches the C++ best practices.

Laurent Pinchart (8):
  ipa: camera_sensor_helper: Make factory createInstance() function
    const
  ipa: camera_sensor_helper: Make registerType() and createInstance()
    private
  ipa: camera_sensor_helper: Return unique_ptr from createInstance
  ipa: camera_sensor_helper: Implement factories through class templates
  libcamera: pipeline_handler: Make factory create() function const
  libcamera: pipeline_handler: Make registerType() private
  libcamera: pipeline_handler: Return unique_ptr from createInstance
  libcamera: pipeline_handler: Implement factories through class
    templates

 include/libcamera/internal/pipeline_handler.h | 49 ++++++-----
 src/ipa/ipu3/ipu3.cpp                         |  2 +-
 src/ipa/libipa/camera_sensor_helper.cpp       | 88 +++++++++++--------
 src/ipa/libipa/camera_sensor_helper.h         | 49 ++++++-----
 src/ipa/rkisp1/rkisp1.cpp                     |  2 +-
 src/libcamera/camera_manager.cpp              |  6 +-
 src/libcamera/pipeline_handler.cpp            | 75 ++++++++++------
 test/ipa/ipa_interface_test.cpp               |  6 +-
 8 files changed, 162 insertions(+), 115 deletions(-)