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

Change-Id: Iaa608643f6626ed074a9fd374555cc5bc84659d5
This commit is contained in:
Yoann Lopes
2014-11-27 14:44:33 +01:00
12 changed files with 24 additions and 22 deletions

View File

@@ -141,7 +141,7 @@ void QGstAppSrc::pushDataToAppSrc()
if (m_dataRequested && !m_enoughData) { if (m_dataRequested && !m_enoughData) {
qint64 size; qint64 size;
if (m_dataRequestSize == ~0) if (m_dataRequestSize == ~0u)
size = qMin(m_stream->bytesAvailable(), queueSize()); size = qMin(m_stream->bytesAvailable(), queueSize());
else else
size = qMin(m_stream->bytesAvailable(), (qint64)m_dataRequestSize); size = qMin(m_stream->bytesAvailable(), (qint64)m_dataRequestSize);

View File

@@ -163,13 +163,6 @@ private:
int m_position; int m_position;
QSoundEffectRef *m_ref; QSoundEffectRef *m_ref;
enum ResourceStatus {
NoResources,
WaitingResources,
GrantedResources,
DeniedResources
};
ResourceStatus m_resourceStatus;
bool m_resourcesAvailable; bool m_resourcesAvailable;
QMediaPlayerResourceSetInterface *m_resources; QMediaPlayerResourceSetInterface *m_resources;

View File

@@ -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

View File

@@ -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:

View File

@@ -306,7 +306,6 @@ QWindowVideoWidgetBackend::QWindowVideoWidgetBackend(
: m_service(service) : m_service(service)
, m_windowControl(control) , m_windowControl(control)
, m_widget(widget) , m_widget(widget)
, m_aspectRatioMode(Qt::KeepAspectRatio)
{ {
connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int))); connect(control, SIGNAL(brightnessChanged(int)), m_widget, SLOT(_q_brightnessChanged(int)));
connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int))); connect(control, SIGNAL(contrastChanged(int)), m_widget, SLOT(_q_contrastChanged(int)));

View File

@@ -208,7 +208,6 @@ private:
QMediaService *m_service; QMediaService *m_service;
QVideoWindowControl *m_windowControl; QVideoWindowControl *m_windowControl;
QWidget *m_widget; QWidget *m_widget;
Qt::AspectRatioMode m_aspectRatioMode;
QSize m_pixelAspectRatio; QSize m_pixelAspectRatio;
}; };

View File

@@ -153,7 +153,6 @@ private:
snd_pcm_uframes_t period_frames; snd_pcm_uframes_t period_frames;
snd_pcm_access_t access; snd_pcm_access_t access;
snd_pcm_format_t pcmformat; snd_pcm_format_t pcmformat;
snd_timestamp_t* timestamp;
snd_pcm_hw_params_t *hwparams; snd_pcm_hw_params_t *hwparams;
qreal m_volume; qreal m_volume;
}; };

View File

@@ -132,7 +132,6 @@ private:
snd_pcm_t* handle; snd_pcm_t* handle;
snd_pcm_access_t access; snd_pcm_access_t access;
snd_pcm_format_t pcmformat; snd_pcm_format_t pcmformat;
snd_timestamp_t* timestamp;
snd_pcm_hw_params_t *hwparams; snd_pcm_hw_params_t *hwparams;
qreal m_volume; qreal m_volume;
}; };

View File

@@ -1,3 +1,3 @@
{ {
"Keys": ["sgvideonodes"] "Keys": ["android"]
} }

View File

@@ -1,3 +1,3 @@
{ {
"Keys": ["sgvideonodes"] "Keys": ["egl"]
} }

View File

@@ -1,3 +1,3 @@
{ {
"Keys": ["sgvideonodes"] "Keys": ["imx6"]
} }

View File

@@ -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;
}
} }
} }
} }