summaryrefslogtreecommitdiff
path: root/src/cam/capture_script.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-09-02 16:54:43 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-09-20 15:39:50 +0200
commitcf5d0cbb34607a3041dc21364ee79e710e9e304f (patch)
treef0d86ff11556cddcd63dc09af84669138d5e1c70 /src/cam/capture_script.h
parent74ab3f778c848b20cbf8fe299170756ff6ebab1a (diff)
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 <jacopo@jmondi.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/capture_script.h')
-rw-r--r--src/cam/capture_script.h3
1 files changed, 3 insertions, 0 deletions
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<unsigned int, libcamera::ControlList> frameControls_;
std::shared_ptr<libcamera::Camera> 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);