[libcamera-devel] [RFC 00/12] libcamera: Rework buffer API
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon Oct 28 03:25:13 CET 2019
Hi,
This is the RFC for the new buffer API, it is posted without
documentation just to measure if they are going in the right direction.
I'm hoping for review of the code that touches cam, qcam and pipeline
handlers to judge if the new API is easy and neat to use for developers.
I'm sure the inner plumbing can be reviewed in a potential v1 where
proper documentation will be available.
I'm sorry for the large patches at the end, but as the rework touches
pretty much every part of the code base it's hard to break it down. If
anyone spot any obvious way to break it down even further please let me
know and I will work on it for v1.
This series depends on the buffer cleanup series [1].
1. [PATCH 00/10] libcamera: Fixes found while working on new buffer API
Niklas Söderlund (12):
test: camera: buffer_import: Remove test
libcamera: pipelines: Explicitly allocate streams
libcamera: pipeline: Add helper to find request from buffer
libcamera: pipelines: Switch to helper to resolve request from buffer
libcamera: buffer: Remove request tracking
libcamera: stream: Add prototypes for new interface
libcamera: buffer: Add dedicated container for buffer information
libcamera: buffer: Add a buffer allocator
libcamera: v4l2_videodevice: Add a buffer cache class
libcamera: buffer: Store buffer information in separate container
libcamera: buffer: Switch to new buffer API
libcamera: buffer: Clean up after buffer API switch
include/ipa/ipa_interface.h | 2 +-
include/libcamera/buffer.h | 90 ++--
include/libcamera/request.h | 8 +-
include/libcamera/stream.h | 21 +-
src/cam/buffer_writer.cpp | 12 +-
src/cam/buffer_writer.h | 4 +-
src/cam/capture.cpp | 53 ++-
src/cam/capture.h | 3 +-
src/ipa/rkisp1/rkisp1.cpp | 14 +-
src/libcamera/buffer.cpp | 325 ++++---------
src/libcamera/camera.cpp | 47 +-
src/libcamera/include/pipeline_handler.h | 5 +-
src/libcamera/include/v4l2_videodevice.h | 56 ++-
src/libcamera/pipeline/ipu3/ipu3.cpp | 269 ++++-------
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 131 +++---
src/libcamera/pipeline/uvcvideo.cpp | 35 +-
src/libcamera/pipeline/vimc.cpp | 36 +-
src/libcamera/pipeline_handler.cpp | 15 +-
src/libcamera/request.cpp | 22 +-
src/libcamera/stream.cpp | 241 ----------
src/libcamera/v4l2_videodevice.cpp | 367 ++++++++-------
src/qcam/main_window.cpp | 61 ++-
src/qcam/main_window.h | 5 +-
test/camera/buffer_import.cpp | 432 ------------------
test/camera/capture.cpp | 33 +-
test/camera/meson.build | 1 -
test/camera/statemachine.cpp | 12 +-
test/v4l2_videodevice/buffer_sharing.cpp | 36 +-
test/v4l2_videodevice/capture_async.cpp | 16 +-
test/v4l2_videodevice/request_buffers.cpp | 11 +-
test/v4l2_videodevice/stream_on_off.cpp | 6 +-
test/v4l2_videodevice/v4l2_m2mdevice.cpp | 44 +-
test/v4l2_videodevice/v4l2_videodevice_test.h | 2 +-
33 files changed, 749 insertions(+), 1666 deletions(-)
delete mode 100644 test/camera/buffer_import.cpp
--
2.23.0
More information about the libcamera-devel
mailing list