summaryrefslogtreecommitdiffstats
diff options
authorJøger Hansegård <joger.hansegard@qt.io>2025-03-14 11:13:57 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-04-21 17:05:45 +0000
commitaee76b5c898c1baaef8d6583789ae5bcad6ec3f0 (patch)
tree034c45540a328371de3c2462d8c1af62e24424f5
parentb80f3ca319ca3b8725c2d9bfc38d0cebf71e5f3e (diff)
Extend tst_qvideoframe coverage on Android6.8
This patch re-enables tests for previously unsupported pixel formats on Android. Task-number: QTBUG-125238 Change-Id: I57187b270f81c9ddc8a7394c0c9f20ffba850299 Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> (cherry picked from commit 001f03bda71c5080fe599842a81939d938a7c306) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9e302d9eb30ba2d9f620a1f7284aefae1e2c9b8e)
-rw-r--r--tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp b/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
index 7036174e3..d3737f02e 100644
--- a/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
+++ b/tests/auto/unit/multimedia/qvideoframe/tst_qvideoframe.cpp
@@ -158,23 +158,6 @@ QSet s_pixelFormats{ QVideoFrameFormat::Format_ARGB8888,
QVideoFrameFormat::Format_P016,
QVideoFrameFormat::Format_YUV420P10 };
-bool isSupportedPixelFormat(QVideoFrameFormat::PixelFormat pixelFormat)
-{
- switch (pixelFormat) {
-#ifdef Q_OS_ANDROID
- // TODO: QTBUG-125238
- case QVideoFrameFormat::Format_Y16:
- case QVideoFrameFormat::Format_P010:
- case QVideoFrameFormat::Format_P016:
- case QVideoFrameFormat::Format_YUV420P10:
- return false;
-#endif
- default:
- break;
- }
- return true;
-}
-
class tst_QVideoFrame : public QObject
{
Q_OBJECT
@@ -1063,7 +1046,7 @@ void tst_QVideoFrame::qImageFromVideoFrame_doesNotCrash_whenCalledWithEvenAndOdd
.arg(forceCpu ? "_cpu" : "");
QTest::addRow("%s", name.toLatin1().data())
- << size << pixelFormat << forceCpu << isSupportedPixelFormat(pixelFormat);
+ << size << pixelFormat << forceCpu;
}
}
}
@@ -1073,16 +1056,12 @@ void tst_QVideoFrame::qImageFromVideoFrame_doesNotCrash_whenCalledWithEvenAndOdd
QFETCH(const QSize, size);
QFETCH(const QVideoFrameFormat::PixelFormat, pixelFormat);
QFETCH(const bool, forceCpuConversion);
- QFETCH(const bool, supportedOnPlatform);
const QVideoFrameFormat format{ size, pixelFormat };
const QVideoFrame frame{ format };
const QImage actual = qImageFromVideoFrame(frame, forceCpuConversion);
- if (supportedOnPlatform)
- QCOMPARE_EQ(actual.isNull(), size.isEmpty());
- // Otherwise, we don't expect an image being produced, although it might.
- // TODO: Investigate why 16 bit formats fail on some Android flavors.
+ QCOMPARE_EQ(actual.isNull(), size.isEmpty());
}
#define TEST_MAPPED(frame, mode) \