diff options
author | Christian Strømme <christian.stromme@qt.io> | 2017-04-06 17:23:24 +0200 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2017-04-20 19:38:02 +0000 |
commit | b0de33e9fe93f9ee934d0a163f9601e5f37102fb (patch) | |
tree | d05feb9e296b8815e14dc39c1fd76ae1e7e2ae29 /tests | |
parent | e3b7957d6552e88aa23bd0ecc474db5f14981707 (diff) | |
download | qtmultimedia-b0de33e9fe93f9ee934d0a163f9601e5f37102fb.tar.gz |
Fix the testsurface in tst_qmediaplayerbackend
Skip tests were the test-surface is incompatible with the backend.
Task-number: QTBUG-46368
Change-Id: Ica2c01573b15cbf6a93080bb05e932202938629f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp index 7366ea200..d30c54b3d 100644 --- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp +++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp @@ -1332,7 +1332,9 @@ void tst_QMediaPlayerBackend::surfaceTest() player.setMedia(localVideoFile); player.play(); QTRY_VERIFY(player.position() >= 1000); - QVERIFY(surface.m_totalFrames >= 25); + if (surface.error() == QAbstractVideoSurface::UnsupportedFormatError) + QSKIP("None of the pixel formats is supported by the backend"); + QVERIFY2(surface.m_totalFrames >= 25, qPrintable(QString("Expected >= 25, got %1").arg(surface.m_totalFrames))); } void tst_QMediaPlayerBackend::metadata() @@ -1392,7 +1394,10 @@ QList<QVideoFrame::PixelFormat> TestVideoSurface::supportedPixelFormats( bool TestVideoSurface::start(const QVideoSurfaceFormat &format) { - if (!isFormatSupported(format)) return false; + if (!isFormatSupported(format)) { + setError(UnsupportedFormatError); + return false; + } return QAbstractVideoSurface::start(format); } |