summaryrefslogtreecommitdiffstats
path: root/tests/auto/integration/qquickvideooutput
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/integration/qquickvideooutput')
-rw-r--r--tests/auto/integration/qquickvideooutput/CMakeLists.txt5
-rw-r--r--tests/auto/integration/qquickvideooutput/tst_qquickvideooutput.cpp61
2 files changed, 22 insertions, 44 deletions
diff --git a/tests/auto/integration/qquickvideooutput/CMakeLists.txt b/tests/auto/integration/qquickvideooutput/CMakeLists.txt
index 145dd8875..909416140 100644
--- a/tests/auto/integration/qquickvideooutput/CMakeLists.txt
+++ b/tests/auto/integration/qquickvideooutput/CMakeLists.txt
@@ -1,3 +1,6 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
# Generated from qdeclarativevideooutput.pro.
#####################################################################
@@ -9,7 +12,7 @@ qt_internal_add_test(tst_qquickvideooutput
tst_qquickvideooutput.cpp
INCLUDE_DIRECTORIES
../../../../src/imports/multimedia
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Gui
Qt::MultimediaPrivate
Qt::MultimediaQuickPrivate
diff --git a/tests/auto/integration/qquickvideooutput/tst_qquickvideooutput.cpp b/tests/auto/integration/qquickvideooutput/tst_qquickvideooutput.cpp
index 519fc6944..85a30bbb7 100644
--- a/tests/auto/integration/qquickvideooutput/tst_qquickvideooutput.cpp
+++ b/tests/auto/integration/qquickvideooutput/tst_qquickvideooutput.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
//TESTED_COMPONENT=plugins/declarative/multimedia
@@ -124,19 +99,19 @@ void tst_QQuickVideoOutput::fillMode()
// Default is preserveaspectfit
QCOMPARE(videoOutput->property("fillMode").value<QQuickVideoOutput::FillMode>(), QQuickVideoOutput::PreserveAspectFit);
- QCOMPARE(propSpy.count(), 0);
+ QCOMPARE(propSpy.size(), 0);
videoOutput->setProperty("fillMode", QVariant(int(QQuickVideoOutput::PreserveAspectCrop)));
QCOMPARE(videoOutput->property("fillMode").value<QQuickVideoOutput::FillMode>(), QQuickVideoOutput::PreserveAspectCrop);
- QCOMPARE(propSpy.count(), 1);
+ QCOMPARE(propSpy.size(), 1);
videoOutput->setProperty("fillMode", QVariant(int(QQuickVideoOutput::Stretch)));
QCOMPARE(videoOutput->property("fillMode").value<QQuickVideoOutput::FillMode>(), QQuickVideoOutput::Stretch);
- QCOMPARE(propSpy.count(), 2);
+ QCOMPARE(propSpy.size(), 2);
videoOutput->setProperty("fillMode", QVariant(int(QQuickVideoOutput::Stretch)));
QCOMPARE(videoOutput->property("fillMode").value<QQuickVideoOutput::FillMode>(), QQuickVideoOutput::Stretch);
- QCOMPARE(propSpy.count(), 2);
+ QCOMPARE(propSpy.size(), 2);
delete videoOutput;
}
@@ -153,43 +128,43 @@ void tst_QQuickVideoOutput::orientation()
// Default orientation is 0
QCOMPARE(videoOutput->property("orientation").toInt(), 0);
- QCOMPARE(propSpy.count(), 0);
+ QCOMPARE(propSpy.size(), 0);
videoOutput->setProperty("orientation", QVariant(90));
QCOMPARE(videoOutput->property("orientation").toInt(), 90);
- QCOMPARE(propSpy.count(), 1);
+ QCOMPARE(propSpy.size(), 1);
videoOutput->setProperty("orientation", QVariant(180));
QCOMPARE(videoOutput->property("orientation").toInt(), 180);
- QCOMPARE(propSpy.count(), 2);
+ QCOMPARE(propSpy.size(), 2);
videoOutput->setProperty("orientation", QVariant(270));
QCOMPARE(videoOutput->property("orientation").toInt(), 270);
- QCOMPARE(propSpy.count(), 3);
+ QCOMPARE(propSpy.size(), 3);
videoOutput->setProperty("orientation", QVariant(360));
QCOMPARE(videoOutput->property("orientation").toInt(), 360);
- QCOMPARE(propSpy.count(), 4);
+ QCOMPARE(propSpy.size(), 4);
// More than 360 should be fine
videoOutput->setProperty("orientation", QVariant(540));
QCOMPARE(videoOutput->property("orientation").toInt(), 540);
- QCOMPARE(propSpy.count(), 5);
+ QCOMPARE(propSpy.size(), 5);
// Negative should be fine
videoOutput->setProperty("orientation", QVariant(-180));
QCOMPARE(videoOutput->property("orientation").toInt(), -180);
- QCOMPARE(propSpy.count(), 6);
+ QCOMPARE(propSpy.size(), 6);
// Same value should not reemit
videoOutput->setProperty("orientation", QVariant(-180));
QCOMPARE(videoOutput->property("orientation").toInt(), -180);
- QCOMPARE(propSpy.count(), 6);
+ QCOMPARE(propSpy.size(), 6);
// Non multiples of 90 should not work
videoOutput->setProperty("orientation", QVariant(-1));
QCOMPARE(videoOutput->property("orientation").toInt(), -180);
- QCOMPARE(propSpy.count(), 6);
+ QCOMPARE(propSpy.size(), 6);
delete videoOutput;
}
@@ -291,7 +266,7 @@ void tst_QQuickVideoOutput::paintSurface()
videoOutput->setSize(QSize(2, 2));
QVideoFrame frame(QVideoFrameFormat(QSize(4, 4), QVideoFrameFormat::Format_ARGB8888));
- frame.map(QVideoFrame::ReadWrite);
+ frame.map(QtVideo::MapMode::ReadWrite);
QCOMPARE(frame.mappedBytes(0), 64);
memcpy(frame.bits(0), rgb32ImageData, 64);
frame.unmap();
@@ -317,11 +292,11 @@ void tst_QQuickVideoOutput::sourceRect()
presentDummyFrame(holder.videoSink(), QSize(200,100));
QCOMPARE(videoOutput->property("sourceRect").toRectF(), QRectF(0, 0, 200, 100));
- QCOMPARE(propSpy.count(), 1);
+ QCOMPARE(propSpy.size(), 1);
// Another frame shouldn't cause a source rect change
presentDummyFrame(holder.videoSink(), QSize(200,100));
- QCOMPARE(propSpy.count(), 1);
+ QCOMPARE(propSpy.size(), 1);
QCOMPARE(videoOutput->property("sourceRect").toRectF(), QRectF(0, 0, 200, 100));
// Changing orientation and stretch modes should not affect this