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. Qt and X
Forum Updated to NodeBB v4.3 + New Features

Qt and X

Scheduled Pinned Locked Moved General and Desktop
7 Posts 2 Posters 2.9k Views 1 Watching
  • 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.
  • I Offline
    I Offline
    Idan_Bachar
    wrote on last edited by
    #1

    Hello,
    Due to not being a proper solution to video capture (at least not in previous versions) our software uses X directly to paint on a widget.
    We use XvShmPutImage directly on the winId obtained by the widget and this works mostly ok.
    The thing is that sometimes it is necessary to explicitly capture a frame and display it on a widget.
    I can confirm that capturing the frame works andXvShmPutImage is invoked but I can't see anything displayed on the widget.
    My guess is that it has to do with Qt not knowing that the widget was painted on and needs to be notified or something like that
    but it's just a guess.
    If anyone has any thought on why this might happen it would be greatly appreciated.

    Thanks.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      capisce
      wrote on last edited by
      #2

      Are you using the Qt::WA_PaintOnScreen attribute to prevent Qt from also flushing its backing store contents to the same widget?

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Idan_Bachar
        wrote on last edited by
        #3

        Yes I am.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          capisce
          wrote on last edited by
          #4

          How do you do the frame capture?

          1 Reply Last reply
          0
          • I Offline
            I Offline
            Idan_Bachar
            wrote on last edited by
            #5

            We are using V4L2 to capture the video, the copying the data to an XvImage and eventually drawing it using XvShmPutImage.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              capisce
              wrote on last edited by
              #6

              But you said:

              bq. We use XvShmPutImage directly on the winId obtained by the widget and this works mostly ok.

              and then:

              bq. The thing is that sometimes it is necessary to explicitly capture a frame and display it on a widget.
              I can confirm that capturing the frame works and XvShmPutImage is invoked but I can’t see anything displayed on the widget.

              What do you do differently in these two cases such that the first works mostly ok and the second fails, if you use XvShmPutImage in both?

              1 Reply Last reply
              0
              • I Offline
                I Offline
                Idan_Bachar
                wrote on last edited by
                #7

                I think this has been solved. Not sure but I think a call to XSync was neccesary.
                THanks.

                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