[libcamera-devel] [PATCH 0/2] Introduce PlatformFrameBufferAllocator

Hirokazu Honda hiroh at chromium.org
Thu Oct 28 09:30:36 CEST 2021


This is the initial work towards unifying identical stream
requests by HAL client to a single stream configuration request
to a camera.

My previous patch (https://patchwork.libcamera.org/patch/13592/)
has been reverted because it has the edge case that all the
capture requests are resolved to CameraStream::Type::Mapped.
That is, no buffer to be written by a native camera is provided.

I resolve this problem by dyanically allocating a required
FrameBuffer upon requesting such captrues. This patch series
introduce PlatformFrameBufferAllocator for that. Note that
the exting FrameBufferAllocator cannot used for this purpose,
because it is not allowed to be used while Camera is running.

Hirokazu Honda (2):
  libcamera: framebuffer: Enable attaching additional data to
    FrameBuffer
  android: Introduce PlatformFrameBufferAllocator

 include/libcamera/framebuffer.h               |   2 +
 include/libcamera/internal/framebuffer.h      |   1 +
 src/android/frame_buffer_allocator.h          |  55 +++++++
 .../mm/cros_frame_buffer_allocator.cpp        |  88 +++++++++++
 .../mm/generic_frame_buffer_allocator.cpp     | 140 ++++++++++++++++++
 src/android/mm/meson.build                    |   6 +-
 src/libcamera/framebuffer.cpp                 |  17 ++-
 7 files changed, 305 insertions(+), 4 deletions(-)
 create mode 100644 src/android/frame_buffer_allocator.h
 create mode 100644 src/android/mm/cros_frame_buffer_allocator.cpp
 create mode 100644 src/android/mm/generic_frame_buffer_allocator.cpp

--
2.33.1.1089.g2158813163f-goog


More information about the libcamera-devel mailing list