Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-141820 Implement setting frame rate for screen and window capture
  3. QTBUG-141822

Add frame rate methods to QPlatformSurfaceCapture and derived ones

XMLWordPrintable

    • Icon: Technical task Technical task
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • Multimedia
    • None
    • All

      Smth like this. Note, it's a design proposal; feel free to come up with a better one.

      It's going to be used from both sides, implementations and public API

      public:
      
      void setUserFrameRate(std::optional<qreal>) {
            m_userFrameRate = ...
            // maybe emit frameRateChanged
      }
      std::optional<qreal> frameRate() const {
            return m_userFrameRate ? m_userFrameRate : m_actualFrameRate;
      }
      
      std::optional<qreal> userFrameRate() const; // getter
      
      protected:
      
      // invoked from derived ones
      void setActualFrameRate(std::optional<qreal> ) {
           m_actualFrameRate = ...
           // maybe emit frameRateChanged
      }
      

      Implementations of QFFmpegSurfaceCaptureGrabber should consider capture.userFrameRate() in the constructor.
      After construction and deletion of the grabber, we should update QPlatfromSurfaceCapture::setActualFrameRate.

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

            mikko.hallamaa Mikko Hallamaa
            artemiy Artem Dyomin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes