[libcamera-devel,v2,0/3] libcamera: Make Framebuffer class Extensible
mbox series

Message ID 20210711170359.300-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Make Framebuffer class Extensible
Related show

Message

Laurent Pinchart July 11, 2021, 5:03 p.m. UTC
Hello,

This small patch series makes the FrameBuffer class inherit from
Extensible, for two reasons:

- FrameBuffer being such a cornerstone of the libcamera API, it will
  most likely need to be extended after stabilizing the public API.
  Making the class Extensible prepares for this.

- There's a todo item to hide the FrameBuffer::setRequest() function
  from the public API, as it's meant to be called internally only. Patch
  3/3 showcases how internal functions can be hidden from the public API
  by moving them to the Private data class.

This v2 incorporates parts of the comments from reviews of v1. There are
still some ongoing discussions, which may benefit from patch 2/3 (new in
v2) that shows how the _d() function can be used directly instead of
using the LIBCAMERA_D_PTR macro.

Laurent Pinchart (3):
  libcamera: base: class: Expose Extensible private data to other
    classes
  libcamera: Drop the LIBCAMERA_D_PTR macro in favour of the _d()
    function
  libcamera: framebuffer: Make FrameBuffer class Extensible

 include/libcamera/base/class.h           | 16 ++++++---
 include/libcamera/framebuffer.h          |  8 ++---
 include/libcamera/internal/framebuffer.h | 13 +++++++
 src/android/camera_buffer.h              | 15 +++-----
 src/android/camera_hal_config.cpp        |  3 +-
 src/libcamera/base/class.cpp             | 17 +++------
 src/libcamera/camera.cpp                 | 44 +++++++++---------------
 src/libcamera/camera_manager.cpp         | 16 ++++-----
 src/libcamera/framebuffer.cpp            | 34 ++++++++++--------
 src/libcamera/pipeline/ipu3/cio2.cpp     |  3 +-
 src/libcamera/pipeline/ipu3/frames.cpp   |  5 +--
 src/libcamera/request.cpp                |  7 ++--
 12 files changed, 91 insertions(+), 90 deletions(-)