summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-08 03:00:24 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-08 03:00:24 +0200
commit1ca79e8645f9f3cf471c32cf9fd2894a4b41bcb1 (patch)
treeb35436ae81924383c43f03f0fc00e6a72ebe6cb3
parent871a097d0c6e8203f82b398e21dcfd8151bdae27 (diff)
parentc5400d31a40847e2905b11759090400653624a94 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12v5.12.0-alpha1
-rw-r--r--src/gsttools/qgstreamerplayercontrol.cpp7
-rw-r--r--src/gsttools/qgstreamerplayersession.cpp8
-rw-r--r--src/qtmultimediaquicktools/qsgvideonode_yuv.cpp47
-rw-r--r--src/qtmultimediaquicktools/qtmultimediaquicktools.qrc12
-rw-r--r--src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.frag16
-rw-r--r--src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.vert14
-rw-r--r--src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag16
-rw-r--r--src/qtmultimediaquicktools/shaders/monoplanarvideo_core.vert10
-rw-r--r--src/qtmultimediaquicktools/shaders/rgbvideo_core.frag10
-rw-r--r--src/qtmultimediaquicktools/shaders/rgbvideo_padded_core.vert11
-rw-r--r--src/qtmultimediaquicktools/shaders/rgbvideo_swizzle_core.frag12
-rw-r--r--src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.frag19
-rw-r--r--src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.vert17
-rw-r--r--src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag13
-rw-r--r--src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag13
-rw-r--r--tests/auto/integration/qmediaplayerbackend/BLACKLIST1
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp4
17 files changed, 216 insertions, 14 deletions
diff --git a/src/gsttools/qgstreamerplayercontrol.cpp b/src/gsttools/qgstreamerplayercontrol.cpp
index 91ba39ad9..053e5e408 100644
--- a/src/gsttools/qgstreamerplayercontrol.cpp
+++ b/src/gsttools/qgstreamerplayercontrol.cpp
@@ -308,7 +308,12 @@ void QGstreamerPlayerControl::stop()
if (m_currentState != QMediaPlayer::StoppedState) {
m_currentState = QMediaPlayer::StoppedState;
m_session->showPrerollFrames(false); // stop showing prerolled frames in stop state
- if (m_resources->isGranted())
+ // Since gst is not going to send GST_STATE_PAUSED
+ // when pipeline is already paused,
+ // needs to update media status directly.
+ if (m_session->state() == QMediaPlayer::PausedState)
+ updateMediaStatus();
+ else if (m_resources->isGranted())
m_session->pause();
if (m_mediaStatus != QMediaPlayer::EndOfMedia) {
diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp
index adf27e4a0..485556275 100644
--- a/src/gsttools/qgstreamerplayersession.cpp
+++ b/src/gsttools/qgstreamerplayersession.cpp
@@ -137,7 +137,7 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
m_videoAvailable(false),
m_seekable(false),
m_lastPosition(0),
- m_duration(-1),
+ m_duration(0),
m_durationQueries(0),
m_displayPrerolledFrame(true),
m_sourceType(UnknownSrc),
@@ -325,7 +325,7 @@ void QGstreamerPlayerSession::loadFromStream(const QNetworkRequest &request, QIO
qDebug() << Q_FUNC_INFO;
#endif
m_request = request;
- m_duration = -1;
+ m_duration = 0;
m_lastPosition = 0;
if (!m_appSrc)
@@ -354,7 +354,7 @@ void QGstreamerPlayerSession::loadFromUri(const QNetworkRequest &request)
qDebug() << Q_FUNC_INFO << request.url();
#endif
m_request = request;
- m_duration = -1;
+ m_duration = 0;
m_lastPosition = 0;
#if QT_CONFIG(gstreamer_app)
@@ -1500,7 +1500,7 @@ void QGstreamerPlayerSession::updateVideoResolutionTag()
void QGstreamerPlayerSession::updateDuration()
{
gint64 gstDuration = 0;
- int duration = -1;
+ int duration = 0;
if (m_pipeline && qt_gst_element_query_duration(m_pipeline, GST_FORMAT_TIME, &gstDuration))
duration = gstDuration / 1000000;
diff --git a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp
index 9eff9dbd6..43cd5a2b2 100644
--- a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp
+++ b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp
@@ -44,6 +44,28 @@
#include <QtGui/QOpenGLFunctions>
#include <QtGui/QOpenGLShaderProgram>
+#ifndef GL_RED
+#define GL_RED 0x1903
+#endif
+#ifndef GL_GREEN
+#define GL_GREEN 0x1904
+#endif
+#ifndef GL_RG
+#define GL_RG 0x8227
+#endif
+#ifndef GL_TEXTURE_SWIZZLE_R
+#define GL_TEXTURE_SWIZZLE_R 0x8E42
+#endif
+#ifndef GL_TEXTURE_SWIZZLE_G
+#define GL_TEXTURE_SWIZZLE_G 0x8E43
+#endif
+#ifndef GL_TEXTURE_SWIZZLE_B
+#define GL_TEXTURE_SWIZZLE_B 0x8E44
+#endif
+#ifndef GL_TEXTURE_SWIZZLE_A
+#define GL_TEXTURE_SWIZZLE_A 0x8E45
+#endif
+
QT_BEGIN_NAMESPACE
QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_YUV::supportedPixelFormats(
@@ -335,6 +357,8 @@ QSGVideoMaterial_YUV::~QSGVideoMaterial_YUV()
void QSGVideoMaterial_YUV::bind()
{
QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
+ QSurfaceFormat::OpenGLContextProfile profile = QOpenGLContext::currentContext()->format().profile();
+
QMutexLocker lock(&m_frameMutex);
if (m_frame.isValid()) {
if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
@@ -350,12 +374,16 @@ void QSGVideoMaterial_YUV::bind()
}
GLint previousAlignment;
+ const GLenum texFormat1 = (profile == QSurfaceFormat::CoreProfile) ? GL_RED : GL_LUMINANCE;
+ const GLenum texFormat2 = (profile == QSurfaceFormat::CoreProfile) ? GL_RG : GL_LUMINANCE_ALPHA;
+
functions->glGetIntegerv(GL_UNPACK_ALIGNMENT, &previousAlignment);
functions->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
if (m_format.pixelFormat() == QVideoFrame::Format_UYVY
|| m_format.pixelFormat() == QVideoFrame::Format_YUYV) {
int fw = m_frame.width();
+
m_planeWidth[0] = fw;
// In YUYV texture the UV plane appears with the 1/2 of image and Y width.
m_planeWidth[1] = fw / 2;
@@ -367,7 +395,7 @@ void QSGVideoMaterial_YUV::bind()
bindTexture(m_textureIds[1], m_planeWidth[1], m_frame.height(), m_frame.bits(), GL_RGBA);
functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
// Either red (YUYV) or alpha (UYVY) values are used as source of Y
- bindTexture(m_textureIds[0], m_planeWidth[0], m_frame.height(), m_frame.bits(), GL_LUMINANCE_ALPHA);
+ bindTexture(m_textureIds[0], m_planeWidth[0], m_frame.height(), m_frame.bits(), texFormat2);
} else if (m_format.pixelFormat() == QVideoFrame::Format_NV12
|| m_format.pixelFormat() == QVideoFrame::Format_NV21) {
const int y = 0;
@@ -376,9 +404,9 @@ void QSGVideoMaterial_YUV::bind()
m_planeWidth[0] = m_planeWidth[1] = qreal(fw) / m_frame.bytesPerLine(y);
functions->glActiveTexture(GL_TEXTURE1);
- bindTexture(m_textureIds[1], m_frame.bytesPerLine(uv) / 2, fh / 2, m_frame.bits(uv), GL_LUMINANCE_ALPHA);
+ bindTexture(m_textureIds[1], m_frame.bytesPerLine(uv) / 2, fh / 2, m_frame.bits(uv), texFormat2);
functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
- bindTexture(m_textureIds[0], m_frame.bytesPerLine(y), fh, m_frame.bits(y), GL_LUMINANCE);
+ bindTexture(m_textureIds[0], m_frame.bytesPerLine(y), fh, m_frame.bits(y), texFormat1);
} else { // YUV420P || YV12
const int y = 0;
@@ -389,11 +417,11 @@ void QSGVideoMaterial_YUV::bind()
m_planeWidth[1] = m_planeWidth[2] = qreal(fw) / (2 * m_frame.bytesPerLine(u));
functions->glActiveTexture(GL_TEXTURE1);
- bindTexture(m_textureIds[1], m_frame.bytesPerLine(u), fh / 2, m_frame.bits(u), GL_LUMINANCE);
+ bindTexture(m_textureIds[1], m_frame.bytesPerLine(u), fh / 2, m_frame.bits(u), texFormat1);
functions->glActiveTexture(GL_TEXTURE2);
- bindTexture(m_textureIds[2], m_frame.bytesPerLine(v), fh / 2, m_frame.bits(v), GL_LUMINANCE);
+ bindTexture(m_textureIds[2], m_frame.bytesPerLine(v), fh / 2, m_frame.bits(v), texFormat1);
functions->glActiveTexture(GL_TEXTURE0); // Finish with 0 as default texture unit
- bindTexture(m_textureIds[0], m_frame.bytesPerLine(y), fh, m_frame.bits(y), GL_LUMINANCE);
+ bindTexture(m_textureIds[0], m_frame.bytesPerLine(y), fh, m_frame.bits(y), texFormat1);
}
functions->glPixelStorei(GL_UNPACK_ALIGNMENT, previousAlignment);
@@ -415,6 +443,13 @@ void QSGVideoMaterial_YUV::bindTexture(int id, int w, int h, const uchar *bits,
QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
functions->glBindTexture(GL_TEXTURE_2D, id);
functions->glTexImage2D(GL_TEXTURE_2D, 0, format, w, h, 0, format, GL_UNSIGNED_BYTE, bits);
+ // replacement for GL_LUMINANCE_ALPHA in core profile
+ if (format == GL_RG) {
+ functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED);
+ functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, GL_RED);
+ functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED);
+ functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_GREEN);
+ }
functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
functions->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
diff --git a/src/qtmultimediaquicktools/qtmultimediaquicktools.qrc b/src/qtmultimediaquicktools/qtmultimediaquicktools.qrc
index d5efb1f3e..b8180e31f 100644
--- a/src/qtmultimediaquicktools/qtmultimediaquicktools.qrc
+++ b/src/qtmultimediaquicktools/qtmultimediaquicktools.qrc
@@ -11,5 +11,17 @@
<file>shaders/triplanaryuvvideo.vert</file>
<file>shaders/uyvyvideo.frag</file>
<file>shaders/yuyvvideo.frag</file>
+
+ <file>shaders/monoplanarvideo_core.vert</file>
+ <file>shaders/rgbvideo_core.frag</file>
+ <file>shaders/rgbvideo_swizzle_core.frag</file>
+ <file>shaders/rgbvideo_padded_core.vert</file>
+ <file>shaders/biplanaryuvvideo_core.frag</file>
+ <file>shaders/biplanaryuvvideo_core.vert</file>
+ <file>shaders/biplanaryuvvideo_swizzle_core.frag</file>
+ <file>shaders/triplanaryuvvideo_core.frag</file>
+ <file>shaders/triplanaryuvvideo_core.vert</file>
+ <file>shaders/uyvyvideo_core.frag</file>
+ <file>shaders/yuyvvideo_core.frag</file>
</qresource>
</RCC>
diff --git a/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.frag b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.frag
new file mode 100644
index 000000000..1261782f8
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.frag
@@ -0,0 +1,16 @@
+#version 150 core
+uniform sampler2D plane1Texture;
+uniform sampler2D plane2Texture;
+uniform mat4 colorMatrix;
+uniform float opacity;
+in vec2 plane1TexCoord;
+in vec2 plane2TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ float Y = texture(plane1Texture, plane1TexCoord).r;
+ vec2 UV = texture(plane2Texture, plane2TexCoord).ra;
+ vec4 color = vec4(Y, UV.x, UV.y, 1.);
+ fragColor = colorMatrix * color * opacity;
+}
diff --git a/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.vert b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.vert
new file mode 100644
index 000000000..1c162785e
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_core.vert
@@ -0,0 +1,14 @@
+#version 150 core
+uniform mat4 qt_Matrix;
+uniform float plane1Width;
+uniform float plane2Width;
+in vec4 qt_VertexPosition;
+in vec2 qt_VertexTexCoord;
+out vec2 plane1TexCoord;
+out vec2 plane2TexCoord;
+
+void main() {
+ plane1TexCoord = qt_VertexTexCoord * vec2(plane1Width, 1);
+ plane2TexCoord = qt_VertexTexCoord * vec2(plane2Width, 1);
+ gl_Position = qt_Matrix * qt_VertexPosition;
+}
diff --git a/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag
new file mode 100644
index 000000000..48ef3fa2c
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/biplanaryuvvideo_swizzle_core.frag
@@ -0,0 +1,16 @@
+#version 150 core
+uniform sampler2D plane1Texture;
+uniform sampler2D plane2Texture;
+uniform mat4 colorMatrix;
+uniform float opacity;
+in vec2 plane1TexCoord;
+in vec2 plane2TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ float Y = texture(plane1Texture, plane1TexCoord).r;
+ vec2 UV = texture(plane2Texture, plane2TexCoord).ar;
+ vec4 color = vec4(Y, UV.x, UV.y, 1.);
+ fragColor = colorMatrix * color * opacity;
+}
diff --git a/src/qtmultimediaquicktools/shaders/monoplanarvideo_core.vert b/src/qtmultimediaquicktools/shaders/monoplanarvideo_core.vert
new file mode 100644
index 000000000..23b9bfae2
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/monoplanarvideo_core.vert
@@ -0,0 +1,10 @@
+#version 150 core
+uniform mat4 qt_Matrix;
+in vec4 qt_VertexPosition;
+in vec2 qt_VertexTexCoord;
+out vec2 qt_TexCoord;
+
+void main() {
+ qt_TexCoord = qt_VertexTexCoord;
+ gl_Position = qt_Matrix * qt_VertexPosition;
+}
diff --git a/src/qtmultimediaquicktools/shaders/rgbvideo_core.frag b/src/qtmultimediaquicktools/shaders/rgbvideo_core.frag
new file mode 100644
index 000000000..ac41c108d
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/rgbvideo_core.frag
@@ -0,0 +1,10 @@
+#version 150 core
+uniform sampler2D rgbTexture;
+uniform float opacity;
+in vec2 qt_TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ fragColor = texture(rgbTexture, qt_TexCoord) * opacity;
+}
diff --git a/src/qtmultimediaquicktools/shaders/rgbvideo_padded_core.vert b/src/qtmultimediaquicktools/shaders/rgbvideo_padded_core.vert
new file mode 100644
index 000000000..d4fa8ad76
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/rgbvideo_padded_core.vert
@@ -0,0 +1,11 @@
+#version 150 core
+uniform mat4 qt_Matrix;
+uniform float width;
+in vec4 qt_VertexPosition;
+in vec2 qt_VertexTexCoord;
+out vec2 qt_TexCoord;
+
+void main() {
+ qt_TexCoord = qt_VertexTexCoord * vec2(width, 1);
+ gl_Position = qt_Matrix * qt_VertexPosition;
+}
diff --git a/src/qtmultimediaquicktools/shaders/rgbvideo_swizzle_core.frag b/src/qtmultimediaquicktools/shaders/rgbvideo_swizzle_core.frag
new file mode 100644
index 000000000..e952124d1
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/rgbvideo_swizzle_core.frag
@@ -0,0 +1,12 @@
+#version 150 core
+uniform sampler2D rgbTexture;
+uniform float opacity;
+uniform bool hasAlpha;
+in vec2 qt_TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ vec4 v = texture(rgbTexture, qt_TexCoord);
+ fragColor = vec4(v.bgr, hasAlpha ? v.a : 1.0) * opacity;
+}
diff --git a/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.frag b/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.frag
new file mode 100644
index 000000000..ad81083f5
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.frag
@@ -0,0 +1,19 @@
+#version 150 core
+uniform sampler2D plane1Texture;
+uniform sampler2D plane2Texture;
+uniform sampler2D plane3Texture;
+uniform mat4 colorMatrix;
+uniform float opacity;
+in vec2 plane1TexCoord;
+in vec2 plane2TexCoord;
+in vec2 plane3TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ float Y = texture(plane1Texture, plane1TexCoord).r;
+ float U = texture(plane2Texture, plane2TexCoord).r;
+ float V = texture(plane3Texture, plane3TexCoord).r;
+ vec4 color = vec4(Y, U, V, 1.);
+ fragColor = colorMatrix * color * opacity;
+}
diff --git a/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.vert b/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.vert
new file mode 100644
index 000000000..ebf3604e1
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/triplanaryuvvideo_core.vert
@@ -0,0 +1,17 @@
+#version 150 core
+uniform mat4 qt_Matrix;
+uniform float plane1Width;
+uniform float plane2Width;
+uniform float plane3Width;
+in vec4 qt_VertexPosition;
+in vec2 qt_VertexTexCoord;
+out vec2 plane1TexCoord;
+out vec2 plane2TexCoord;
+out vec2 plane3TexCoord;
+
+void main() {
+ plane1TexCoord = qt_VertexTexCoord * vec2(plane1Width, 1);
+ plane2TexCoord = qt_VertexTexCoord * vec2(plane2Width, 1);
+ plane3TexCoord = qt_VertexTexCoord * vec2(plane3Width, 1);
+ gl_Position = qt_Matrix * qt_VertexPosition;
+}
diff --git a/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag b/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag
new file mode 100644
index 000000000..75c7de5a6
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/uyvyvideo_core.frag
@@ -0,0 +1,13 @@
+#version 150 core
+uniform sampler2D yTexture; // Y component passed as GL_LUMINANCE_ALPHA, in uyvy Y = a
+uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in uyvy U = r, V = b
+uniform mat4 colorMatrix;
+uniform float opacity;
+in vec2 qt_TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ vec3 YUV = vec3(texture(yTexture, qt_TexCoord).a, texture2D(uvTexture, qt_TexCoord).rb);
+ fragColor = colorMatrix * vec4(YUV, 1.0) * opacity;
+}
diff --git a/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag b/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag
new file mode 100644
index 000000000..010c4a5f2
--- /dev/null
+++ b/src/qtmultimediaquicktools/shaders/yuyvvideo_core.frag
@@ -0,0 +1,13 @@
+#version 150 core
+uniform sampler2D yTexture; // Y component passed as GL_LUMINANCE_ALPHA, in yuyv Y = r
+uniform sampler2D uvTexture; // UV component passed as RGBA macropixel, in uyvy U = g, V = a
+uniform mat4 colorMatrix;
+uniform float opacity;
+in vec2 qt_TexCoord;
+out vec4 fragColor;
+
+void main()
+{
+ vec3 YUV = vec3(texture(yTexture, qt_TexCoord).r, texture2D(uvTexture, qt_TexCoord).ga);
+ fragColor = colorMatrix * vec4(YUV, 1.0) * opacity;
+}
diff --git a/tests/auto/integration/qmediaplayerbackend/BLACKLIST b/tests/auto/integration/qmediaplayerbackend/BLACKLIST
index 0a88eef9e..c81f6c24f 100644
--- a/tests/auto/integration/qmediaplayerbackend/BLACKLIST
+++ b/tests/auto/integration/qmediaplayerbackend/BLACKLIST
@@ -13,7 +13,6 @@ windows 64bit developer-build
windows 64bit developer-build
[playPauseStop]
-linux
windows 64bit developer-build
[processEOS]
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index b68bc030a..76b791e21 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -391,8 +391,8 @@ void tst_QMediaPlayerBackend::playPauseStop()
QTest::qWait(2000);
- QVERIFY(qAbs(player.position() - positionBeforePause) < 100);
- QCOMPARE(positionSpy.count(), 0);
+ QVERIFY(qAbs(player.position() - positionBeforePause) < 150);
+ QCOMPARE(positionSpy.count(), 1);
stateSpy.clear();
statusSpy.clear();