Force camera pixel format to RGB565 on Linux

This commit is contained in:
Valentin Vanelslande 2018-09-21 18:28:46 -05:00 committed by GitHub
parent 80cdfe1c45
commit 21bdc03908
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,6 +172,9 @@ void QtMultimediaCameraHandler::CreateCamera(const std::string& camera_name) {
}
settings.setMinimumFrameRate(30);
settings.setMaximumFrameRate(30);
#ifdef __linux__
settings.setPixelFormat(QVideoFrame::PixelFormat::Format_RGB565);
#endif
camera->setViewfinder(&camera_surface);
camera->load();
}