Commit f2b3363c authored by Frederik Gladhorn's avatar Frederik Gladhorn
Browse files

Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: Iec2c793710c95919975aa3c03144d915ca5fa84f
Showing with 23 additions and 10 deletions
......@@ -47,7 +47,7 @@
#include <QtGui/QOpenGLContext>
#if defined(Q_OS_WIN) && (defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC))
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && (defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC))
#include <EGL/egl.h>
#endif
......
......@@ -43,8 +43,6 @@
QT_BEGIN_NAMESPACE
const QLatin1String QSGVideoNodeFactoryPluginKey("sgvideonodes");
class Q_MULTIMEDIAQUICK_EXPORT QSGVideoNode : public QSGGeometryNode
{
public:
......
{
"Keys": ["sgvideonodes"]
"Keys": ["android"]
}
{
"Keys": ["sgvideonodes"]
"Keys": ["egl"]
}
{
"Keys": ["sgvideonodes"]
"Keys": ["imx6"]
}
......@@ -55,10 +55,21 @@ QDeclarativeVideoRendererBackend::QDeclarativeVideoRendererBackend(QDeclarativeV
QObject::connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
q, SLOT(_q_updateNativeSize()), Qt::QueuedConnection);
foreach (QObject *instance, videoNodeFactoryLoader()->instances(QSGVideoNodeFactoryPluginKey)) {
// Prioritize the plugin requested by the environment
QString requestedVideoNode = QString::fromLatin1(qgetenv("QT_VIDEONODE"));
foreach (const QString &key, videoNodeFactoryLoader()->keys()) {
QObject *instance = videoNodeFactoryLoader()->instance(key);
QSGVideoNodeFactoryInterface* plugin = qobject_cast<QSGVideoNodeFactoryInterface*>(instance);
if (plugin)
m_videoNodeFactories.append(plugin);
if (plugin) {
if (key == requestedVideoNode)
m_videoNodeFactories.prepend(plugin);
else
m_videoNodeFactories.append(plugin);
#ifdef DEBUG_VIDEOITEM
qDebug() << "found videonode plugin" << key << plugin;
#endif
}
}
// Append existing node factories as fallback if we have no plugins
......@@ -224,8 +235,12 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,
if (!videoNode) {
foreach (QSGVideoNodeFactoryInterface* factory, m_videoNodeFactories) {
videoNode = factory->createNode(m_surface->surfaceFormat());
if (videoNode)
if (videoNode) {
#ifdef DEBUG_VIDEOITEM
qDebug() << "using video node from factory" << factory;
#endif
break;
}
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment