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

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

Message

Jacopo Mondi Nov. 6, 2024, 5:58 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.

Example results when using a VIMC test camera

$ cat /tmp/dump
---
configuration:
  orientation: Rotate0
  streams:
  - pixelformat: R8
    size: 640x360
    stride: 640
    frameSize: 230400
    bufferCount: 4
    colorSpace: Rec709/Rec709/Rec601/Limited
...

$ cat /tmp/dump.metadata
---
frames:
- 0:
    SensorTimestamp: 29405060527000
- 1:
    SensorTimestamp: 29405304569000
- 2:
    SensorTimestamp: 29405336568000
- 3:
    SensorTimestamp: 29405372556000
- 4:
    SensorTimestamp: 29405404575000
- 5:
    SensorTimestamp: 29405436578000
- 6:
    SensorTimestamp: 29405472573000
- 7:
    SensorTimestamp: 29405504579000
- 8:
    SensorTimestamp: 29405540556000
- 9:
    SensorTimestamp: 29405572579000
...


Jacopo Mondi (1):
  libcamera: Implement YamlEmitter

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     | 164 +++++
 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            |  93 +++
 src/libcamera/yaml_emitter.cpp                | 577 ++++++++++++++++++
 11 files changed, 1059 insertions(+), 10 deletions(-)
 create mode 100644 include/libcamera/internal/yaml_emitter.h
 create mode 100644 src/libcamera/yaml_emitter.cpp

--
2.47.0