Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8, 6.9
-
None
-
-
1ca1fe5ce (dev), 19f03bb3c (6.8), b5709f2ef (tqtc/lts-6.5), 224525e39 (dev), 38ba20a8b (6.8), d6d3cf821 (tqtc/lts-6.5), d9824ffd2 (dev), 7bf47b006 (6.8), cf183429e (tqtc/lts-6.5)
-
Multimedia wk 43-44, Multimedia wk 47-48
Description
The method QCamera::setCameraDevice needs more clear behavior as to what happens to other properties when the device changes. Without the behavior clearly defined, it leads the platforms to have different behavior, and also it makes the functionality less usable for the user.
The core issue is how a change in device affects other properties of the QCamera instance, such as flash-mode, focusDistance, zoom and so on. Different QCameraDevices have different capabilities, and support different sets of properties. The user should have some clearly defined expectations on what happens to these settings whenever the device changes.
The documentation describes no behavior on how the discrepancy is handled. Currently, our backends have little to no consistent behavor on how this is handled. Some backends will detect whether some of the settings are supported on the new device, and in turn apply it to the physical device immediately after the device is changed. Other settings are ignored, leaving the setting in a state where it is set to a value previously set by the user, but no longer reflectes what is applied to the actual camera.
I can think of two approaches to resolve this:
- Apply existing settings immediately to the new device if said feature is supported on the new device. An example of this is having the active flash or zoom "move" from one camera device to another when the switch happens. Some edge-cases should be considered in this approach.
- Settings that are not supported should have clear behavior. These can either be reset to default values, or we leave them in a state where they aren't active and the user needs to query the camera capabilities for each setting to know which is active.
- Some settings may be supported on the new device, but the range of valid values might change. An example of this is the range of supported zoom values. For these we could leave the setting to the out-of-bounds value, but not activate it. Alternatively, we could clamp said setting to the closest valid value.
- We can reset all settings unconditionally when changing device. This should involve documentation that encourages the user to run their camera configuration procedure over again whenever the camera device changes.
Attachments
For Gerrit Dashboard: QTBUG-129831 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
599023,12 | QCamera, iOS: Implement new setCameraDevice behavior | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
599488,4 | QCamera, Android: Implement new setCameraDevice behavior | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
599527,5 | QCamera, docs: Require setCameraDevice to update control properties | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
599893,2 | QCamera, docs: Require setCameraDevice to update control properties | 6.8 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
599958,2 | QCamera, docs: Require setCameraDevice to update control properties | tqtc/lts-6.5 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |
600624,2 | QCamera, Android: Implement new setCameraDevice behavior | 6.8 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
600682,4 | QCamera, Android: Implement new setCameraDevice behavior | tqtc/lts-6.5 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |
602189,2 | QCamera, iOS: Implement new setCameraDevice behavior | 6.8 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
602469,3 | QCamera, iOS: Implement new setCameraDevice behavior | tqtc/lts-6.5 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |