Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Offscreen display without Opengl
QtWS25 Last Chance

Offscreen display without Opengl

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
11 Posts 2 Posters 4.0k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    Something is not clear. You have a Qt application but you don't want to render its GUI while still showing it later on ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sgermain
      wrote on last edited by
      #3

      Thanks for your reply.

      We need a really really low latency overlay. The qt widget can lag a little but not the video behind. So we will send the qt rendered pixmap to a Fpga and he will ultimately display it on the screen.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Can you describe what your application does ? It seems you might be using the wrong tool to get what you want done.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sgermain
          wrote on last edited by
          #5

          sure.

          Fpga acquire an analog video.
          CPU generate a hi quality Qt? overlay / gui (button, menu, ... up to a webbrowser)
          CPU send the resulting gui to the Fpga. (what we are trying to do!)

          Fpga handle fusion of the overlay and display the result.

          It is a kind of augmented reality app.

          For now we have:

          QWidget* TopWindow = QApplication::topLevelWidgets().first();
          QBackingStore *store = TopWindow->backingStore();
          QPaintDevice *pdev = store->paintDevice();
          const auto image = dynamic_cast<QImage *>(pdev);
          image->save("test.bmp");  // ultimately we will not save it like that...
          

          It work if we put the code in a button event (but we need to click to refresh the bmp).
          But in a paintEvent, it is pretty glitchy, showing sometime one button, sometime the other...

          I know Qt is not typically used in this way, but if we want the quality requested for our Gui (and think about the web browser), we cannot do this only with a simple widget lib...

          Thanks again.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            A GUI a bit like the QML camera example ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sgermain
              wrote on last edited by sgermain
              #7

              Yes, with the difference that we don't plan to use QML (but why not?) and it is not QT that will handle overlay cause we require no additional delay on the video.

              To be really clear, here a simple block diagram:
              0_1530034652795_76f052e6-52fc-4f1f-b6a0-b24b3406a95e-image.png

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                I was rather wondering if you should not consider making a backend for Qt Multimedia that would provide your video image to Qt through a QVideoWidget for example.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sgermain
                  wrote on last edited by
                  #9

                  We had already considered the use of CPU / GPU to make the composition.
                  I know that this way would be easier...

                  But we are targeting 80 ms latency glass to glass.
                  60 ms already gone by the HW.

                  In SW I cannot genlock/control VSync so I will have another frame of delay on the output side.
                  Fpga can sync his input VSync on the output VSync.

                  So, we need to find on which event the
                  "QApplication::topLevelWidgets().first()->backingStore();"
                  is complete cause look like paintEvent is call many time with an incomplet pixmap.
                  We are looking for an event probably just before the flush() or something similar.

                  Thanks again

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    Just thinking out loud, shouldn't you then have a custom QPA that would send the UI directly to the FPGA ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sgermain
                      wrote on last edited by
                      #11

                      Yes a QPA sound good but not well documented.

                      We also hesitate between that and writing a new "Video driver" (LinuxFB?)
                      This solution will also facilitate portability and demo/test using local display.

                      Finally, we know that the
                      "QApplication::topLevelWidgets().first()->backingStore();"
                      in a timer, work.
                      We will see if it is acceptable (robust and responsiveness) and if recuperate input device will be possible.

                      I just wanted to be sure we were not doing anything complicated for nothing.
                      Thanks for your help.

                      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