Address comment
This commit is contained in:
parent
21bdc03908
commit
19ef115f50
1 changed files with 6 additions and 3 deletions
|
@ -172,9 +172,12 @@ void QtMultimediaCameraHandler::CreateCamera(const std::string& camera_name) {
|
||||||
}
|
}
|
||||||
settings.setMinimumFrameRate(30);
|
settings.setMinimumFrameRate(30);
|
||||||
settings.setMaximumFrameRate(30);
|
settings.setMaximumFrameRate(30);
|
||||||
#ifdef __linux__
|
if (camera->supportedViewfinderPixelFormats().isEmpty()) {
|
||||||
settings.setPixelFormat(QVideoFrame::PixelFormat::Format_RGB565);
|
// The gstreamer plugin (used on linux systems) returns an empty list on querying supported
|
||||||
#endif
|
// viewfinder pixel formats, and will not work without expliciting setting it to some value,
|
||||||
|
// so we are defaulting to RGB565 here which should be fairly widely supported.
|
||||||
|
settings.setPixelFormat(QVideoFrame::PixelFormat::Format_RGB565);
|
||||||
|
}
|
||||||
camera->setViewfinder(&camera_surface);
|
camera->setViewfinder(&camera_surface);
|
||||||
camera->load();
|
camera->load();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue