From ee4681b7e8899c50b6d960d3b0b52ffd09c19a22 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 28 Aug 2022 03:38:42 +0300 Subject: qcam: Pass color space to ViewFinder::setFormat() To prepare for color space support in the viewfinder, pass the color space to the setFormat() function. Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain --- src/qcam/main_window.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/qcam/main_window.cpp') diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 7433d647..addf0d96 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -447,9 +447,13 @@ int MainWindow::startCapture() else rawStream_ = nullptr; - /* Configure the viewfinder. */ + /* + * Configure the viewfinder. If no color space is reported, default to + * sYCC. + */ ret = viewfinder_->setFormat(vfConfig.pixelFormat, QSize(vfConfig.size.width, vfConfig.size.height), + vfConfig.colorSpace.value_or(ColorSpace::Sycc), vfConfig.stride); if (ret < 0) { qInfo() << "Failed to set viewfinder format"; -- cgit v1.2.1