summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/multimedia/camera/camera.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/examples/multimedia/camera/camera.cpp b/examples/multimedia/camera/camera.cpp
index 5fd8837f6..058f020e4 100644
--- a/examples/multimedia/camera/camera.cpp
+++ b/examples/multimedia/camera/camera.cpp
@@ -137,27 +137,6 @@ void Camera::setCamera(const QCameraDevice &cameraDevice)
updateCaptureMode();
- if (m_camera->cameraFormat().isNull()) {
- auto formats = cameraDevice.videoFormats();
- if (!formats.isEmpty()) {
- // Choose a decent camera format: Maximum resolution at at least 30 FPS
- // we use 29 FPS to compare against as some cameras report 29.97 FPS...
- QCameraFormat bestFormat;
- for (const auto &fmt : formats) {
- if (bestFormat.maxFrameRate() < 29
- && fmt.maxFrameRate() > bestFormat.maxFrameRate())
- bestFormat = fmt;
- else if (bestFormat.maxFrameRate() == fmt.maxFrameRate()
- && bestFormat.resolution().width() * bestFormat.resolution().height()
- < fmt.resolution().width() * fmt.resolution().height())
- bestFormat = fmt;
- }
-
- m_camera->setCameraFormat(bestFormat);
- m_mediaRecorder->setVideoFrameRate(bestFormat.maxFrameRate());
- }
- }
-
m_camera->start();
}