[libcamera-devel] [PATCH 0/5] libcamera: camera: Add support for stream roles
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Apr 3 03:12:16 CEST 2019
Hi,
This series changes how the default configuration is retrieved from a
camera. It replaces the current method where applications have to
enumerate a cameras streams and pick a set of them to ask for a default
configuration and then try to tune them to its use-case.
Instead the application asks libcamera for a set of stream roles to fit
its use-case and receives in returns a set of streams with a default
configuration (which it then can try and fine tune).
The goal of this series is to define the API towards the application and
not to implement smart choices in the pipeline handlers to actually
select streams. The main reason for this limitation in scope are that
all upstream pipeline handlers only support one stream so the new API is
not really useful for pipeline handlers yet.
The code is tested with a modified cam tool (patches posted in a
different series) together with out of tree IPU3 patches to extend it to
expose more then one stream per camera. So the API is proven to work
with multiple streams and can support capturing multiple streams in the
same request.
Niklas Söderlund (5):
cam: Rework how streams configuration is prepared
test: camera: Remove streams argument from configurationValid()
test: camera: Remove test for bad Stream IDs
libcamera: stream: Add basic stream roles definitions
libcamera: camera: Add support for stream roles
include/libcamera/camera.h | 3 +-
include/libcamera/stream.h | 41 +++++++++++
src/cam/main.cpp | 35 ++++++----
src/libcamera/camera.cpp | 30 +++-----
src/libcamera/include/pipeline_handler.h | 2 +-
src/libcamera/pipeline/ipu3/ipu3.cpp | 4 +-
src/libcamera/pipeline/uvcvideo.cpp | 6 +-
src/libcamera/pipeline/vimc.cpp | 6 +-
src/libcamera/pipeline_handler.cpp | 8 +--
src/libcamera/stream.cpp | 88 ++++++++++++++++++++++++
src/qcam/main_window.cpp | 5 +-
test/camera/camera_test.cpp | 25 +++----
test/camera/camera_test.h | 3 +-
test/camera/capture.cpp | 7 +-
test/camera/configuration_default.cpp | 32 ++-------
test/camera/configuration_set.cpp | 5 +-
test/camera/statemachine.cpp | 4 +-
17 files changed, 196 insertions(+), 108 deletions(-)
--
2.21.0
More information about the libcamera-devel
mailing list