diff options
author | Carlos Rafael Giani <dv@pseudoterminal.org> | 2017-05-21 16:01:14 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-08-14 14:51:43 +0300 |
commit | d9a294ac9f44a23d2d2fe2598cc9c0f33b667a1c (patch) | |
tree | 2262003529ce698cd7745cebe18a790db0807a9e /ext | |
parent | ac068bd2b9274aa0d812a7611a601c08fc1958ff (diff) | |
download | gstreamer-plugins-good-d9a294ac9f44a23d2d2fe2598cc9c0f33b667a1c.tar.gz |
qmlglsink: Add itemInitialized signal to QML item
This is useful for autoplay for example. With autoplay, it is necessary to
wait until the scene graph is fully set up. This signal is emitted once the
QML item node is ready. So, inside a connected slot, the pipeline's state
can be set to PLAYING to automatically start playback as soon as the QML
script is loaded.
https://bugzilla.gnome.org/show_bug.cgi?id=786246
Diffstat (limited to 'ext')
-rw-r--r-- | ext/qt/qtitem.cc | 2 | ||||
-rw-r--r-- | ext/qt/qtitem.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc index 5806bbcff..b20a6fb5d 100644 --- a/ext/qt/qtitem.cc +++ b/ext/qt/qtitem.cc @@ -289,6 +289,8 @@ QtGLVideoItem::onSceneGraphInitialized () GST_DEBUG ("%p created wrapped GL context %" GST_PTR_FORMAT, this, this->priv->other_context); + + emit itemInitialized(); } void diff --git a/ext/qt/qtitem.h b/ext/qt/qtitem.h index b322068f3..8cffc2445 100644 --- a/ext/qt/qtitem.h +++ b/ext/qt/qtitem.h @@ -77,6 +77,9 @@ public: /* private for C interface ... */ QtGLVideoItemPrivate *priv; +Q_SIGNALS: + void itemInitialized(); + private Q_SLOTS: void handleWindowChanged(QQuickWindow * win); void onSceneGraphInitialized(); |