From f71c76ceff7ad13490fd77800059ab2bd2a61498 Mon Sep 17 00:00:00 2001 From: Daniel Semkowicz Date: Mon, 27 Jun 2022 14:28:05 +0200 Subject: 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 Reviewed-by: Jacopo Mondi Reviewed-by: Paul Elder Signed-off-by: Jacopo Mondi --- src/cam/capture_script.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/cam/capture_script.h') 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> parseArrays(); + std::vector 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 &strVec); }; -- cgit v1.2.1