Commit 4778d716 authored by Matthew Waters's avatar Matthew Waters 🐨 Committed by GStreamer Merge Bot

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.
parent 21acf312
......@@ -22,6 +22,7 @@
#include "config.h"
#endif
#include "gstqtoverlay.h"
#include "gstqtsink.h"
#include "gstqtsrc.h"
#include <QtQml/QQmlApplicationEngine>
......@@ -33,11 +34,16 @@ plugin_init (GstPlugin * plugin)
GST_RANK_NONE, GST_TYPE_QT_SINK)) {
return FALSE;
}
if (!gst_element_register (plugin, "qmlglsrc",
GST_RANK_NONE, GST_TYPE_QT_SRC)) {
return FALSE;
}
if (!gst_element_register (plugin, "qmlgloverlay",
GST_RANK_NONE, GST_TYPE_QT_OVERLAY)) {
return FALSE;
}
/* this means the plugin must be loaded before the qml engine is loaded */
qmlRegisterType<QtGLVideoItem> ("org.freedesktop.gstreamer.GLVideoItem", 1, 0, "GstGLVideoItem");
......
......@@ -28,10 +28,13 @@
#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
#include <QX11Info>
#include <gst/gl/x11/gstgldisplay_x11.h>
#include <QtPlatformHeaders/QGLXNativeContext>
#endif
#if GST_GL_HAVE_WINDOW_WAYLAND && GST_GL_HAVE_PLATFORM_EGL && defined (HAVE_QT_WAYLAND)
#include <gst/gl/egl/gstegl.h>
#include <qpa/qplatformnativeinterface.h>
#include <QtPlatformHeaders/QEGLNativeContext>
#include <gst/gl/wayland/gstgldisplay_wayland.h>
#endif
......@@ -48,11 +51,19 @@
#endif
#endif
#if GST_GL_HAVE_WINDOW_WIN32 && GST_GL_HAVE_PLATFORM_WGL && defined (HAVE_QT_WIN32)
#include <windows.h>
#include <QtPlatformHeaders/QWGLNativeContext>
#endif
#include <gst/gl/gstglfuncs.h>
#define GST_CAT_DEFAULT qt_gl_utils_debug
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
G_LOCK_DEFINE_STATIC (display_lock);
static GWeakRef qt_display;
GstGLDisplay *
gst_qt_get_gl_display ()
{
......@@ -67,6 +78,16 @@ gst_qt_get_gl_display ()
"Qt gl utility functions");
g_once_init_leave (&_debug, 1);
}
G_LOCK (display_lock);
/* XXX: this assumes that only one display will ever be created by Qt */
display = static_cast<GstGLDisplay *>(g_weak_ref_get (&qt_display));
if (display) {
GST_INFO ("returning previously created display");
G_UNLOCK (display_lock);
return display;
}
GST_INFO ("QGuiApplication::instance()->platformName() %s", app->platformName().toUtf8().data());
#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
......@@ -145,6 +166,9 @@ gst_qt_get_gl_display ()
if (!display)
display = gst_gl_display_new ();
g_weak_ref_set (&qt_display, display);
G_UNLOCK (display_lock);
return display;
}
......@@ -159,6 +183,17 @@ gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
g_return_val_if_fail (display != NULL && wrap_glcontext != NULL, FALSE);
/* see if we already have a current GL context in GStreamer for this thread */
{
GstGLContext *current = gst_gl_context_get_current ();
if (current) {
if (current->display == display) {
*wrap_glcontext = static_cast<GstGLContext *> (gst_object_ref (current));
return TRUE;
}
}
}
#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
if (GST_IS_GL_DISPLAY_X11 (display)) {
#if GST_GL_HAVE_PLATFORM_GLX
......@@ -262,3 +297,56 @@ gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
return TRUE;
}
QVariant
qt_opengl_native_context_from_gst_gl_context (GstGLContext * context)
{
guintptr handle;
GstGLPlatform platform;
handle = gst_gl_context_get_gl_context (context);
platform = gst_gl_context_get_gl_platform (context);
#if GST_GL_HAVE_WINDOW_X11 && defined (HAVE_QT_X11)
if (platform == GST_GL_PLATFORM_GLX) {
GstGLDisplay *display = gst_gl_context_get_display (context);
Display *xdisplay = (Display *) gst_gl_display_get_handle (display);
gst_object_unref (display);
return QVariant::fromValue(QGLXNativeContext((GLXContext) handle, xdisplay));
}
#endif
#if GST_GL_HAVE_PLATFORM_EGL
if (platform == GST_GL_PLATFORM_EGL) {
#if GST_GL_HAVE_WINDOW_WAYLAND && defined (HAVE_QT_WAYLAND)
GstGLDisplay *display = gst_gl_context_get_display (context);
if (gst_gl_display_get_handle_type (display) == GST_GL_DISPLAY_TYPE_WAYLAND) {
GstGLDisplayEGL *display_egl = gst_gl_display_egl_from_gl_display (display);
if (display_egl) {
EGLDisplay egl_display = (EGLDisplay) gst_gl_display_get_handle ((GstGLDisplay *) display_egl);
gst_object_unref (display_egl);
gst_object_unref (display);
return QVariant::fromValue(QEGLNativeContext((EGLContext) handle, egl_display));
}
}
#endif
}
#endif
#if GST_GL_HAVE_WINDOW_WIN32 && GST_GL_HAVE_PLATFORM_WGL && defined (HAVE_QT_WIN32)
if (platform == GST_GL_PLATFORM_WGL) {
GstGLWindow *window = gst_gl_context_get_window (context);
guintptr hwnd = gst_gl_window_get_window_handle (window);
gst_object_unref (window);
return QVariant::fromValue(QWGLNativeContext((HGLRC) handle, (HWND) hwnd));
}
#endif
{
gchar *platform_s = gst_gl_platform_to_string (platform);
g_warning ("Unimplemented configuration! This means either:\n"
"1. The qmlgl plugin was built without support for your platform.\n"
"2. The necessary code to convert from a GstGLContext to Qt's "
"native context type for \'%s\' currently does not exist.",
platform_s);
g_free (platform_s);
}
return QVariant::fromValue(nullptr);
}
......@@ -24,11 +24,15 @@
#include <gst/gst.h>
#include <gst/gl/gl.h>
#include <QVariant>
G_BEGIN_DECLS
GstGLDisplay * gst_qt_get_gl_display ();
gboolean gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
GstGLContext **wrap_glcontext, GstGLContext **context);
QVariant qt_opengl_native_context_from_gst_gl_context (GstGLContext * context);
G_END_DECLS
#endif /* __QT_GL_UTILS_H__ */
/*
* GStreamer
* Copyright (C) 2020 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/**
* SECTION:gstqtoverlay
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstqtoverlay.h"
#include "qtglrenderer.h"
#include <gst/gl/gstglfuncs.h>
#define GST_CAT_DEFAULT gst_debug_qt_gl_overlay
GST_DEBUG_CATEGORY (GST_CAT_DEFAULT);
static void gst_qt_overlay_finalize (GObject * object);
static void gst_qt_overlay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * param_spec);
static void gst_qt_overlay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * param_spec);
static gboolean gst_qt_overlay_gl_start (GstGLBaseFilter * bfilter);
static void gst_qt_overlay_gl_stop (GstGLBaseFilter * bfilter);
static gboolean gst_qt_overlay_gl_set_caps (GstGLBaseFilter * bfilter,
GstCaps * in_caps, GstCaps * out_caps);
static GstFlowReturn gst_qt_overlay_prepare_output_buffer (GstBaseTransform * btrans,
GstBuffer * buffer, GstBuffer ** outbuf);
static GstFlowReturn gst_qt_overlay_transform (GstBaseTransform * btrans,
GstBuffer * inbuf, GstBuffer * outbuf);
enum
{
PROP_0,
PROP_WIDGET,
PROP_QML_SCENE,
};
enum
{
SIGNAL_0,
SIGNAL_QML_SCENE_INITIALIZED,
LAST_SIGNAL
};
static guint gst_qt_overlay_signals[LAST_SIGNAL] = { 0 };
#define gst_qt_overlay_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstQtOverlay, gst_qt_overlay,
GST_TYPE_GL_FILTER, GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT,
"qtoverlay", 0, "Qt Video Overlay"));
static void
gst_qt_overlay_class_init (GstQtOverlayClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBaseTransformClass *btrans_class;
GstGLBaseFilterClass *glbasefilter_class;
GstGLFilterClass *glfilter_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
glbasefilter_class = (GstGLBaseFilterClass *) klass;
glfilter_class = (GstGLFilterClass *) klass;
btrans_class = (GstBaseTransformClass *) klass;
gobject_class->set_property = gst_qt_overlay_set_property;
gobject_class->get_property = gst_qt_overlay_get_property;
gobject_class->finalize = gst_qt_overlay_finalize;
gst_element_class_set_metadata (gstelement_class, "Qt Video Overlay",
"Filter/QML/Overlay", "A filter that renders a QML scene onto a video stream",
"Matthew Waters <matthew@centricular.com>");
g_object_class_install_property (gobject_class, PROP_QML_SCENE,
g_param_spec_string ("qml-scene", "QML Scene",
"The contents of the QML scene", NULL,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
g_object_class_install_property (gobject_class, PROP_WIDGET,
g_param_spec_pointer ("widget", "QQuickItem",
"The QQuickItem to place the input video in the object hierarchy",
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
/**
* GstQmlGLOverlay::qml-scene-initialized
* @element: the #GstQmlGLOverlay
* @root_item: the `QQuickItem` found to be the root item
* @user_data: user provided data
*/
gst_qt_overlay_signals[SIGNAL_QML_SCENE_INITIALIZED] =
g_signal_new ("qml-scene-initialized", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_POINTER);
gst_gl_filter_add_rgba_pad_templates (glfilter_class);
btrans_class->prepare_output_buffer = gst_qt_overlay_prepare_output_buffer;
btrans_class->transform = gst_qt_overlay_transform;
glbasefilter_class->gl_start = gst_qt_overlay_gl_start;
glbasefilter_class->gl_stop = gst_qt_overlay_gl_stop;
glbasefilter_class->gl_set_caps = gst_qt_overlay_gl_set_caps;
}
static void
gst_qt_overlay_init (GstQtOverlay * qt_overlay)
{
qt_overlay->widget = QSharedPointer<QtGLVideoItemInterface>();
}
static void
gst_qt_overlay_finalize (GObject * object)
{
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (object);
qt_overlay->widget.clear();
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gst_qt_overlay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (object);
switch (prop_id) {
case PROP_WIDGET: {
QtGLVideoItem *qt_item = static_cast<QtGLVideoItem *> (g_value_get_pointer (value));
if (qt_item)
qt_overlay->widget = qt_item->getInterface();
else
qt_overlay->widget.clear();
break;
}
case PROP_QML_SCENE:
g_free (qt_overlay->qml_scene);
qt_overlay->qml_scene = g_value_dup_string (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_qt_overlay_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (object);
switch (prop_id) {
case PROP_WIDGET:
/* This is not really safe - the app needs to be
* sure the widget is going to be kept alive or
* this can crash */
if (qt_overlay->widget)
g_value_set_pointer (value, qt_overlay->widget->videoItem());
else
g_value_set_pointer (value, NULL);
break;
case PROP_QML_SCENE:
g_value_set_string (value, qt_overlay->qml_scene);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static gboolean
gst_qt_overlay_gl_start (GstGLBaseFilter * bfilter)
{
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (bfilter);
QQuickItem *root;
GError *error = NULL;
GST_TRACE_OBJECT (bfilter, "using scene:\n%s", qt_overlay->qml_scene);
if (!qt_overlay->qml_scene || g_strcmp0 (qt_overlay->qml_scene, "") == 0) {
GST_ELEMENT_ERROR (bfilter, RESOURCE, NOT_FOUND, ("qml-scene property not set"), (NULL));
return FALSE;
}
if (!GST_GL_BASE_FILTER_CLASS (parent_class)->gl_start (bfilter))
return FALSE;
qt_overlay->renderer = new GstQuickRenderer;
if (!qt_overlay->renderer->init (bfilter->context, &error)) {
GST_ELEMENT_ERROR (GST_ELEMENT (bfilter), RESOURCE, NOT_FOUND,
("%s", error->message), (NULL));
return FALSE;
}
/* FIXME: Qml may do async loading and we need to propagate qml errors in that case as well */
if (!qt_overlay->renderer->setQmlScene (qt_overlay->qml_scene, &error)) {
GST_ELEMENT_ERROR (GST_ELEMENT (bfilter), RESOURCE, NOT_FOUND,
("%s", error->message), (NULL));
return FALSE;
}
root = qt_overlay->renderer->rootItem();
if (!root) {
GST_ELEMENT_ERROR (GST_ELEMENT (bfilter), RESOURCE, NOT_FOUND,
("Qml scene does not have a root item"), (NULL));
return FALSE;
}
g_signal_emit (qt_overlay, gst_qt_overlay_signals[SIGNAL_QML_SCENE_INITIALIZED], 0, root);
return TRUE;
}
static void
gst_qt_overlay_gl_stop (GstGLBaseFilter * bfilter)
{
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (bfilter);
if (qt_overlay->renderer) {
qt_overlay->renderer->cleanup();
delete qt_overlay->renderer;
}
qt_overlay->renderer = NULL;
GST_GL_BASE_FILTER_CLASS (parent_class)->gl_stop (bfilter);
}
static gboolean
gst_qt_overlay_gl_set_caps (GstGLBaseFilter * bfilter, GstCaps * in_caps,
GstCaps * out_caps)
{
GstGLFilter *filter = GST_GL_FILTER (bfilter);
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (bfilter);
if (!GST_GL_BASE_FILTER_CLASS (parent_class)->gl_set_caps (bfilter, in_caps, out_caps))
return FALSE;
qt_overlay->renderer->setSize (GST_VIDEO_INFO_WIDTH (&filter->out_info),
GST_VIDEO_INFO_HEIGHT (&filter->out_info));
return TRUE;
}
static GstFlowReturn
gst_qt_overlay_prepare_output_buffer (GstBaseTransform * btrans,
GstBuffer * buffer, GstBuffer ** outbuf)
{
GstBaseTransformClass *bclass = GST_BASE_TRANSFORM_GET_CLASS (btrans);
GstGLBaseFilter *bfilter = GST_GL_BASE_FILTER (btrans);
GstGLFilter *filter = GST_GL_FILTER (btrans);
GstQtOverlay *qt_overlay = GST_QT_OVERLAY (btrans);
GstGLMemory *out_mem;
if (qt_overlay->widget) {
qt_overlay->widget->setCaps (bfilter->in_caps);
qt_overlay->widget->setBuffer (buffer);
}
/* XXX: is this the correct ts to drive the animation */
out_mem = qt_overlay->renderer->generateOutput (GST_BUFFER_PTS (buffer));
if (!out_mem) {
GST_ERROR_OBJECT (qt_overlay, "Failed to generate output");
return GST_FLOW_ERROR;
}
*outbuf = gst_buffer_new ();
gst_buffer_append_memory (*outbuf, (GstMemory *) out_mem);
gst_buffer_add_video_meta (*outbuf, (GstVideoFrameFlags) 0,
GST_VIDEO_INFO_FORMAT (&filter->out_info),
GST_VIDEO_INFO_WIDTH (&filter->in_info),
GST_VIDEO_INFO_HEIGHT (&filter->out_info));
bclass->copy_metadata (btrans, buffer, *outbuf);
return GST_FLOW_OK;
}
static GstFlowReturn
gst_qt_overlay_transform (GstBaseTransform * btrans, GstBuffer * inbuf,
GstBuffer * outbuf)
{
return GST_FLOW_OK;
}
/*
* GStreamer
* Copyright (C) 2020 Matthew Waters <matthew@centricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_QT_OVERLAY_H__
#define __GST_QT_OVERLAY_H__
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/gl/gl.h>
#include "qtglrenderer.h"
#include "qtitem.h"
typedef struct _GstQtOverlay GstQtOverlay;
typedef struct _GstQtOverlayClass GstQtOverlayClass;
typedef struct _GstQtOverlayPrivate GstQtOverlayPrivate;
G_BEGIN_DECLS
GType gst_qt_overlay_get_type (void);
#define GST_TYPE_QT_OVERLAY (gst_qt_overlay_get_type())
#define GST_QT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_QT_OVERLAY,GstQtOverlay))
#define GST_QT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_QT_OVERLAY,GstQtOverlayClass))
#define GST_IS_QT_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_QT_OVERLAY))
#define GST_IS_QT_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QT_OVERLAY))
#define GST_QT_OVERLAY_CAST(obj) ((GstQtOverlay*)(obj))
/**
* GstQtOverlay:
*
* Opaque #GstQtOverlay object
*/
struct _GstQtOverlay
{
/* <private> */
GstGLFilter parent;
gchar *qml_scene;
GstQuickRenderer *renderer;
QSharedPointer<QtGLVideoItemInterface> widget;
};
/**
* GstQtOverlayClass:
*
* The #GstQtOverlayClass struct only contains private data
*/
struct _GstQtOverlayClass
{
/* <private> */
GstGLFilterClass parent_class;
};
GstQtOverlay * gst_qt_overlay_new (void);
G_END_DECLS
#endif /* __GST_QT_OVERLAY_H__ */
......@@ -2,8 +2,10 @@ sources = [
'gstplugin.cc',
'gstqsgtexture.cc',
'gstqtglutility.cc',
'gstqtoverlay.cc',
'gstqtsink.cc',
'gstqtsrc.cc',
'qtglrenderer.cc',
'qtitem.cc',
'qtwindow.cc',
]
......@@ -12,6 +14,7 @@ moc_headers = [
'qtitem.h',
'qtwindow.h',
'gstqsgtexture.h',
'qtglrenderer.h',
]
# FIXME: -Dqt5=enabled is silently ignored if a c++ compiler is not found
......
This diff is collapsed.
/*
* GStreamer
* Copyright (C) 2020 Matthew Waters <matthew@cenricular.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __QT_QUICK_RENDER_H__
#define __QT_QUICK_RENDER_H__
#include <QThread>
#include <QMutex>
#include <gst/gl/gl.h>
QT_FORWARD_DECLARE_CLASS(QOpenGLContext)
QT_FORWARD_DECLARE_CLASS(QOpenGLFramebufferObject)
QT_FORWARD_DECLARE_CLASS(QQuickRenderControl)
QT_FORWARD_DECLARE_CLASS(QQuickWindow)
QT_FORWARD_DECLARE_CLASS(QQmlEngine)
QT_FORWARD_DECLARE_CLASS(QQmlComponent)
QT_FORWARD_DECLARE_CLASS(QQuickItem)
QT_FORWARD_DECLARE_CLASS(GstAnimationDriver)
QT_FORWARD_DECLARE_CLASS(GstBackingSurface)
class GstQuickRenderer : public QObject
{
Q_OBJECT
public:
GstQuickRenderer();
~GstQuickRenderer();
/* initialize the GStreamer/Qt integration. On failure returns false
* and fills @error.
* Must be called with @context not wrapped and current in the current
* thread */
bool init (GstGLContext * context, GError ** error);
/* set the qml scene. returns false and fills @error on failure */
bool setQmlScene (const gchar * scene, GError ** error);
void setSize(int w, int h);
GstGLMemory *generateOutput(GstClockTime input_ns);
/* cleanup any resources. Any use of this object after calling this
* function may result in undefined behaviour */
void cleanup();
/* retrieve the rootItem from the qml scene. Only valid after
* setQmlScene() has been successfully called */
QQuickItem *rootItem() const;
private slots:
void initializeQml();
private:
void init();
void ensureFbo();
void updateSizes();
static void render_gst_gl_c (GstGLContext * context, GstQuickRenderer * self) { self->renderGstGL (); }
void renderGstGL ();
static void initialize_gst_gl_c (GstGLContext * context, GstQuickRenderer * self) { self->initializeGstGL (); }
void initializeGstGL ();
static void stop_c (GstGLContext * context, GstQuickRenderer * self) { self->stop (); }
void stop ();
static void activate_context_c (GstGLContext * context, GstQuickRenderer * self) { self->activateContext (); }
void activateContext ();
static void deactivate_context_c (GstGLContext * context, GstQuickRenderer * self) { self->deactivateContext (); }
void deactivateContext ();
GstGLContext *gl_context;
QOpenGLContext *m_context;
QThread *m_renderThread;
GstBackingSurface *m_surface;
QOpenGLFramebufferObject *m_fbo;
QQuickWindow *m_quickWindow;
QQuickRenderControl *m_renderControl;
QQmlEngine *m_qmlEngine;
QQmlComponent *m_qmlComponent;
QQuickItem *m_rootItem;
GstAnimationDriver *m_animationDriver;
GstGLBaseMemoryAllocator *gl_allocator;
GstGLAllocationParams *gl_params;
GstVideoInfo v_info;
GstGLMemory *gl_mem;
QString m_errorString;
};
#endif /* __QT_QUICK_RENDER_H__ */
subdir('qmloverlay')
subdir('qmlsink')
subdir('qmlsink-dynamically-added')
subdir('qmlsrc')