Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Not able to see the video through punch hole

Not able to see the video through punch hole

Scheduled Pinned Locked Moved Unsolved Qt WebKit
9 Posts 3 Posters 3.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.
  • S Offline
    S Offline
    Srinath
    wrote on last edited by koahnig
    #1

    Hi Team,

    We have been working on browser application on SOC which render and plays video on video plane. We made video playing rectangle as punch hole to see the video from graphics plane. Also we made this rectangle as transparent in QT webkit we are not able to see the backend video ( which is playing on video plane), only black screen is appearing.

    Can any body faced similar kind of issue while using QT webkit + opengles combination.. If yes please let me know...anybody help is appreciated....

    [edit:koahnig, blanks before first paragraph removed]

    K 1 Reply Last reply
    0
    • S Srinath

      Hi Team,

      We have been working on browser application on SOC which render and plays video on video plane. We made video playing rectangle as punch hole to see the video from graphics plane. Also we made this rectangle as transparent in QT webkit we are not able to see the backend video ( which is playing on video plane), only black screen is appearing.

      Can any body faced similar kind of issue while using QT webkit + opengles combination.. If yes please let me know...anybody help is appreciated....

      [edit:koahnig, blanks before first paragraph removed]

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Srinath

      Hi and welcome to devnet forum

      The forum has a feature for formatting the input as source. Accidently you hit this feature by adding a couple of blanks as start of the first paragraph. I have removed them for you.

      Vote the answer(s) that helped you to solve your issue(s)

      S 1 Reply Last reply
      1
      • K koahnig

        @Srinath

        Hi and welcome to devnet forum

        The forum has a feature for formatting the input as source. Accidently you hit this feature by adding a couple of blanks as start of the first paragraph. I have removed them for you.

        S Offline
        S Offline
        Srinath
        wrote on last edited by
        #3

        @koahnig Thank you

        K 1 Reply Last reply
        1
        • S Srinath

          @koahnig Thank you

          K Offline
          K Offline
          Konstantin Tokarev
          wrote on last edited by
          #4

          @Srinath Easiest way to puch a hole in web page is to paint player rect with QPainter::CompositionMode_Clear. It will make a transparent hole clearing all backgrounds underneath your video element, but other elements such as tooltips of playbackcontrols will be able to overlap video just like in "normal" browser.

          Also, this thread might be helpful for you too: https://forum.qt.io/topic/76208/how-to-find-the-absolute-screen-position-of-an-element-on-a-webpage

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Srinath
            wrote on last edited by
            #5

            @Konstantin-Tokarev Thanks for the quick response. I tried with the above Composition mode. Still black screen is appearing ,not able to see the back video.

            This is the code part i am referring:

            void GraphicsContext::clearRect(const FloatRect& rect)
            {

            if (paintingDisabled())
                return;
            
            QPainter* p = m_data->p();
            QPainter::CompositionMode currentCompositionMode = p->compositionMode();
            p->setCompositionMode(QPainter::CompositionMode_Clear);   
            p->fillRect(rect,Qt::transparent);
            p->setCompositionMode(currentCompositionMode);
            

            }

            I have also tried with commenting fillRect in this case, still white screen appears. Not able to see the video through rectangle. Could you please let me know is there anything to modify to see the below video.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Srinath
              wrote on last edited by
              #6

              Hi @Konstantin-Tokarev , Problem got resolved for me. I have used GL_SCISSOR_TEST instead of fillrect. Now i am able to see the video through punch hole.

              K 2 Replies Last reply
              0
              • S Srinath

                Hi @Konstantin-Tokarev , Problem got resolved for me. I have used GL_SCISSOR_TEST instead of fillrect. Now i am able to see the video through punch hole.

                K Offline
                K Offline
                Konstantin Tokarev
                wrote on last edited by
                #7

                @Srinath I assumed you can see through qt widgets filled with transparent color, otherwise my advise is not applicable

                S 1 Reply Last reply
                0
                • K Konstantin Tokarev

                  @Srinath I assumed you can see through qt widgets filled with transparent color, otherwise my advise is not applicable

                  S Offline
                  S Offline
                  Srinath
                  wrote on last edited by
                  #8

                  @Konstantin-Tokarev ok

                  1 Reply Last reply
                  0
                  • S Srinath

                    Hi @Konstantin-Tokarev , Problem got resolved for me. I have used GL_SCISSOR_TEST instead of fillrect. Now i am able to see the video through punch hole.

                    K Offline
                    K Offline
                    Konstantin Tokarev
                    wrote on last edited by
                    #9

                    AFAIU, using GL_SCISSOR_TEST won't allow page to paint anything on top of the hole. This may work for you, but many implementations of media controls rely heavily on painting semi-transparent elements on top of video. This includes built-in controls of QtWebKit.

                    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