Source: gst-plugins-bad1.0
Version: 1.22.3-1
Severity: normal
Tags: patch
Hi,
the new 2.40.x branch of the WPE WebKit engine introduced a new 2.0
API. The GStreamer WPE plugin uses the 1.1 API, which upstream would
like to remove sooner or later.
The wpewebkit-2.0 packages have already been uploaded to experimental.
Since WPE WebKit in Debian only has two reverse dependencies I would
like to make the transition, move wpewebkit-2.0 to unstable and get
rid of wpewebkit-1.1.
One of the reverse dependencies (cog) is ready and also available in
experimental.
The other one is gstreamer1.0-wpe. This has been updated upstream to
support the 2.0 API but it hasn't been released yet (it will likely
happen after summer if I'm not wrong). However the patch can be cherry
picked to the stable branch.
I'm attaching the debdiff in case you want to consider switching the
gst-wpe plugin to the 2.0 API in experimental. Once that is done I'm
ready to move the wpewebkit-2.0 packages to unstable.
Thanks,
Berto
diff -Nru gst-plugins-bad1.0-1.22.3/debian/changelog
gst-plugins-bad1.0-1.22.3/debian/changelog
--- gst-plugins-bad1.0-1.22.3/debian/changelog 2023-05-21 14:31:50.0
+0200
+++ gst-plugins-bad1.0-1.22.3/debian/changelog 2023-06-06 11:05:15.0
+0200
@@ -1,3 +1,13 @@
+gst-plugins-bad1.0 (1.22.3-2) experimental; urgency=medium
+
+ [ Alberto Garcia ]
+ * Build the gst-wpe plugin using the 2.0 WPE API.
+- debian/patches/wpe-2.0-api.patch: Cherry pick the corresponding
+ upstream commit (fe4f034c8a).
+- debian/control: Build depend on libwpewebkit-2.0-dev.
+
+ -- Alberto Garcia Tue, 06 Jun 2023 11:05:15 +0200
+
gst-plugins-bad1.0 (1.22.3-1) experimental; urgency=medium
* Team upload
diff -Nru gst-plugins-bad1.0-1.22.3/debian/control
gst-plugins-bad1.0-1.22.3/debian/control
--- gst-plugins-bad1.0-1.22.3/debian/control2023-05-21 14:31:50.0
+0200
+++ gst-plugins-bad1.0-1.22.3/debian/control2023-06-06 11:04:47.0
+0200
@@ -57,7 +57,7 @@
libopencv-dev (>= 3.0.0) [amd64 arm64 armel armhf i386 mips64el
mipsel ppc64el s390x alpha hppa hurd-i386 m68k powerpc ppc64 riscv64],
opencv-data [amd64 arm64 armel armhf i386 mips64el mipsel
ppc64el s390x alpha hppa hurd-i386 m68k powerpc ppc64 riscv64],
libwpebackend-fdo-1.0-dev (>= 1.8.0) [linux-any],
- libwpewebkit-1.1-dev (>= 2.28.0) [linux-any],
+ libwpewebkit-2.0-dev [linux-any],
libopenexr-dev,
libopenh264-dev (>= 1.3.0),
libopenjp2-7-dev (>= 2.2),
diff -Nru gst-plugins-bad1.0-1.22.3/debian/patches/series
gst-plugins-bad1.0-1.22.3/debian/patches/series
--- gst-plugins-bad1.0-1.22.3/debian/patches/series 2023-05-21
14:31:50.0 +0200
+++ gst-plugins-bad1.0-1.22.3/debian/patches/series 2023-06-06
11:03:23.0 +0200
@@ -1,2 +1,3 @@
02_opencv-data-path.patch
Skip-failing-tests.patch
+wpe-2.0-api.patch
diff -Nru gst-plugins-bad1.0-1.22.3/debian/patches/wpe-2.0-api.patch
gst-plugins-bad1.0-1.22.3/debian/patches/wpe-2.0-api.patch
--- gst-plugins-bad1.0-1.22.3/debian/patches/wpe-2.0-api.patch 1970-01-01
01:00:00.0 +0100
+++ gst-plugins-bad1.0-1.22.3/debian/patches/wpe-2.0-api.patch 2023-06-06
11:05:15.0 +0200
@@ -0,0 +1,246 @@
+From: Philippe Normand
+Subject: wpe: Add support for the WPEWebKit 2.0 API version
+Origin:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/fe4f034c8a2a569c1530a3e98622b0ea1d96a0cb
+Index: gst-plugins-bad1.0-1.22.3/ext/wpe/WPEThreadedView.cpp
+===
+--- gst-plugins-bad1.0-1.22.3.orig/ext/wpe/WPEThreadedView.cpp
gst-plugins-bad1.0-1.22.3/ext/wpe/WPEThreadedView.cpp
+@@ -186,7 +186,11 @@ initialize_web_extensions (WebKitWebCont
+ const gchar *local_path = gst_wpe_get_devenv_extension_path ();
+ const gchar *path = g_file_test (local_path, G_FILE_TEST_IS_DIR) ?
local_path : G_STRINGIFY (WPE_EXTENSION_INSTALL_DIR);
+ GST_INFO ("Loading WebExtension from %s", path);
++#if USE_WPE2
++webkit_web_context_set_web_process_extensions_directory (context, path);
++#else
+ webkit_web_context_set_web_extensions_directory (context, path);
++#endif
+ }
+
+ static void
+@@ -348,10 +352,14 @@ WPEView* WPEContextThread::createWPEView
+ WPEView* view = nullptr;
+ dispatch([&]() mutable {
+ if (!glib.web_context) {
++#if USE_WPE2
++glib.web_context =
WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, nullptr));
++#else
+ auto *manager = webkit_website_data_manager_new_ephemeral();
+ glib.web_context =
+ webkit_web_context_new_with_website_data_manager(manager);
+ g_object_unref(manager);
++#endif
+ }
+ view = new WPEView(glib.web_context, src, context, display, width,
height);
+ });
+@@ -407,7 +415,11 @@ WPEView::WPEView(WebKitWebContext* web_c