[PATCH v2 01/12] libcamera: lc-compliance: Add controls param to start() function

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Mar 15 13:59:07 CET 2024


Quoting Stefan Klug (2024-03-13 12:12:12)
> This is needed for tests that need to pass controls to
> Camera::start().
> 
> Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> ---
>  src/apps/lc-compliance/simple_capture.cpp | 4 ++--
>  src/apps/lc-compliance/simple_capture.h   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/apps/lc-compliance/simple_capture.cpp b/src/apps/lc-compliance/simple_capture.cpp
> index cf4d7cf3..56680a83 100644
> --- a/src/apps/lc-compliance/simple_capture.cpp
> +++ b/src/apps/lc-compliance/simple_capture.cpp
> @@ -42,7 +42,7 @@ void SimpleCapture::configure(StreamRole role)
>         }
>  }
>  
> -void SimpleCapture::start()
> +void SimpleCapture::start(const ControlList *controls)
>  {
>         Stream *stream = config_->at(0).stream();
>         int count = allocator_->allocate(stream);
> @@ -52,7 +52,7 @@ void SimpleCapture::start()
>  
>         camera_->requestCompleted.connect(this, &SimpleCapture::requestComplete);
>  
> -       ASSERT_EQ(camera_->start(), 0) << "Failed to start camera";
> +       ASSERT_EQ(camera_->start(controls), 0) << "Failed to start camera";
>  }
>  
>  void SimpleCapture::stop()
> diff --git a/src/apps/lc-compliance/simple_capture.h b/src/apps/lc-compliance/simple_capture.h
> index 2911d601..54b1d54b 100644
> --- a/src/apps/lc-compliance/simple_capture.h
> +++ b/src/apps/lc-compliance/simple_capture.h
> @@ -22,7 +22,7 @@ protected:
>         SimpleCapture(std::shared_ptr<libcamera::Camera> camera);
>         virtual ~SimpleCapture();
>  
> -       void start();
> +       void start(const libcamera::ControlList *controls = nullptr);
>         void stop();
>  
>         virtual void requestComplete(libcamera::Request *request) = 0;
> -- 
> 2.40.1
>


More information about the libcamera-devel mailing list