QCameraImageProcessingControl errors logs, but QCamera works as well
-
I have a simple QCamera Qt5.15 application. All works OK, but I see in console:
Unable to query the parameter info: QCameraImageProcessingControl::WhiteBalancePreset : "Invalid argument" Unable to query the parameter info: QCameraImageProcessingControl::ColorTemperature : "Invalid argument" Unable to query the parameter info: QCameraImageProcessingControl::SaturationAdjustment : "Invalid argument" Unable to query the parameter info: QCameraImageProcessingControl::SharpeningAdjustment : "Invalid argument"
How to fix it (simply disable)?
Default Qt QCamera example also works with same errors in console.
-
Hi,
On which OS are you ?
Not all backend are equals depending on the platform.
-
int main(int argc, char *argv[]) { QApplication app(argc, argv); QCamera* camera = new QCamera(QCameraInfo::defaultCamera()); QCameraImageCapture* capture = new QCameraImageCapture(camera); QCameraViewfinder finder(nullptr); camera->setViewfinder(&finder); QObject::connect(capture, &QCameraImageCapture::readyForCaptureChanged, [&](bool ready) { if (ready) { capture->capture(); } }); QObject::connect(capture, &QCameraImageCapture::imageCaptured, [&](int id, QImage img) { Q_UNUSED(id); QByteArray buffer; QBuffer imageBuffer(&buffer); imageBuffer.open(QIODevice::WriteOnly); img.save(&imageBuffer, "JPG"); qInfo() << "Image captured and saved to buffer!"; app.quit(); }); camera->setCaptureMode(QCamera::CaptureMode::CaptureStillImage); camera->start(); capture->setCaptureDestination(QCameraImageCapture::CaptureToBuffer); capture->setBufferFormat(QVideoFrame::Format_RGB32); return app.exec(); }
I have only one camera and defaulDefice() return it (/dev/video0)
-
Are you using your distribution provided Qt ?
-
@SGaist how do I do that? There is no GStreamer item in the online installer. When running the application with QCamera, there were errors in the console about the absence of this library. I installed it. Everything else (all Qt binaries) is installed through the official installer.
-
@acetone said in QCameraImageProcessingControl errors logs, but QCamera works as well:
There is no GStreamer item in the online installer
@SGaist suggested to try with Qt provided by your Linux distribution, not Qt online installer