#include <QtCore/QRunnable>
#include <QtCore/QMutexLocker>
+#include <QtCore/QPointer>
#include <QtGui/QGuiApplication>
#include <QtQuick/QQuickWindow>
#include <QtQuick/QSGSimpleTextureNode>
void run();
private:
- QtGLVideoItem *item_;
+ QPointer<QtGLVideoItem> item_;
};
InitializeSceneGraph::InitializeSceneGraph(QtGLVideoItem *item) :
void InitializeSceneGraph::run()
{
- item_->onSceneGraphInitialized();
+ if(item_)
+ item_->onSceneGraphInitialized();
}
QtGLVideoItem::QtGLVideoItem()
void
QtGLVideoItem::onSceneGraphInitialized ()
{
+ if (this->window() == NULL)
+ return;
+
GST_DEBUG ("%p scene graph initialization with Qt GL context %p", this,
this->window()->openglContext ());