Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: Iec2c793710c95919975aa3c03144d915ca5fa84f
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#include <QtGui/QOpenGLContext>
|
#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>
|
#include <EGL/egl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,6 @@
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
const QLatin1String QSGVideoNodeFactoryPluginKey("sgvideonodes");
|
|
||||||
|
|
||||||
class Q_MULTIMEDIAQUICK_EXPORT QSGVideoNode : public QSGGeometryNode
|
class Q_MULTIMEDIAQUICK_EXPORT QSGVideoNode : public QSGGeometryNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"Keys": ["sgvideonodes"]
|
"Keys": ["android"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"Keys": ["sgvideonodes"]
|
"Keys": ["egl"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"Keys": ["sgvideonodes"]
|
"Keys": ["imx6"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,10 +55,21 @@ QDeclarativeVideoRendererBackend::QDeclarativeVideoRendererBackend(QDeclarativeV
|
|||||||
QObject::connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
|
QObject::connect(m_surface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)),
|
||||||
q, SLOT(_q_updateNativeSize()), Qt::QueuedConnection);
|
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);
|
QSGVideoNodeFactoryInterface* plugin = qobject_cast<QSGVideoNodeFactoryInterface*>(instance);
|
||||||
if (plugin)
|
if (plugin) {
|
||||||
m_videoNodeFactories.append(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
|
// Append existing node factories as fallback if we have no plugins
|
||||||
@@ -224,8 +235,12 @@ QSGNode *QDeclarativeVideoRendererBackend::updatePaintNode(QSGNode *oldNode,
|
|||||||
if (!videoNode) {
|
if (!videoNode) {
|
||||||
foreach (QSGVideoNodeFactoryInterface* factory, m_videoNodeFactories) {
|
foreach (QSGVideoNodeFactoryInterface* factory, m_videoNodeFactories) {
|
||||||
videoNode = factory->createNode(m_surface->surfaceFormat());
|
videoNode = factory->createNode(m_surface->surfaceFormat());
|
||||||
if (videoNode)
|
if (videoNode) {
|
||||||
|
#ifdef DEBUG_VIDEOITEM
|
||||||
|
qDebug() << "using video node from factory" << factory;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user