[libcamera-devel,0/5] cam: Add support for capture scripts
mbox series

Message ID 20220518171921.244168-1-jacopo@jmondi.org
Headers show
Series
  • cam: Add support for capture scripts
Related show

Message

Jacopo Mondi May 18, 2022, 5:19 p.m. UTC
Hello,
   this series provides the initial plumbing into the cam test application
of the support for driving the capture session through a "capture script".

The target of this series is to allow users of the cam application to list in
a yaml file a list of frame ids and to associate to each frame a dictionary of
controls that will be applied to the camera at the requested frame number.

The ability to record in a configuration file the capture session parameters
allows to automate the execution of reproducible tests and to validate how
controls are applied by the pipeline handler/IPA.

A simple example script has been added to in patch [1/5]

Going forward it could be possible to extend the capture script to specify in
all the capture parameters which are now provided through command line
arguments, such as the streams resolutions, format and so on.

Tested on UVC camera by running the example capture script and by visually
verifying the camera brightness actually changes.

Thanks
   j

Jacopo Mondi (5):
  cam: Add a parser for capture scripts
  cam: Queue requests unconditionally
  cam: Queue requests through CameraSession::queueRequest()
  cam: Add a --script option
  cam: Use script parser to set controls

 src/cam/camera_session.cpp  |  13 +-
 src/cam/camera_session.h    |   3 +
 src/cam/capture-script.yaml |  44 ++++
 src/cam/capture_script.cpp  | 447 ++++++++++++++++++++++++++++++++++++
 src/cam/capture_script.h    |  57 +++++
 src/cam/main.cpp            |   4 +
 src/cam/main.h              |   1 +
 src/cam/meson.build         |   2 +
 8 files changed, 568 insertions(+), 3 deletions(-)
 create mode 100644 src/cam/capture-script.yaml
 create mode 100644 src/cam/capture_script.cpp
 create mode 100644 src/cam/capture_script.h

--
2.35.1