Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Time left for display to be updated

Time left for display to be updated

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 927 Views
  • 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 Offline
    M Offline
    mellow
    wrote on last edited by
    #1

    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
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      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
      0
      • M Offline
        M Offline
        mellow
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved