summaryrefslogtreecommitdiff
path: root/src/cam/capture_script.h
diff options
context:
space:
mode:
authorDaniel Semkowicz <dse@thaumatec.com>2022-06-27 14:28:05 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-09-02 12:39:44 +0200
commitf71c76ceff7ad13490fd77800059ab2bd2a61498 (patch)
treeb3b7024e39f22e524afdb6abcdd495fe312c6d43 /src/cam/capture_script.h
parent251f0534b74bcb46c777aa0df34b1b4142b664f5 (diff)
cam: Add Rectangle type parsing in capture script
This change is required for AfWindows control from capture script. Parser expects array of arrays of parameters, so it is possible to specify multiple rectangles. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/cam/capture_script.h')
-rw-r--r--src/cam/capture_script.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cam/capture_script.h b/src/cam/capture_script.h
index 8b4f8f62..fffe67e5 100644
--- a/src/cam/capture_script.h
+++ b/src/cam/capture_script.h
@@ -54,9 +54,12 @@ private:
int parseControl(EventPtr event, libcamera::ControlList &controls);
std::string parseScalar();
+ libcamera::ControlValue parseRectangles();
+ std::vector<std::vector<std::string>> parseArrays();
+ std::vector<std::string> parseSingleArray();
void unpackFailure(const libcamera::ControlId *id,
const std::string &repr);
- libcamera::ControlValue unpackControl(const libcamera::ControlId *id,
- const std::string &repr);
+ libcamera::ControlValue unpackControl(const libcamera::ControlId *id);
+ libcamera::Rectangle unpackRectangle(const std::vector<std::string> &strVec);
};