Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11, 5.12
-
None
-
-
5f15380e7c807c8111c32fc9bcf53189a868d23c (qt/qtmultimedia/5.12)
Description
DirectShowCameraZoomControl caches currently requested (optical) zoom in _m_requestedOpticalZoom_ and tries to restore it each time, when QCamera is being in Loaded state.
The problem happens , if zoom was not requested externally at all. (_m_requestedOpticalZoom_ == 0) - in that case DirectShowCameraZoomControl shouldn't change zoom level at all.
=========
User use case:
=========
I'm using a webcam that supports optical zoom and has a (physical) remote to change it.
I have a Qt application (currently using Qt 5.11.2) that streams from that camera.
I'm using the remote (only) to change zoom level.
Sometime I do a resolution change (stop steam -> change resolution -> start stream), and I expect Zoom level to remain the same
In fact - zoom is always being reset to 1x, which is inconvenient.
=====
Didn't happen in Qt 5.9 (it didn't have DirectShowCameraZoomControl at all).
Does not happen on macOS (AVFCameraZoomControl has different behavior) no zoom control there either.
====
Suggested fix:
In this line of code also check that _m_requestedOpticalZoom_ is non-zero.