summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-12 03:03:46 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-11-12 08:27:43 +0000
commitd64287dc19f621f0041e115fa28182339f286216 (patch)
treeb6d0b6304adce00a7d7dd35c8912571a4153f760 /tests
parent838eb6b8b42acc9e418c7f1fd2b105ce37ebf49b (diff)
parentcb8f5067a2fdf73f4f5b71ab3c7bcc65dc13c387 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/multimedia/video/qvideosurfaces_p.h src/multimedia/video/video.pri tests/auto/unit/qvideoframe/tst_qvideoframe.cpp Change-Id: I74fe2dbdf4c3e7db78a2d9b43411266bb6b97819
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp28
-rw-r--r--tests/auto/unit/qvideoframe/BLACKLIST2
-rw-r--r--tests/auto/unit/qvideoframe/tst_qvideoframe.cpp3
3 files changed, 31 insertions, 2 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 9cd3b7fa9..f1be070e8 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -78,6 +78,7 @@ private slots:
void playlistObject();
void surfaceTest_data();
void surfaceTest();
+ void multipleSurfaces();
void metadata();
void playerStateAtEOS();
@@ -1393,6 +1394,33 @@ void tst_QMediaPlayerBackend::surfaceTest()
QVERIFY2(surface.m_totalFrames >= 25, qPrintable(QString("Expected >= 25, got %1").arg(surface.m_totalFrames)));
}
+void tst_QMediaPlayerBackend::multipleSurfaces()
+{
+ if (localVideoFile.isNull())
+ QSKIP("No supported video file");
+
+ QList<QVideoFrame::PixelFormat> formats1;
+ formats1 << QVideoFrame::Format_RGB32
+ << QVideoFrame::Format_ARGB32;
+ QList<QVideoFrame::PixelFormat> formats2;
+ formats2 << QVideoFrame::Format_YUV420P
+ << QVideoFrame::Format_RGB32;
+
+ TestVideoSurface surface1(false);
+ surface1.setSupportedFormats(formats1);
+ TestVideoSurface surface2(false);
+ surface2.setSupportedFormats(formats2);
+
+ QMediaPlayer player;
+ player.setVideoOutput(QVector<QAbstractVideoSurface *>() << &surface1 << &surface2);
+ player.setMedia(localVideoFile);
+ player.play();
+ QTRY_VERIFY(player.position() >= 1000);
+ QVERIFY2(surface1.m_totalFrames >= 25, qPrintable(QString("Expected >= 25, got %1").arg(surface1.m_totalFrames)));
+ QVERIFY2(surface2.m_totalFrames >= 25, qPrintable(QString("Expected >= 25, got %1").arg(surface2.m_totalFrames)));
+ QCOMPARE(surface1.m_totalFrames, surface2.m_totalFrames);
+}
+
void tst_QMediaPlayerBackend::metadata()
{
if (localFileWithMetadata.isNull())
diff --git a/tests/auto/unit/qvideoframe/BLACKLIST b/tests/auto/unit/qvideoframe/BLACKLIST
new file mode 100644
index 000000000..1fa752da5
--- /dev/null
+++ b/tests/auto/unit/qvideoframe/BLACKLIST
@@ -0,0 +1,2 @@
+[image:64x64 AYUV444,64x64 YUV444,64x64 YUV420P,64x64 YV12,64x64 UYVY,64x64 YUYV,64x64 NV12,64x64 NV21]
+windows-10 ci
diff --git a/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp b/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
index 943051435..a64fb1220 100644
--- a/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
+++ b/tests/auto/unit/qvideoframe/tst_qvideoframe.cpp
@@ -1223,7 +1223,7 @@ void tst_QVideoFrame::image_data()
<< 16384
<< 256
<< QImage::Format_ARGB32;
-#if !QT_CONFIG(directshow)
+
QTest::newRow("64x64 AYUV444")
<< QSize(64, 64)
<< QVideoFrame::Format_AYUV444
@@ -1279,7 +1279,6 @@ void tst_QVideoFrame::image_data()
<< 16384
<< 256
<< QImage::Format_ARGB32;
-#endif
}
void tst_QVideoFrame::image()