After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793643 - vaapi: GL context sharing issue with WebKit
vaapi: GL context sharing issue with WebKit
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal major
: 1.14.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-20 12:26 UTC by Philippe Normand
Modified: 2018-04-27 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst 1.12.4 log (560.45 KB, application/gzip)
2018-02-20 12:28 UTC, Philippe Normand
  Details
gst git master log (275.58 KB, application/gzip)
2018-02-20 12:28 UTC, Philippe Normand
  Details
plugins: pass members of plugins as parameters of gst_gl_ensure_element_data (2.15 KB, patch)
2018-04-25 07:28 UTC, Hyunjun Ko
none Details | Review
plugins: pass members as parameters of gst_gl_ensure_element_data() (2.19 KB, patch)
2018-04-26 17:38 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
plugins: GstGL API must use the member variables (1.98 KB, patch)
2018-04-26 17:38 UTC, Víctor Manuel Jáquez Leal
committed Details | Review
plugin: remove custom GstGL context handling (6.00 KB, patch)
2018-04-26 17:38 UTC, Víctor Manuel Jáquez Leal
committed Details | Review

Description Philippe Normand 2018-02-20 12:26:30 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.
Comment 1 Philippe Normand 2018-02-20 12:28:27 UTC
Created attachment 368633 [details]
gst 1.12.4 log
Comment 2 Philippe Normand 2018-02-20 12:28:59 UTC
Created attachment 368634 [details]
gst git master log
Comment 3 Hyunjun Ko 2018-04-25 07:22:48 UTC
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.
Comment 4 Hyunjun Ko 2018-04-25 07:28:40 UTC
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.
Comment 5 Philippe Normand 2018-04-25 08:28:55 UTC
@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?
Comment 6 Hyunjun Ko 2018-04-26 05:38:52 UTC
(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
Comment 7 Víctor Manuel Jáquez Leal 2018-04-26 17:38:00 UTC
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
Comment 8 Víctor Manuel Jáquez Leal 2018-04-26 17:38:05 UTC
Created attachment 371439 [details] [review]
plugins: GstGL API must use the member variables

This commit basically is a revert of commits 8092537 and fc1c415
Comment 9 Víctor Manuel Jáquez Leal 2018-04-26 17:38:10 UTC
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.
Comment 10 Víctor Manuel Jáquez Leal 2018-04-27 10:29:54 UTC
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
Comment 11 Víctor Manuel Jáquez Leal 2018-04-27 10:42:06 UTC
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.
Comment 12 Víctor Manuel Jáquez Leal 2018-04-27 10:54:21 UTC
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()