Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Two USB camera sessions not loading simultaneously - QT 6, Camera (QTMultimedia)
Forum Updated to NodeBB v4.3 + New Features

Two USB camera sessions not loading simultaneously - QT 6, Camera (QTMultimedia)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 134 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nimaaah
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved