summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVal Doroshchuk <valentyn.doroshchuk@qt.io>2020-01-02 14:22:07 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2020-01-14 12:48:08 +0000
commit0144393242078421217f1967e64f00e3e32b898a (patch)
tree1825394e49cec8b9fa5c49125f9bfc820d5aeabc
parentdaaaad704562873bd63d978b1f59a5ab256edbb2 (diff)
AVF: Don't apply settings if the camera is not active yet
In macOS, a capture session can still automatically configure the capture format after you make changes. If frame rates are applied to the capture device and the camera is still not active, these rates will be overridden by old values when the capture session will be started. For this purpose lockForConfiguration is currently used within startRunning method of capture session. But in case if the settings are already applied to the capture device, we don't call lockForConfiguration within starting of the capture session (since it is needed to be called only when the settings have been changed). Suggesting to postpone setting of the format (to the capture device) until the camera is started. This will lead to apply settings before startRunning method with proper configuration lock. Fixes: QTBUG-81048 Change-Id: I04664e7b63474ce28571e888e524170b995a38d6 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit a8123e737140719549252806e0e6a1c121359f79) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm b/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
index 0054a8d01..26112f559 100644
--- a/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
+++ b/src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm
@@ -185,7 +185,6 @@ void AVFCameraViewfinderSettingsControl2::setViewfinderSettings(const QCameraVie
return;
m_settings = settings;
- applySettings(m_settings);
}
QVideoFrame::PixelFormat AVFCameraViewfinderSettingsControl2::QtPixelFormatFromCVFormat(unsigned avPixelFormat)