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

Video covers native child widget overlay when using OpenVG graphics system

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • 4.7.1
    • 4.7.0
    • (Inactive) mmfphonon

    Description

      It should be possible to place an overlay on top of video content using a widget hierarchy as follows:

      TLW
      |
      +--Container
         |
         +--VideoWidget
         |
         +--Overlay
      

      VideoWidget can either be:

      • Derived from Phonon::VideoWidget, in which case the Phonon backend internally creates a child widget can calls winId() on it
      • Derived from QWidget, in which case winId() is called by the VideoWidget itself and the native window handle passed to CVideoPlayerUtility2

      The position and size of Overlay is updated whenever the position or size of VideoWidget changes - this can be done by installing an eventFilter on VideoWidget.

      The z-order of Overlay is higher than that of VideoWidget.

      Because winId() is called on either VideoWidget or one of its children, native window handles are created for all widgets in the tree, including Overlay. Video is therefore rendered into a separate native window from that used to display the overlay.

      Environment

      Qt: Built from source, qt-s60-public/4.7 commit 700ba679
      Device: N8, wk26 RnD image

      Steps to reproduce

      This can be reproduced using the attached test app videooverlay_QTBUG-12607_1.zip.

      The attached logs were created in the above environment using the following command line options [1]:

      native.log

      videooverlay.exe -container -video native -overlay nativechildwidget -graphicssystem openvg 
      

      phonon.log

      videooverlay.exe -container -video phonon -overlay nativechildwidget -graphicssystem openvg
      

      Expected behaviour

      Overlay is visible on top of video content [2].

      Observed behaviour

      1. When the application starts up, the UI is rendered correctly (other than the positioning error tracked by QTBUG-12605).
      2. When video starts playing, it covers the overlay [3]

      Notes

      [1] When using the raster paint engine, native video rendering works correctly, but only if a special paint mode is set on VideoWidget:

      videooverlay.exe -container -video native  -videowidgetpaint disable -overlay nativechildwidget -graphicssystem raster
      

      or

      videooverlay.exe -container -video native  -videowidgetpaint zerofill -overlay nativechildwidget -graphicssystem raster
      

      Setting either paint mode when using OpenVG graphics has no effect.

      [2] The overlay will be displayed transparent, even if Qt::WA_TranslucentBackground is set on it. This is because, to be shown translucent, the overlay must be a TLW, because this is the only way for the overlay to be rendered to a backing store which has an alpha channel. This can be done by running the test app with the following options:

      videooverlay.exe -container -video phonon -overlay toplevelwidget -overlaypaint translucent -graphicssystem raster
      

      The video and overlay are then rendered correctly (other than the positioning error tracked by QTBUG-12605).

      [3] Whenever '-video native' is specified, the borders above and below the video content are filled with white, rather than the expected black borders.

      [4] This is not a window z-ordering problem: calling raise() on Overlay, at the point when video is displayed, does not have any effect.

      Attachments

        1. videooverlay_QTBUG-12607_1.zip
          20 kB
        2. tracking-overlay.zip
          4 kB
        3. QTBUG-12607_2.zip
          24 kB
        4. phonon.log
          11 kB
        5. native.log
          9 kB
        6. dump_backing_store.patch
          7 kB
        7. BackingStoreDump.zip
          6 kB
        8. avkonvideooverlay.zip
          13 kB

        Issue Links

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

          Activity

            People

              gastockw Gareth Stockwell
              gastockw Gareth Stockwell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes