Skip to content

gstqmlgl: fixes related to OpenGL context sharing on Windows (WGL)

Hello! I've faced this issue when using 1.18.4 release.

The original issue #477 (closed) states that QtQuick application isn't able to create multiple GstGLVideoItem on Windows issuing the following in log:

cannot share context via wglShareLists: aa

0xAA stands for ERROR_BUSY which means that one of two contexts passed to wglShareLists is busy (made current for another thread). So the solution of the issue from Bugzilla 66960061 works only for single GstGLVideoItem unfortunately (it operates not on actual Qt GL context but on some "fake/dummy" one, which obviously doesn't work an next attempt of context creation).

So I've slightly improved the original code for Qt GL context (re)activating, added some checks to avoid crashes on QML item disposing and cleaned up code a bit. My fixes also could affect QtGLWindow but I haven't check that on Windows.

I've also create sample app which included in repo: see tests/examples/qt/qmlsink-multisink.

My work affects mostly WGL part only, so it should not introduce any regression on another platforms.

Backported fix for 1.18.4 can be found here: Ded_Zerom/gst-plugins-good@941312f3...ce13b4ac.

Fixes: #477 (closed)

Edited by Dmitry Shusharin

Merge request reports

Loading