diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-11-19 15:41:01 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2015-12-10 18:07:03 +0000 |
commit | 604a5753fa2d9b8e1ef65ccd8c5fb72465462479 (patch) | |
tree | da9922c5621e22d3b7204d2394a823eac47c6859 /src/plugins/avfoundation/camera/avfimageencodercontrol.h | |
parent | 8b00d8e5422566d2ca3e6c6fe1a1bbace1a0bff0 (diff) |
AVFoundation: correctly set the activeFormat on the AVCaptureDevice.
According to the AVCaptureDevice documentation, the device must be
locked before starting the capture session to prevent the activeFormat
from being overridden. We now do that, but only if we explicitly set
an activeFormat. Otherwise the device is not locked, which allows
the session to find an appropriate format for the capture device.
The device is also locked when enabling video capture, as doing so
might also reset the activeFormat.
Task-number: QTBUG-49170
Change-Id: I75478fd4bbfec96cd2abd2c3ae2951088b38978e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Diffstat (limited to 'src/plugins/avfoundation/camera/avfimageencodercontrol.h')
-rw-r--r-- | src/plugins/avfoundation/camera/avfimageencodercontrol.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/avfoundation/camera/avfimageencodercontrol.h b/src/plugins/avfoundation/camera/avfimageencodercontrol.h index c805b3e21..d3af77ffd 100644 --- a/src/plugins/avfoundation/camera/avfimageencodercontrol.h +++ b/src/plugins/avfoundation/camera/avfimageencodercontrol.h @@ -68,7 +68,7 @@ private: AVFCameraService *m_service; QImageEncoderSettings m_settings; - void applySettings(); + bool applySettings(); bool videoCaptureDeviceIsValid() const; }; |