Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Time left for display to be updated

    General and Desktop
    2
    3
    781
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mellow last edited by

      Hello,
      I'm developping a video software where a video is shown to a test subject and after a while some effects are added to the video and the subject's reaction is measured. To make this possible I need a log file that gives with millisecond precision the moment that the effect is applied to the video and shown to the person. The problem is that due to the 60Hz refresh rate of the display, the applied effect cannot be actually seen on the screen at the same moment it's applied. I was wondering if there's a way to get the time left for the screen to be updated again so I can wait before writing to the log file? I would be thankful if anyone could help me, thanks.

      1 Reply Last reply Reply Quote 0
      • Jeroentjehome
        Jeroentjehome last edited by

        Hmm,
        Maybe if we had some information about "how" your are trying to display the video we might come up with idea's. On the other hand, the 60 Hz refresh rate is only what you "desire" and up to the OS to display, but if the OS is a bit busy you might only get 40Hz refreshrate. Maybe there are signals in the widget you use that are emitted when a new "screen write" is initiated, but a bit more information on your code would be handy. Post some code along with it.
        Greetz

        Greetz, Jeroen

        1 Reply Last reply Reply Quote 0
        • M
          mellow last edited by

          The videodata is coming from a video camera. To display a frame I'm simply using a QLabel:

          @
          QImage qImg((uchar*)imBuf, VIDEO_WIDTH, VIDEO_HEIGHT, QImage::Format_RGB888);
          ui->pixmapLabel->setPixmap(QPixmap::fromImage(qImg));
          @

          Now after this piece of code I'm supposed to write to the log file, but it might take up to 16ms to actually see the new frame.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post