Commit graph

11 commits

Author SHA1 Message Date
Matthew Waters
612102fdbc gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead.  GCC 11 has started warning about using volatile
with atomic operations.

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/911>
2021-03-18 19:52:53 +11:00
Matthew Waters
625e56d3b4 qmlgloverlay: fix multiple elements with Qt 5.15
With Qt 5.15 multiple qmlgloverlay elements would produce:

ASSERT: "!m_gl->property(QSG_RENDERCONTEXT_PROPERTY).isValid()" in file /path/to/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultrendercontext.cpp, line 121

Workaround by setting the (seeminigly unused) property before
initialization.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/695>
2020-08-10 15:52:21 +10:00
Matthew Waters
88775c2e18 qt/gloverlay: fix using OpenGL after destroying Qml
Qml somewhat unhelpfully seems to uncurrent our OpenGL context on its
destruction.  Work around that by uncurrenting and recurrenting again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/632>
2020-07-10 06:11:48 +00:00
Matthew Waters
6fba2e3dd3 qt/gloverlay: reset OpenGL state after Qt drawing
Reset to the original OpenGL state as required by the GStreamer OpenGL
API contract.  Fixes output with a glimagesink element downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/623>
2020-06-12 07:23:19 +00:00
Matthew Waters
ffe4d09efc qt/gloverlay: reset current OpenGL context after Qt
Qt may replace the drawable with its own which breaks output if Qt is
not displaying the resulting video as used with e.g. glimagesink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/623>
2020-06-12 07:23:19 +00:00
Raul Tambre
37c1b1e13f qtglrenderer.cc: Fix compiling
46bfb7d247 fixed a format warning without checking if it actually compiled.
toUtf8() returns QByteArray so we need to assign it to a temporary variable to be able to get the raw string data from it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/593>
2020-05-15 19:20:45 +03:00
Raul Tambre
46bfb7d247 qtglrenderer.cc: Fix -Wformat-security warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/592>
2020-05-15 06:07:25 +00:00
Matthew Waters
05108c2898 qt: perform surface creation in the main thread
As is required when creating a QWindow instance set out in the Qt
documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/575>
2020-04-27 18:19:31 +10:00
Matthew Waters
6397d2f910 qmlgloverlay: don't leak resources freed on a different GL thread
deleting a QOpenGLFrameBufferObject needs to occur on the same thread it
was created on in order to actually free the relevant resources
immediately.  Otherwise, they will be queued for deletion and not freed
until the associated QOpenGLContext is destroyed.
2020-03-23 14:05:18 +11:00
Matthew Waters
7a25fb5b08 qt: add a qml overlay filter element [part 2]
It takes a qml scene description and renders it using a possible input
stream.

Currently supported on GLX and WGL.

Follow up to (as that MR had an old version of the commit):
- https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/475
- 4778d7166a: qt: add a qml overlay filter element
2020-03-19 17:26:54 +11:00
Matthew Waters
4778d7166a qt: add a qml overlay filter element
It takes a qml scene description and renders it using a possible input
stream.

Currently supported on GLX and WGL.
2020-03-18 11:22:39 +00:00