Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using QCamera with multiple cameras
Forum Updated to NodeBB v4.3 + New Features

Using QCamera with multiple cameras

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 2.2k 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.
  • S Offline
    S Offline
    sulabh
    wrote on 3 Apr 2017, 13:21 last edited by
    #1

    Hello, I am trying to show the one camera output on two QLabel widget. However I am not able to do so. I encounter following error.

    Graph failed to connect filters -2147024809
    

    However I can see it on one screen not on another. If this is a wrong approach or is it not possible at all?

    cM = new QCamera(this);
    cM2 = new QCamera(this);
    cV = new QCameraViewfinder(this);
    cV2 = new QCameraViewfinder(this);
    mMenu = new QMenu("Options",this);
    cA = new QAction("one camera", this);
    cA2 = new QAction("both camera", this);
    mMenu->addActions({cA, cA2});
    ui->pushButton->setMenu(mMenu);
    cM->setViewfinder(cV);
    cM2->setViewfinder(cV2);
    cBox1 = new QVBoxLayout();
    cBox2 = new QVBoxLayout();
    cBox1->addWidget(cV);
    cBox2->addWidget(cV2);
    ui->label->setLayout(cBox1);
    ui->label_2->setLayout(cBox2);
    connect(cA, &QAction::triggered, [&](){
    
       
        cM->start();
    
        cM2->start();
    });
    
    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Hennes
      wrote on 3 Apr 2017, 19:02 last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 3 Apr 2017, 21:48 last edited by
        #3

        Hi and welcome to devnet,

        You should setup both your cameras explicitly using e.g. QCameraInfo.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        S 1 Reply Last reply 4 Apr 2017, 06:13
        0
        • S SGaist
          3 Apr 2017, 21:48

          Hi and welcome to devnet,

          You should setup both your cameras explicitly using e.g. QCameraInfo.

          S Offline
          S Offline
          sulabh
          wrote on 4 Apr 2017, 06:13 last edited by
          #4

          @SGaist Hi Thank you for your reply. Main issue is regarding the device, I have one device which has two ports. This means i can only activate one at a time. In case, I need to change to another camera i always have to switch the channel. My idea was to display both at a time by switching channel very fast. So it looks like they are both working.

          Anyway is it possible to display one live stream on two different screens(same widget type)? However i could not find what this error means.

          Thank you for your reply.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Apr 2017, 07:10 last edited by
            #5

            The error message indicates that the direct show backend failed the setup.

            What kind of camera is it ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply 5 Apr 2017, 08:59
            0
            • S SGaist
              4 Apr 2017, 07:10

              The error message indicates that the direct show backend failed the setup.

              What kind of camera is it ?

              S Offline
              S Offline
              sulabh
              wrote on 5 Apr 2017, 08:59 last edited by
              #6

              @SGaist Hey it finally worked... Thanks for the help

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 5 Apr 2017, 21:01 last edited by
                #7

                You're welcome !

                What did you do to make it work ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1

                1/7

                3 Apr 2017, 13:21

                • Login

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