g_object_notify (G_OBJECT (qt_overlay), "root-item");
g_signal_emit (qt_overlay, gst_qt_overlay_signals[SIGNAL_QML_SCENE_INITIALIZED], 0);
+ GST_OBJECT_LOCK (bfilter);
+ if (!qt_overlay->widget) {
+ QtGLVideoItem *qt_item = static_cast<QtGLVideoItem *>(root->findChild<QtGLVideoItem *> ());
+ if (qt_item)
+ qt_overlay->widget = qt_item->getInterface();
+ }
+ GST_OBJECT_UNLOCK (bfilter);
+
return TRUE;
fail_renderer:
--- /dev/null
+#!/usr/bin/env python
+
+import signal
+signal.signal(signal.SIGINT, signal.SIG_DFL)
+
+import sys
+import gi
+gi.require_version('Gst', '1.0')
+
+from gi.repository import Gst, GLib
+from PySide2.QtGui import QGuiApplication
+from PySide2.QtQuick import QQuickItem
+
+def main(args):
+ app = QGuiApplication(args)
+ Gst.init(args)
+
+ pipeline = Gst.parse_launch("""videotestsrc ! glupload ! qmlgloverlay name=o ! gldownload ! videoconvert ! autovideosink""")
+ o = pipeline.get_by_name('o')
+ f = open('overlay.qml', 'r')
+ o.set_property('qml-scene', f.read())
+
+ pipeline.set_state(Gst.State.PLAYING)
+ app.exec_()
+ pipeline.set_state(Gst.State.NULL)
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))