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

Camera is automatically activated by CaptureSession

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.2.8, 6.4.3, 6.5.0, 6.6.0
    • 6.4.1
    • Multimedia
    • None
    • Android
    • f18be9c59 (dev), 749d66608 (6.5), 4f3ed53de (6.4), 2a2bc0836 (tqtc/lts-6.2)

      Declarative Camera is automatically activated/started when Camera is attached to CaptureSession. This is because from all the implementations of:

      QPlatformMediaCaptureSession::setCamera(QPlatformCamera *camera)
      

      ..only Android platform version activates the camera automatically:

      void QAndroidMediaCaptureSession::setCamera(QPlatformCamera *camera)
      {
              if (camera) {
                  m_captureSession->setCameraSession(m_cameraSession);
              } else {
                  m_captureSession->setCameraSession(nullptr);
              }        QAndroidCamera *control = static_cast<QAndroidCamera *>(camera);
              if (m_cameraControl == control)
                  return;        if (m_cameraControl)
                  m_cameraControl->setCaptureSession(nullptr);        m_cameraControl = control;
              if (m_cameraControl) {
                  m_cameraControl->setCaptureSession(this);
                  m_cameraControl->setActive(true); // <- ?????!!!!!!
              }        emit cameraChanged();
      }
      

      This is now especially bad because it seems to be too early for latest Qt versions. It will start producing black VideoOutput and invalid frames for video sink listener.

        For Gerrit Dashboard: QTBUG-109415
        # Subject Branch Project Status CR V

            qtandroidteam Qt Android Team
            kiibimees Lauri Laanmets
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes