Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122710

Calling the interface eglCreateWindowSurface fails when using the QWidget window handle to draw data with OpenGL EGL under the Android Qt platform

    XMLWordPrintable

Details

    • Android
    • 2024wk16FOQtforAndroid

    Description

      Calling the interface eglCreateWindowSurface fails during the OpenGL EGL drawing process. It is suspected that Qt also uses the QWidget window handle associated with OpenGL internally, causing the external program to fail to call the egl interface.

      How to properly pass the QWidget window handle externally and call the OpengGL EGL drawing process successfully?

      To use the attached project:
      1. Put the 4 so files in lib into the folder

      build-PlayLocalVideo-Android_Qt_6_7_0_Clang_armeabi_v7a-Debug\android-build\libs\armeabi-v7a

      2. test.mp4 is a test video, corresponding code

      QString strFile = "/storage/emulated/0/test.mp4";,

      modify the path by yourself during testing

       

      Error logs printed out from project when playing a local video file:

      E libEGL : eglCreateWindowSurface: native_window_api_connect (win=0xb4ebf808) failed (0xffffffea) (already connected to another API?)
      E libEGL : eglCreateWindowSurface:516 error 3003 (EGL_BAD_ALLOC)

      Attachments

        1. PlayLocalVideo.rar
          14.20 MB
          Kevin Zhang

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtandroidteam Qt Android Team
              kevin.zhang Kevin Zhang
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes