GNOME Bugzilla – Bug 793643
vaapi: GL context sharing issue with WebKit
Last modified: 2018-04-27 10:54:21 UTC
With gst 1.12.4 the shared GL display is correctly propagated from the video sink towards downstream GL elements and the vaapidecodebin/postproc. With gst master the propagation works as well but vaapipostproc performs an extra context query that fails and a new (not shared) gldisplaywayland is created and replaces the previous gldisplayegl (shared) display which gets finalized.. I'll attach logs exposing the issue.
Created attachment 368633 [details] gst 1.12.4 log
Created attachment 368634 [details] gst git master log
This is gst-vaapi's bug. The commit 3d56306 introduced this bug. The parameters of gst_gl_ensure_element_data have to be not local variable since they are going to be used to see if they're set in gst_element_set_context inside the api.
Created attachment 371363 [details] [review] plugins: pass members of plugins as parameters of gst_gl_ensure_element_data @Phllippe could you test with this patch. I tested with this patch and confirmed the wrong context query has gone. But there's nothing changed for me because wpe is working even without this patch. @Victor, this has to be fixed. I confirmed this causes crash with totem on Wayland.
@Hyunjun, thanks for the patch! I'm unable to test it though, my desktop computer is broken. The issue I had was with WebKitGTK in desktop (XWayland/GNOME-Shell), can you test this scenario please?
(In reply to Philippe Normand from comment #5) > @Hyunjun, thanks for the patch! I'm unable to test it though, my desktop > computer is broken. The issue I had was with WebKitGTK in desktop > (XWayland/GNOME-Shell), can you test this scenario please? Seems that it's almost same as default on ubuntu 17.10, which I am using now. Nothing different from wpe for me. But I guess this and bug #795391 are related to the webkit bug https://bugs.webkit.org/show_bug.cgi?id=184574
Created attachment 371438 [details] [review] plugins: pass members as parameters of gst_gl_ensure_element_data() The parameters of gst_gl_ensure_element_data() have to be not local variable since they are going to be used to see if they're set in gst_element_set_context() inside the API. This is basically a revert of commit 3d56306c
Created attachment 371439 [details] [review] plugins: GstGL API must use the member variables This commit basically is a revert of commits 8092537 and fc1c415
Created attachment 371440 [details] [review] plugin: remove custom GstGL context handling Instead of using our own context handling for looking for GstGL parameters (display, context and other context), this patch changes the logic to use the utility function offered by GstGL.
Attachment 371438 [details] pushed as b9c38a2 - plugins: pass members as parameters of gst_gl_ensure_element_data() Attachment 371439 [details] pushed as 86bf89d - plugins: GstGL API must use the member variables Attachment 371440 [details] pushed as 59579a9 - plugin: remove custom GstGL context handling
I haven't built webkitgtk+ in ages. Now gstreamer-vaapi works in wayland (I tested it in weston and gnome). I will merge these patches in branch 1.14 too.
branch 1.14 * d19c3dd3 plugin: remove custom GstGL context handling * 978dd3af plugins: GstGL API must use the member variables * a42ff804 plugins: pass members as parameters of gst_gl_ensure_element_data()