[libcamera-devel] [PATCH 5/5] DNI: qcam: Simple test to pass controls on camera::start()
Naushir Patuck
naush at raspberrypi.com
Fri Oct 2 11:33:09 CEST 2020
DO NOT MERGE
---
src/qcam/main_window.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index ecb9dd66..cb24eb11 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -25,6 +25,7 @@
#include <QtDebug>
#include <libcamera/camera_manager.h>
+#include <libcamera/control_ids.h>
#include <libcamera/version.h>
#include "dng_writer.h"
@@ -367,6 +368,7 @@ void MainWindow::toggleCapture(bool start)
int MainWindow::startCapture()
{
StreamRoles roles = StreamKeyValueParser::roles(options_[OptStream]);
+ ControlList controls(libcamera::controls::controls);
std::vector<Request *> requests;
int ret;
@@ -509,7 +511,10 @@ int MainWindow::startCapture()
framesCaptured_ = 0;
lastBufferTime_ = 0;
- ret = camera_->start();
+ controls.set(libcamera::controls::AeEnable, false);
+ controls.set(libcamera::controls::ExposureTime, 60000);
+ controls.set(libcamera::controls::AnalogueGain, 6.0);
+ ret = camera_->start(&controls);
if (ret) {
qInfo() << "Failed to start capture";
goto error;
--
2.25.1
More information about the libcamera-devel
mailing list