Commit graph

16 commits

Author SHA1 Message Date
Philippe Normand
314a8c023f wpe: WebView and WebContext handling fixes
The WPEThreaded view is now split in 2 classes:
- WPEContextThread handles the persistent WebKit thread, where all WebKit API
calls should be handled.
- WPEView: is created from the WPEContextThread. It handles the WebView and
maintains the public interface on which wpesrc relies. This is the facade for
the WebView, basically. It takes care of dispatching API calls into the context
thread.

With these fixes it is now possible to create (and reuse) mutlple wpesrc
elements during the application lifetime.

Fixes #1372

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1484>
2020-08-14 09:41:56 +00:00
Mathieu Duponchelle
ad57b8040f wpe: fix ready signalling
Receiving the WEBKIT_LOAD_COMMITTED event doesn't actually
mean we have committed an SHM buffer / image yet.

As this is the condition we are interested in, check it
instead.

Also wrap g_cond_wait in a loop for extra correctness points.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1476>
2020-07-30 08:09:47 +00:00
Philippe Normand
991bcb22d5 wpe: Add support for SHM without requiring EGLDisplay
The previous version of the SHM export support still required a valid
EGLDisplay. The upcoming WPEBackend-FDO 1.8.x aims to remove this requirement,
hence allowing wpesrc to be used without GPU.
2020-04-13 11:53:16 +00:00
Philippe Normand
9ac798ae5e wpe: Add software rendering support support
Starting from WPEBackend-FDO 1.6.x, software rendering support is available.
This features allows wpesrc to be used on machines without GPU, and/or for
testing purpose. To enable it, set the `LIBGL_ALWAYS_SOFTWARE=true` environment
variable and make sure `video/x-raw, format=BGRA` caps are negotiated by the
wpesrc element.
2020-02-11 16:47:53 +00:00
Philippe Normand
b905501c55 wpe: Get rid of un-necessary frameComplete dispatchs
frameComplete() should be called only if there's a new commited frame.
2019-10-24 09:41:10 +00:00
Philippe Normand
0f03e33b03 wpe: Run frameComplete outside of images mutex scope
If the mutex is locked while running frameComplete there is a potential deadlock
bound to happen when we get a new exported images from the backend.

Fixes #1101
2019-10-24 09:41:10 +00:00
Philippe Normand
a40476914d wpesrc: Implement load-bytes action signal 2019-10-17 08:15:44 +00:00
Philippe Normand
d7778e6a7c wpe: Rewrite wpesrc as a glbasesrc subclass
And since it no longer allocates memories itself, this fixes issues with
fakevideosink. A lot of code previously copied from gltestsrc is no longer
needed thanks to the glbasesrc super-class.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1046
2019-10-17 08:15:44 +00:00
Philippe Normand
3811d13269 wpe: Port for WPEWebKit 2.25.x
When WPEBackend-fdo >= 1.3.0 is detected, the threaded view now relies on the
wpe_fdo_egl_exported_image API instead of the EGLImageKHR-based API which is
going to be deprecated in 2.26. The GLib sources created by the view now use the
default priority as well, the custom priority is no longer required.
2019-06-25 10:16:25 +00:00
Philippe Normand
5105bc8041 wpe: Fix build with -Werror enabled
Including gl.h from WPEThreadedView.h leads to GST_LEVEL_DEFAULT detected as
redefined. The proposed fix is to include config.h from the CPP implementation
file and disable gl.h inclusion in the header, by using forward declarations.
2019-06-05 12:47:16 +01:00
Philippe Normand
2b218da805 wpesrc: Switch to WPEBackend-fdo 1.2.0 2019-03-30 14:02:50 +00:00
Philippe Normand
6c228eef59 wpesrc: Register backend activity states 2019-03-20 10:14:51 +00:00
Philippe Normand
22b94a7a84 wpesrc: Always log loaded URI 2019-03-20 10:14:51 +00:00
Philippe Normand
451074a7e0 wpesrc: Implement webview background configuration support 2019-03-20 10:14:51 +00:00
Philippe Normand
c34cd8c5e0 wpesrc: Plug WPE's exportable leak 2019-01-22 11:52:30 +00:00
Philippe Normand
5b8935bc77 wpe: Add a source element acting as a Web Browser based on WebKit WPE
The wpe element is used to produce a video texture representing a web page
rendered off-screen by WPE. This element can be used to overlay HTML on top of
another video stream for instance.
2018-12-06 12:38:52 +00:00