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

In Ubuntu 18.04 system, the function supportedviewfindersettings() is called through qcamera class, and the return value is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.15.0 RC2
    • Multimedia
    • None
    • Ubuntu18.04,Virtual Box
    • Linux/X11

    Description

      In the demo camera provided by QT ,i add the following code int the last of setCamera function:

      QList<QCameraViewfinderSettings> settings = m_camera->supportedViewfinderSettings(); qDebug() << "Settings size is " << settings.size();

      in Windows system,i can get some value of list,but in Linux ,i get nothing, the return list size is 0.

      Through debugging source code,i found a very strange problem,the following code is  in the camerabinsession.cpp file  of Multimedia module, function name is  supportedViewfinderSettings,i add the debug infomation:

      QList<QCameraViewfinderSettings> CameraBinSession::supportedViewfinderSettings() const
      {
          qDebug() << "m_status = " << m_status;
          qDebug() << "m_status >= QCamera::LoadedStatus result is " << (m_status >= QCamera::LoadedStatus);
          if (m_status >= QCamera::LoadedStatus && m_supportedViewfinderSettings.isEmpty()) {
              m_supportedViewfinderSettings =
                  capsToViewfinderSettings(supportedCaps(QCamera::CaptureViewfinder));
          }
          return m_supportedViewfinderSettings;
      }
      

      The final result is as follows:

      m_status =  QCamera::LoadingStatus
      m_status >= QCamera::LoadedStatus result is  false

      why m_status value is QCamera::LoadingStatus,but the judgment that (m_status >= QCamera::LoadedStatus) return false ?This result in the return value is always none if the m_supportedViewfinderSettings list is empty

      Attachments

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

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            hailang hailang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes