From 568865a6c14355d74349dea61fee06e09f11dfd7 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Wed, 18 May 2022 19:19:20 +0200 Subject: cam: Use script parser to set controls Add a "--script" option to the cam test application to allow specify a capture script to be used to drive the capture session. Add to the CameraSession class a script parser instance, created conditionally to the OptCaptureScript option. If the script parser has been created, use it at queueRequest time to retrieve the list of controls that has to be associated with a Request, and populate Request::controls() with it before queueing it to the Camera. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/cam/camera_session.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cam/camera_session.h') diff --git a/src/cam/camera_session.h b/src/cam/camera_session.h index bf966bd1..d562caae 100644 --- a/src/cam/camera_session.h +++ b/src/cam/camera_session.h @@ -23,6 +23,7 @@ #include "options.h" +class CaptureScript; class FrameSink; class CameraSession @@ -60,6 +61,8 @@ private: std::shared_ptr camera_; std::unique_ptr config_; + std::unique_ptr script_; + std::map streamNames_; std::unique_ptr sink_; unsigned int cameraIndex_; -- cgit v1.2.1