From cf5d0cbb34607a3041dc21364ee79e710e9e304f Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Fri, 2 Sep 2022 16:54:43 +0200 Subject: cam: capture_script: Introduce 'loop' property Add support to the capture script for properties that control the script execution. Script properties are specified in the 'properties' section before the actual list of controls specified in the 'frames' section. Define a first 'loop' property that allows repeating the frame list periodically. All the frame ids in the 'frames' section shall be smaller than the loop control. Modify the capture script example to show usage of the 'loop' property and better document the frames list while at it. Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart --- src/cam/capture_script.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cam/capture_script.h') diff --git a/src/cam/capture_script.h b/src/cam/capture_script.h index fffe67e5..7a0ddebb 100644 --- a/src/cam/capture_script.h +++ b/src/cam/capture_script.h @@ -40,6 +40,7 @@ private: std::map frameControls_; std::shared_ptr camera_; yaml_parser_t parser_; + unsigned int loop_; bool valid_; EventPtr nextEvent(yaml_event_type_t expectedType = YAML_NO_EVENT); @@ -49,6 +50,8 @@ private: int parseScript(FILE *script); + int parseProperties(); + int parseProperty(); int parseFrames(); int parseFrame(EventPtr event); int parseControl(EventPtr event, libcamera::ControlList &controls); -- cgit v1.2.1