gstreamer/subprojects/gst-plugins-good/ext/qt
Matthew Waters e2d388000c qt(6)/material: ensure that we always update the context in setBuffer()
Scenario is that there are two (or more) GstGLContext's wrapping Qt's GL
context from either multiple qml(6)glsink or qml(6)glsrc elements.  Call flow is this:

1. material 1 setBuffer()
2. material 1 bind()
3. material 2 setBuffer()
4. material 2 bind()

If the call to setBuffer() reuses the same buffer as previous call, then the
qt context is not updated in the material.  If however the previously used qt
context by the material had been deactivated or freed, then bind() would fail
and could result in a critical like so:

gst_gl_context_thread_add: assertion 'context->priv->active_thread == g_thread_self ()' failed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7970>
2024-11-26 22:57:51 +00:00
..
gstplugin.cc qt: Let plugin documentation show up 2024-04-11 12:38:59 +00:00
gstqsgmaterial.cc qt(6)/material: ensure that we always update the context in setBuffer() 2024-11-26 22:57:51 +00:00
gstqsgmaterial.h qmlglsink: Add support for external-oes textures 2024-08-21 17:03:21 +01:00
gstqtelement.cc Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtelements.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtgl.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtglutility.cc gl: provide a pkg-config/gir file for the viv-fb backend 2023-07-12 21:35:55 +10:00
gstqtglutility.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtoverlay.cc qmlgloverlay: make depth buffer optional 2024-11-01 02:37:57 +00:00
gstqtoverlay.h qmlgloverlay: make depth buffer optional 2024-11-01 02:37:57 +00:00
gstqtsink.cc qt: Added support for RGB16/BGR16 input format to qmlglsink 2024-10-19 09:15:55 +00:00
gstqtsink.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
gstqtsrc.cc qt: Let plugin documentation show up 2024-04-11 12:38:59 +00:00
gstqtsrc.h Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
meson.build meson: Use new has_tools kwarg to avoid unnecessary lrelease dependency 2024-11-26 18:32:44 +00:00
qtglrenderer.cc qmlgloverlay: make depth buffer optional 2024-11-01 02:37:57 +00:00
qtglrenderer.h qmlgloverlay: make depth buffer optional 2024-11-01 02:37:57 +00:00
qtitem.cc qmlglsink: Add support for external-oes textures 2024-08-21 17:03:21 +01:00
qtitem.h qt: Add touch event support 2022-03-23 13:14:52 +00:00
qtplugin.pro qml: Fix leftover reference to gstqsgtexture 2023-09-19 23:55:45 +00:00
qtwindow.cc qml: add support for non-RGBA formats as input format 2023-08-01 01:36:40 +00:00
qtwindow.h qmlglsrc: Fix deadlock when stopping 2022-04-06 10:54:51 +00:00
README.md Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00

Building for non-linux platforms

Compiling the gstqmlgl plugin for non-linux platforms is not so trivial. This file explains the steps that need to be followed for a successful build.

Step 1

Build GStreamer for the target platform using cerbero.

Step 2

Enter the cerbero shell:

./cerbero-uninstalled -c config/<target platform config>.cbc shell

Step 3

Export the following environment variables:

export PATH=/path/to/Qt/<version>/<platform>/bin:$PATH

if you are cross-compiling (ex. for android), also export:

export PKG_CONFIG_SYSROOT_DIR=/

Additionally, if you are building for android:

export ANDROID_NDK_ROOT=$ANDROID_NDK

Note: the ANDROID_NDK variable is set by the cerbero shell; if you are not using this shell, set it to the directory where you have installed the android NDK. Additionally, if you are not building through the cerbero shell, it is also important to have set PKG_CONFIG_LIBDIR to $GSTREAMER_ROOT/lib/pkgconfig.

Step 4

cd to the directory of the gstqmlgl plugin and run:

qmake .
make

Step 5

Copy the built plugin to your $GSTREAMER_ROOT/lib/gstreamer-1.0 or link to it directly if it is compiled statically

Building for Windows using pre-built gstreamer development package and Qt Creator

Step 1

Open qtplugin.pro in Qt Creator as project and configure it as usual.

Step 2

Open qtplugin.pro in the editor and make sure GSTREAMER_PATH variable in qmlplugin.pro is set to the path of your gstreamer SDK installation. This directory should contain subdirectories bin, include, lib etc. Pay attention to the correct choice of x86 or x86_64 platform.

Step 3

Build the project as usual.

Step 3

Copy the built plugin to your $GSTREAMER_ROOT/lib/gstreamer-1.0 or link to it directly if it is compiled statically.

Building for Windows using pre-built gstreamer development package and Qt on MinGW command line

Step 1

Launch Qt developer command line from the Start menu.

Step 2

cd to the directory of the gstqmlgl plugin and make sure GSTREAMER_PATH variable in qmlplugin.pro is set to the path of your gstreamer SDK installation. This directory should contain subdirectories bin, include, lib etc. Pay attention to the correct choice of x86 or x86_64 platform.

Step 3

Run the following commands in the gstqmlgl plugin directory:

qmake 
mingw32-make

Step 4

Copy the built plugin to your $GSTREAMER_ROOT/lib/gstreamer-1.0 or link to it directly if it is compiled statically.