Two USB camera sessions not loading simultaneously - QT 6, Camera (QTMultimedia)
-
Hi everyone,
I have code of the form:
MediaDevices { id: mediaDevices } Rectangle{ width:1000 height:1000 CaptureSession { id: captureSessionLeft camera: Camera { id: liveCam cameraDevice: mediaDevices.videoInputs[0] active: false focusMode: Camera.FocusModeAutoNear } videoOutput: videoOutputLeft } VideoOutput { id: videoOutputLeft anchors.fill: parent fillMode: VideoOutput.Stretch } } } Rectangle{ width:1000 height:1000 CaptureSession { id: captureSessionRight camera: Camera { id: liveCam2 cameraDevice: mediaDevices.videoInputs[1] active: false focusMode: Camera.FocusModeAutoNear } videoOutput: videoOutputRight } VideoOutput { id: videoOutputRight anchors.fill: parent fillMode: VideoOutput.Stretch } } }
Furthermore, I have tried using the .start() method for each capture session to load both cameras simultaneously. What I find is that I can only load one camera at a time, while the session that starts after is left blank.
Is there any way to fix this? Both of my cameras are USB cameras, and I have validated that I can access them.
For further context, I am running a MSVC 2019 build, on a Windows OS.
Thank you!