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

macOS: enable to set FPS for QCamera

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      a8123e737140719549252806e0e6a1c121359f79 (qt/qtmultimedia/5.14) 0144393242078421217f1967e64f00e3e32b898a (qt/qtmultimedia/5.12) 1e50366ea7cd8909f049f161a41afbd152a94579 (qt/tqtc-qtmultimedia/5.12)

      Description

      QViewfinderSettings are changed after QCamera is started.

      qDebug() << "Except"
      << "max rate = " << kExceptSetting.maximumFrameRate()
      << "min rate = " << kExceptSetting.minimumFrameRate()
      << "resolution = " << kExceptSetting.resolution()
      << "Format =" << kExceptSetting.pixelFormat()
      << "" << kExceptSetting.pixelAspectRatio();
      
      qDebug() << "Before"
      << "max rate = " << m_pCamera->viewfinderSettings().maximumFrameRate()
      << "min rate = " << m_pCamera->viewfinderSettings().minimumFrameRate()
      << "resolution = " << m_pCamera->viewfinderSettings().resolution()
      << "Format =" << m_pCamera->viewfinderSettings().pixelFormat()
      << "" << m_pCamera->viewfinderSettings().pixelAspectRatio();
      
      m_pCamera->setViewfinderSettings( kExceptSetting );
      qDebug() << "After"
      << "max rate = " << m_pCamera->viewfinderSettings().maximumFrameRate()
      << "min rate = " << m_pCamera->viewfinderSettings().minimumFrameRate()
      << "resolution = " << m_pCamera->viewfinderSettings().resolution()
      << "Format =" << m_pCamera->viewfinderSettings().pixelFormat()
      << "" << m_pCamera->viewfinderSettings().pixelAspectRatio();
      m_pCamera->start();
      }
      }
      
      void Camera::onStateChanged( QCamera::State eState )
      {
      if ( eState == QCamera::ActiveState )
      {
      qDebug() << "Final"
      << "max rate = " << m_pCamera->viewfinderSettings().maximumFrameRate()
      << "min rate = " << m_pCamera->viewfinderSettings().minimumFrameRate()
      << "resolution = " << m_pCamera->viewfinderSettings().resolution()
      << "Format =" << m_pCamera->viewfinderSettings().pixelFormat()
      << "" << m_pCamera->viewfinderSettings().pixelAspectRatio();
      }
      }
      
      The content of "Except" is : max rate = 5 min rate = 5 resolution = QSize (640, 480) Format = Format_ARGB32 QSize (1, 1)
      The content of "Before" is : max rate = 20 min rate = 20 resolution = QSize (1280, 1024) Format = Format_UYVY QSize (1, 1)
      The content of "After" is : max rate = 5 min rate = 5 resolution = QSize (640, 480) Format = Format_ARGB32 QSize (1, 1)
      The content of "Final" is : max rate = 27.5 min rate = 27.5 resolution = QSize (1280, 1024) Format = Format_ARGB32 QSize (1, 1)
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              valentyn.doroshchuk Valentyn Doroshchuk
              Reporter:
              karimpinter Karim Pinter (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes