Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9
-
None
-
-
6a52a7c1f (dev), 42fea9236 (dev), 2563e60dd (tqtc/lts-6.8), 984e457c4 (tqtc/lts-6.8)
-
Multimedia, weeks 13-14, Multimedia, weeks 15-16
Description
Observed on macOS and iOS.
If you have a QML setup similar to the following:
CameraPermission { id: cameraPermission onStatusChanged: () => { if (status === Qt.PermissionStatus.Granted) { myCamera.active = true } } } Component.onCompleted: cameraPermission.request() TestLib.CameraHelper { id: myCamera active: true }
Then the camera will have the property "active" set to true, even before the permission is granted, and it will not transmit any frames. If the user then grants access, the camera will still not send transmit any frames even though it is still marked as active and permission is granted.
This leaves the camera in an unusable state until the user switches device and then back. This workaround is impossible if the user only has a single camera connected.
What do you expect to happen
I expect the camera to not go into "active = true" whenever permission is not granted. Instead I expect it to start working once I assign true to the "active" property, only after permission has been granted.
Attachments
For Gerrit Dashboard: QTBUG-135256 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
637578,9 | Darwin, Camera: Configure AVCaptureSession with device during setActive | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
638379,3 | Darwin, camera: Remove error-prone AVCaptureDevice getter | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
640800,2 | Darwin, camera: Remove error-prone AVCaptureDevice getter | 6.9 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
640801,2 | Darwin, Camera: Configure AVCaptureSession with device during setActive | 6.9 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
641046,2 | Darwin, camera: Remove error-prone AVCaptureDevice getter | tqtc/lts-6.8 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |
641047,2 | Darwin, Camera: Configure AVCaptureSession with device during setActive | tqtc/lts-6.8 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |