Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111704

Nothing output about video streaming.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 6.5.0 Beta3
    • Multimedia
    • None
    • Environment: Mac mini, MacOS M1 64bit, Monterey 12.3.1

      USB port: USB 3.0

      Camera format: MotionJPEG

      Qt version: Qt6.5 beta3.
    • macOS

    Description

      Hi, 

      Environment: Mac mini, MacOS M1 64bit, Monterey 12.3.1

      USB port: USB 3.0

      Camera format: MotionJPEG

      Qt version: Qt6.5 beta3.

      Description:

      Using Qt6.5 beta3, after camera starting, there is nothing output about video streaming.

      C++ code: 

      void CPreviewPage::startVideoStreaming(void)
      {
          QString str_id;
          QString str_vid;
          QString str_pid;
      
          const QList<QCameraDevice> cameras = QMediaDevices::videoInputs();
          for (const QCameraDevice &camera_device : cameras)
      
          {
              example id = "0x2600000a16809b0" or "0x100000a1680970" qDebug() << "camera_device.id = " << camera_device.id();
              str_id = camera_device.id().right(8);
              str_vid = str_id.mid(0, 4);
              str_pid = str_id.right(4);
              qDebug() << "id = " << str_id;
              qDebug() << "vid = 0x" << str_vid;
              qDebug() << "pid = 0x" << str_pid;
              if (str_vid != "a168")
                  continue;
              captureSession = new QMediaCaptureSession(this);
              pCamera = new QCamera(camera_device);
              captureSession->setCamera(pCamera);
              pGraphyScene = new QGraphicsScene(0, 0, 640, 480);
              pGraphyView = new QGraphicsView(this);
              pGraphyView->setScene(pGraphyScene);
              pGraphyVideoItem = new QGraphicsVideoItem;
              pGraphyVideoItem->setSize(QSizeF(640, 480));
              pGraphyVideoItem->setPos(0, 0);
              pGraphyScene->addItem(pGraphyVideoItem);
              captureSession->setVideoOutput(pGraphyVideoItem);
              pImageCapture = new QImageCapture((QObject *)pCamera);
              captureSession->setImageCapture(pImageCapture);
              QObject::connect(pImageCapture, SIGNAL(imageAvailable(int, const QVideoFrame &)), this, SLOT(onCaptureVideoFrame(int, const QVideoFrame &)));
              QObject::connect(pImageCapture, SIGNAL(imageCaptured(int, const QImage &)), this, SLOT(onCaptureImage(int, const QImage &)));
              pCamera->start(); // live play.
              QString title = camera_device.description() + " 0x" + QString::number(myDeviceDetectionData.devicePid, 16);
              setWindowTitle(title);
              break;
          }
      }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              dorisverria Doris Verria
              wunian Wunian LEE
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes