[libcamera-devel] [RFC PATCH 4/5] QCam: Set a read control on each request to get Gain value
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Jun 7 18:05:14 CEST 2019
Hi Kieran,
Thank you for the patch.
On Thu, Jun 06, 2019 at 09:56:53PM +0100, Kieran Bingham wrote:
> ---
> src/qcam/main_window.cpp | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
> index c0ab865b46ff..8dbe597e7aa2 100644
> --- a/src/qcam/main_window.cpp
> +++ b/src/qcam/main_window.cpp
> @@ -210,6 +210,10 @@ int MainWindow::startCapture()
> }
>
> for (Request *request : requests) {
> +
> + /* Add a read request for ManualGain */
> + request->controls().emplace(ManualBrightness);
> +
I had envisioned that libcamera would report all control values
unconditionally. I'd like to discuss the pros and cons of specifying
them explicitly. I wonder in particular if applications won't just end
up adding all possible controls, which would defeat the purpose.
> ret = camera_->queueRequest(request);
> if (ret < 0) {
> std::cerr << "Can't queue request" << std::endl;
> @@ -266,12 +270,18 @@ void MainWindow::requestComplete(Request *request,
>
> display(buffer);
>
> + /* Parse completed controls */
> + for (Control c : request->controls())
> + std::cout << c << std::endl;
> +
> + /* Create a new request */
> request = camera_->createRequest();
> if (!request) {
> std::cerr << "Can't create request" << std::endl;
> return;
> }
>
> +
> request->setBuffers(buffers);
> camera_->queueRequest(request);
> }
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list