mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-24 02:29:20 +01:00
Move if
This commit is contained in:
parent
19ef115f50
commit
53afb1cc2d
@ -172,14 +172,14 @@ void QtMultimediaCameraHandler::CreateCamera(const std::string& camera_name) {
|
|||||||
}
|
}
|
||||||
settings.setMinimumFrameRate(30);
|
settings.setMinimumFrameRate(30);
|
||||||
settings.setMaximumFrameRate(30);
|
settings.setMaximumFrameRate(30);
|
||||||
|
camera->setViewfinder(&camera_surface);
|
||||||
|
camera->load();
|
||||||
if (camera->supportedViewfinderPixelFormats().isEmpty()) {
|
if (camera->supportedViewfinderPixelFormats().isEmpty()) {
|
||||||
// The gstreamer plugin (used on linux systems) returns an empty list on querying supported
|
// The gstreamer plugin (used on linux systems) returns an empty list on querying supported
|
||||||
// viewfinder pixel formats, and will not work without expliciting setting it to some value,
|
// 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.
|
// so we are defaulting to RGB565 here which should be fairly widely supported.
|
||||||
settings.setPixelFormat(QVideoFrame::PixelFormat::Format_RGB565);
|
settings.setPixelFormat(QVideoFrame::PixelFormat::Format_RGB565);
|
||||||
}
|
}
|
||||||
camera->setViewfinder(&camera_surface);
|
|
||||||
camera->load();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtMultimediaCameraHandler::StopCamera() {
|
void QtMultimediaCameraHandler::StopCamera() {
|
||||||
|
Loading…
Reference in New Issue
Block a user