-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.9
-
None
-
-
18af1a447 (dev), fd28078dd (tqtc/lts-6.8)
-
Multimedia, weeks 11-12, Multimedia, weeks 13-14, Multimedia, weeks 15-16
I have only been able to reproduce this issue on macOS, but it should apply to iOS and other Apple platforms as well.
In the AVFoundation API, which we use to expose camera-devices to QMediaDevices, each camera has a property "suspended". A camera being suspended implies it is connected but is currently disabled by the system. This means we are able to establish a capture-session for the camera, but it will submit no frames.
An example:
On a Macbook Pro, there is a built-in camera. This camera goes into the "suspend" state whenever you close the lid (common usecase is when you use external display). With our current behavior, we always expose this camera as available. The user can mark the QCamera as active but will not submit any frames. If the user opens the lid, the camera will start submitting frames again, but we give no feedback to our developers when this state changes.
Ideally we should either give the developer some kind of feedback whether the camera is actually submitting frames or not (perhaps by adjusting the 'active' property of the QCamera). Or we should just not expose this camera as connected at all.
For Gerrit Dashboard: QTBUG-132167 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
635233,17 | Camera, Darwin: Don't expose suspended camera-devices | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 |
640798,2 | Camera, Darwin: Don't expose suspended camera-devices | 6.9 | qt/qtmultimedia | Status: MERGED | +2 | 0 |
641044,2 | Camera, Darwin: Don't expose suspended camera-devices | tqtc/lts-6.8 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |