[libcamera-devel] [PATCH 0/4] libcamera: Implement d-pointer design pattern

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Sep 21 05:10:53 CEST 2020


Hello,

This patch series implements the d-pointer design pattern in a base
class, generalizing the custom implementations from the Camera and
CameraManager classes. This was mostly developed as a base for the
reprocessing API (the reworked camera configuration API will make use of
d-pointers), but I believe it makes sense on its own.

The series is quite straightforward. Patch 1/4 implements the framework,
patch 2/4 fixes an issue in the CameraManager class, and patches 3/4 and
4/4 replace the manual implementations. Please see individual patches
for details.

Laurent Pinchart (4):
  libcamera: Add a base class to implement the d-pointer design pattern
  libcamera: camera_manager: Make CameraManager::Private::mutex_ mutable
  libcamera: camera_manager: Inherit from Extensible
  libcamera: camera: Inherit from Extensible

 include/libcamera/camera.h         |   9 +-
 include/libcamera/camera_manager.h |   7 +-
 include/libcamera/extensible.h     |  80 ++++++++++++++++++
 include/libcamera/meson.build      |   1 +
 src/libcamera/camera.cpp           | 123 +++++++++++++++++-----------
 src/libcamera/camera_manager.cpp   |  57 ++++++++-----
 src/libcamera/extensible.cpp       | 127 +++++++++++++++++++++++++++++
 src/libcamera/meson.build          |   1 +
 8 files changed, 328 insertions(+), 77 deletions(-)
 create mode 100644 include/libcamera/extensible.h
 create mode 100644 src/libcamera/extensible.cpp

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list