mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
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
This commit is contained in:
parent
ac068bd2b9
commit
d9a294ac9f
2 changed files with 5 additions and 0 deletions
|
@ -289,6 +289,8 @@ QtGLVideoItem::onSceneGraphInitialized ()
|
||||||
|
|
||||||
GST_DEBUG ("%p created wrapped GL context %" GST_PTR_FORMAT, this,
|
GST_DEBUG ("%p created wrapped GL context %" GST_PTR_FORMAT, this,
|
||||||
this->priv->other_context);
|
this->priv->other_context);
|
||||||
|
|
||||||
|
emit itemInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -77,6 +77,9 @@ public:
|
||||||
/* private for C interface ... */
|
/* private for C interface ... */
|
||||||
QtGLVideoItemPrivate *priv;
|
QtGLVideoItemPrivate *priv;
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void itemInitialized();
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void handleWindowChanged(QQuickWindow * win);
|
void handleWindowChanged(QQuickWindow * win);
|
||||||
void onSceneGraphInitialized();
|
void onSceneGraphInitialized();
|
||||||
|
|
Loading…
Reference in a new issue