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>
This commit is contained in:
Laurent Pinchart
2022-08-28 03:38:42 +03:00
parent 6b3f8a7875
commit ee4681b7e8
6 changed files with 15 additions and 5 deletions

View File

@@ -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";