[wpe-webkit] Hole punching and WeakRef support in WPE/WebKit v2.22

Miguel Gomez magomez at igalia.com
Wed Sep 8 00:07:20 PDT 2021


> Thank you for the feedback. I was able to find the commits you listed
> in
> your reply. I also enabled the two holepunch approaches in
> OptionsWPE.cmake
> (located under Source/cmake), rebuilt and verified that the external
> holepunch feature works as expected. However, the GStreamer-based
> holepunch
> feature seems to not work properly, despite the fact that I enabled it
> as
> mentioned above. What I saw in the corresponding manual test is the
> actual
> video playback instead of the transparent rectangle.
> Is there any additional configuration required to fully enable the
> GStreamer-based holepunch feature?

No extra configuration is required besides passing the
-DUSE_GSTREAMER_HOLEPUNCH flag to the build. It should work out of the
box, specially if you're using the WebPlatformForEmbedded repo, where
that feature is being used by many people.

The holepunch feature requires setting a video sink to the GStreamer
pipeline to work properly. In the blog post, which explains the
upstream version, you can see that a fakevideosink is used. This sink
doesn't show anything, so you can see the transparent rectangle. But
the wpe-2.22 version that you're using doesn't use fakevideosink.
Instead, it doesn't create a concrete sink and lets the playbin choose
its own one, which relies on autovideosink. What is actually created
depends on your system. If you're running on a Broadcom device, for
example, this will create the appropriate Broadcom GStreamer elements
to show the video using them.

In your case, as you're able to see the video, it means that there's a
GStreamer component in your system that's able to show it, which is
good. It means that the GStreamer holepunch actually works and that
it's already being used to show the video.

If you really want to see the transparent rectangle to check that it
works, edit MediaPlayerPrivateGStreamerBase.cpp and change
MediaPlayerPrivateGStreamerBase::createHolePunchVideoSink() to create a
fakevideosink (or fakesink if the former is not present in your system)
and return it (you can see how to do it in the blog post).


Miguel Gomez
Igalia - www.igalia.com

More information about the webkit-wpe mailing list