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. How to copy a qt application framebuffer from one process to another

How to copy a qt application framebuffer from one process to another

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
eglframebuffer
6 Posts 2 Posters 1.1k 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.
  • E Offline
    E Offline
    Ekrem
    wrote on last edited by
    #1

    Hello,

    I am currently running Qt on wayland on jetson xavier nx platform which has tegra_udrm without any issue by exporting QT_QPA_PLATFORM=wayland. So I created a simple example application on qt and while running the qt application on board, I am trying to reach qt application’s framebuffer in order to export it by using dma_buf from drmPrimeHandleToFD function to another process.

    So In order to reach qt application’s framebuffer, I implemented another application to get resources such as crtc,encoder and tried to get plane resources in order to reach frame buffer of planes by using libDRM functions and was expecting to reach it but can not reach qt application’s framebuffer.

    So Do you have any idea how to proceed with that? If it is not possible to get qt wayland framebuffer by using libdrm functions, is there some api on qt framework to manage the goal ?

    By the way, I get gbm_device from nativeInterface->nativeResourceForIntegration("NativeDisplay"); call but can not find a way to reach struct gbm_bo which is *EGLNativePixmapType. Also I can not reach to gbm_bo_handle union to export frame buffer.

    Regards

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

      Hi and welcome to devnet,

      Shouldn't you rather do that at the wayland level ?

      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
      • E Offline
        E Offline
        Ekrem
        wrote on last edited by
        #3

        Hi @SGaist ,

        Do you have any idea how to manage it ? I can reach to

        struct wl_display wl_dpy = reinterpret_cast<struct wl_display>( reinterpret_cast<void*>(nativeInterface->nativeResourceForWindow("display", NULL)));

        on QT C++ but could not see an api to get frame buffer or handle on wayland. If you know the api please share with me.

        Regards

        1 Reply Last reply
        0
        • E Offline
          E Offline
          Ekrem
          wrote on last edited by
          #4

          Hello ,

          There is also one more question, I am trying to reach EGLContext and EGLSurface from qt with the following functions:
          EGLContext context = eglGetCurrentContext();
          EGLSurface surface = eglGetCurrentSurface(EGL_READ);

          all the time these pointers returns(EGL_NO_CONTEXT and EGL_NO_SURFACE) that means I can not reach these pointers for qt application.Is there any idea what might be the reason ? Or Is there any idea how to reach these pointers on qt.

          I tried with QOpenGLContext but no luck.

          Regards

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

            Depending on what you use for your application, Qt will not use OpenGL.

            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
            • E Offline
              E Offline
              Ekrem
              wrote on last edited by
              #6

              Hello,

              I created a simple qml file only for test purposes as the following :

              import QtQuick 2.9
              import QtQuick.Window 2.2
              import Sendercpp 1.0

              Window {
              visible: true
              width: 640
              height: 600
              title: qsTr("Hello World")

              Rectangle
              {
                  id:rect
                  anchors.fill: parent
                  color: "red"
              }
              

              }

              and trying to reach EGLContext and EGLSurface but no luck for now.So If you have any idea please letme know.

              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