diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-08-28 03:38:42 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-09-01 22:41:01 +0300 |
commit | ee4681b7e8899c50b6d960d3b0b52ffd09c19a22 (patch) | |
tree | 23ef1ac401184886083959ad748a85762144d7ff /src/qcam/main_window.cpp | |
parent | 6b3f8a78750fb6ad87f15fdecba5c5a49ceaf6e5 (diff) |
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 <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r-- | src/qcam/main_window.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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"; |