[v2,0/4] libcamera: Add support for dumping capture script in YAML
mbox series

Message ID 20241202133404.41431-1-jacopo.mondi@ideasonboard.com
Headers show
Series
  • libcamera: Add support for dumping capture script in YAML
Related show

Message

Jacopo Mondi Dec. 2, 2024, 1:33 p.m. UTC
Following the RFCs that introduced the YAML emitter and adapted Paul's patches
on top of it, this proper series introduces the YamlEmitter classes first
and piles on top patches from Paul ported to use the YamlEmitter.

v1->v2:
- Address Laurent's comments on v1 on documentation
- Replace YamlDict::operator[] with YamlDict::scalar()
- Implement run-time API correctness check. As suggested by Laurent maintain
  references to each node parent and child to implement run-time
  validation of API usage correctness.
- Implement in patch 4/4 (not for inclusion) and example of bad API usage
  with associated correctness checks (ASSERT() only for testing, but I wouldn't
  mind asserting for real to catch development issues earlier)

Jacopo Mondi (2):
  libcamera: Implement YamlEmitter
  [DNI] libcamera: pipeline_handler: Break the Yaml Emitter

Paul Elder (2):
  pipeline: Add support for dumping capture script and metadata
  apps: cam: Add support for loading configuration from capture script

 include/libcamera/internal/camera.h           |   3 +
 include/libcamera/internal/meson.build        |   1 +
 include/libcamera/internal/pipeline_handler.h |  23 +
 include/libcamera/internal/yaml_emitter.h     | 149 ++++
 src/apps/cam/camera_session.cpp               |  22 +-
 src/apps/cam/capture_script.cpp               | 164 +++++
 src/apps/cam/capture_script.h                 |   8 +
 src/libcamera/camera.cpp                      |  13 +
 src/libcamera/meson.build                     |   1 +
 src/libcamera/pipeline_handler.cpp            |  94 +++
 src/libcamera/yaml_emitter.cpp                | 689 ++++++++++++++++++
 11 files changed, 1157 insertions(+), 10 deletions(-)
 create mode 100644 include/libcamera/internal/yaml_emitter.h
 create mode 100644 src/libcamera/yaml_emitter.cpp

--
2.47.0