diff -Nru gst-plugins-bad1.0-1.12.2/debian/changelog gst-plugins-bad1.0-1.12.2/debian/changelog --- gst-plugins-bad1.0-1.12.2/debian/changelog 2017-07-18 23:20:28.000000000 +0800 +++ gst-plugins-bad1.0-1.12.2/debian/changelog 2017-08-08 17:08:09.000000000 +0800 @@ -1,3 +1,12 @@ +gst-plugins-bad1.0 (1.12.2-1ubuntu2) UNRELEASED; urgency=medium + + * Fix build failure: undefined reference to `eglGetDisplay' + * Prefer native Wayland over X11/Xwayland if both are available. This + fixes VA-API initialization failure in Gnome Shell Wayland sessions + (LP: #1698287). + + -- Daniel van Vugt Tue, 08 Aug 2017 17:08:09 +0800 + gst-plugins-bad1.0 (1.12.2-1ubuntu1) artful; urgency=medium * Merge with Debian unstable; remaining changes: diff -Nru gst-plugins-bad1.0-1.12.2/debian/patches/fix-egl.patch gst-plugins-bad1.0-1.12.2/debian/patches/fix-egl.patch --- gst-plugins-bad1.0-1.12.2/debian/patches/fix-egl.patch 1970-01-01 08:00:00.000000000 +0800 +++ gst-plugins-bad1.0-1.12.2/debian/patches/fix-egl.patch 2017-08-08 17:08:09.000000000 +0800 @@ -0,0 +1,16 @@ +Description: Fix FTBFS "undefined reference to `eglGetDisplay'" + It only seems to fail locally for me, no history of the build failing in + production. But the fix is trivial... +Author: Daniel van Vugt +Forwarded: no +Last-Update: 2017-08-08 +--- a/ext/qt/Makefile.am 2017-05-15 23:46:30.000000000 +0800 ++++ b/ext/qt/Makefile.am 2017-08-08 17:58:38.847311519 +0800 +@@ -44,6 +44,7 @@ + $(GST_BASE_LIBS) \ + $(GST_PLUGINS_BASE_LIBS) \ + $(QT_LIBS) \ ++ -lEGL \ + $(top_builddir)/gst-libs/gst/gl/libgstgl-$(GST_API_VERSION).la \ + -lgstvideo-$(GST_API_VERSION) + diff -Nru gst-plugins-bad1.0-1.12.2/debian/patches/fix-lp1698287.patch gst-plugins-bad1.0-1.12.2/debian/patches/fix-lp1698287.patch --- gst-plugins-bad1.0-1.12.2/debian/patches/fix-lp1698287.patch 1970-01-01 08:00:00.000000000 +0800 +++ gst-plugins-bad1.0-1.12.2/debian/patches/fix-lp1698287.patch 2017-08-08 17:08:09.000000000 +0800 @@ -0,0 +1,42 @@ +Description: opengl: Prefer native Wayland over Xwayland + In the absence of any environment variable "GST_GL_WINDOW", the opengl + plugin would blindly try x11 before wayland. In a traditional X session, + or a basic Weston session this is unproblematic. However in Gnome Shell + a Wayland session also includes Xwayland, so both display server types + are available simultaneously. + . + Although Xwayland works fine for simple GLX tasks, it only supports DRI3. + LibVA on the other hand only supports DRI2. So VA-API would fail to + initialize in a Wayland Gnome Shell session because the desired DRI2 + support is missing. + . + This simple fix just tries using wayland before x11 so that in a Gnome + Shell session we don't accidentally end up using Xwayland which breaks + video acceleration support (LP: #1698287). All other simpler single display + server scenarios remain unaffected. This fix only makes a difference in the + dual display server setup that is Xwayland (always on in Gnome Shell). +Author: Daniel van Vugt +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1698287 +Forwarded: no +Last-Update: 2017-08-08 +--- a/gst-libs/gst/gl/gstgldisplay.c 2017-05-29 15:50:43.000000000 +0800 ++++ b/gst-libs/gst/gl/gstgldisplay.c 2017-08-08 16:50:03.836031943 +0800 +@@ -292,14 +292,14 @@ + return NULL; + } + #endif +-#if GST_GL_HAVE_WINDOW_X11 +- if (!display && (!user_choice || g_strstr_len (user_choice, 3, "x11"))) +- display = GST_GL_DISPLAY (gst_gl_display_x11_new (NULL)); +-#endif + #if GST_GL_HAVE_WINDOW_WAYLAND + if (!display && (!user_choice || g_strstr_len (user_choice, 7, "wayland"))) + display = GST_GL_DISPLAY (gst_gl_display_wayland_new (NULL)); + #endif ++#if GST_GL_HAVE_WINDOW_X11 ++ if (!display && (!user_choice || g_strstr_len (user_choice, 3, "x11"))) ++ display = GST_GL_DISPLAY (gst_gl_display_x11_new (NULL)); ++#endif + #if GST_GL_HAVE_WINDOW_VIV_FB + if (!display && (!user_choice || g_strstr_len (user_choice, 6, "viv-fb"))) { + const gchar *disp_idx_str = NULL; diff -Nru gst-plugins-bad1.0-1.12.2/debian/patches/series gst-plugins-bad1.0-1.12.2/debian/patches/series --- gst-plugins-bad1.0-1.12.2/debian/patches/series 2017-07-18 23:20:28.000000000 +0800 +++ gst-plugins-bad1.0-1.12.2/debian/patches/series 2017-08-08 17:08:09.000000000 +0800 @@ -1,2 +1,4 @@ 01_fix-modplug-linking.patch pcfile-requires-plugins-good +fix-lp1698287.patch +fix-egl.patch