Message ID | 20190606205654.9311-5-kieran.bingham@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
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); > }
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); + 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); }