[libcamera-devel] [PATCH v2 00/16] Add support for external buffers
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sat Jul 13 19:23:35 CEST 2019
a.k.a. Cover letter at 2:00am after a long code camp
Hello everybody,
This patch series adds buffer import to libcamera. This is the result of
lots of back-and-forth face-to-face work between Jacopo and me, and
should get close to upstreamable state.
After having worked and reworked the code for way too long, I believe
we'll need another rework of the API on top of this series to more
clearly separate the different concepts into different objects. For the
time being, this should allow us to import buffers from the Android
camera HAL, and goes (in my opinion at least in the right direction).
Summarizing the series here is difficult as it interleaves fixes and
reworks that may appear semi-random with patches that implement the core
of buffer importing. The first large change is patch 06/16 that reworks
the Buffer class extensively and splits it in two. Patch 11/16 and 12/16
prepare for buffer import by extending the application-facing API of the
related classes, and patches 14/16 and 15/16 implementing the remaining
part of buffer importing. Finally patch 16/16 adds a buffer import test.
Jacopo Mondi (6):
libcamera: stream: Shorten access to the bufferPool
libcamera: stream: Add Stream memory type
libcamera: buffer: Add dmabuf file descriptors
libcamera: stream: Map external buffers to indexes
libcamera: pipeline: Support importing buffers
test: camera: Add buffer import and mapping test
Laurent Pinchart (10):
libcamera: camera: Don't move buffers away from request at completion
libcamera: camera: Don't check buffer count before freeing buffers
libcamera: pipeline_handler: Simplify request completion
libcamera: request: Add cookie to make request tracking easier
libcamera: v4l2_videodevice: Add helper to queue all buffers
libcamera: buffer: Split memory information to BufferMemory
libcamera: v4l2_videodevice: Signal buffer completion at streamoff
time
libcamera: pipeline: ipu3: Use stream configuration to get buffers
count
libcamera: Stop using Stream::bufferPool to get the number of buffers
libcamera: buffer: Add an accessor to the BufferMemory
include/libcamera/buffer.h | 63 ++--
include/libcamera/camera.h | 3 +-
include/libcamera/request.h | 12 +-
include/libcamera/stream.h | 23 ++
src/cam/buffer_writer.cpp | 6 +-
src/cam/capture.cpp | 38 +-
src/libcamera/buffer.cpp | 177 +++++++---
src/libcamera/camera.cpp | 42 ++-
src/libcamera/include/pipeline_handler.h | 2 +-
src/libcamera/include/v4l2_videodevice.h | 9 +-
src/libcamera/pipeline/ipu3/ipu3.cpp | 78 +++--
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 12 +-
src/libcamera/pipeline/uvcvideo.cpp | 8 +-
src/libcamera/pipeline/vimc.cpp | 8 +-
src/libcamera/pipeline_handler.cpp | 49 +--
src/libcamera/request.cpp | 70 +++-
src/libcamera/stream.cpp | 234 ++++++++++++-
src/libcamera/v4l2_videodevice.cpp | 109 ++++--
src/qcam/main_window.cpp | 36 +-
test/camera/buffer_import.cpp | 425 +++++++++++++++++++++++
test/camera/capture.cpp | 20 +-
test/camera/meson.build | 1 +
test/camera/statemachine.cpp | 6 +-
test/v4l2_videodevice/buffer_sharing.cpp | 14 +-
test/v4l2_videodevice/capture_async.cpp | 8 +-
25 files changed, 1201 insertions(+), 252 deletions(-)
create mode 100644 test/camera/buffer_import.cpp
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list