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

Setting default surface format with 3.2 core profile breaks video decoding with a custom QAbstractVideoSurface on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.3, 5.15.4
    • 5.9.1
    • Multimedia
    • None
    • macOS
    • abab792c4f0977a4599e5b7b2e97a5ee586fe388 (qt/qtmultimedia/dev) 1c9da622dc7e8ac6fa42f5263a5410098073b662 (qt/tqtc-qtmultimedia/tqtc/lts-5.15)

    Description

      We are using QMediaPlayer to decode a video to a custom QAbstractVideoSurface. We are also using a third party library (VTK) which requires us to set a default surface format. Setting the default format to version 3.2, core profile, makes the frame received in our QAbstractVideoSurface to be always black.

      QSurfaceFormat format = QSurfaceFormat::defaultFormat();
      format.setVersion(3, 2);
      format.setProfile(QSurfaceFormat::CoreProfile);
      QSurfaceFormat::setDefaultFormat(format);
      

      Simply commenting one of the format setting restore the frame decoding.

       

      Please look at the attached simple program that demonstrates the behavior. You need to edit the code to change the path of the video file.

      Any workaround or patch will be appreciated

      Attachments

        1. main.cpp
          0.4 kB
        2. player.cpp
          2 kB
        3. player.h
          0.9 kB
        4. VideoSurface.pro
          1.0 kB

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              didier.weckmann Didier Weckmann
              Votes:
              6 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes