summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-11-17 10:09:39 +0100
committerLars Knoll <lars.knoll@qt.io>2022-01-18 14:33:47 +0100
commit54bf1efe5cd54068cefaf4debe1908f6397b5b15 (patch)
tree65f17b6b8bff72f86482652c3a2254814c6f3378 /tests
parentaf70e045aa050ff52cdedf16974e343e6d3e5e32 (diff)
Move the list of QMediaDevices to QPlatformMediaIntegration
This makes it possible to split up the backend interfaces for audio and camera devices handling and simplifies combining ffmpeg with a platform specific backend for audio. Pick-to: 6.2 Change-Id: I01992bfbeac79ba2d413a4b918f9f304cf33f35b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/unit/mockbackend/qmockintegration.cpp2
-rw-r--r--tests/auto/unit/mockbackend/qmockmediadevices.cpp4
-rw-r--r--tests/auto/unit/mockbackend/qmockmediadevices_p.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/unit/mockbackend/qmockintegration.cpp b/tests/auto/unit/mockbackend/qmockintegration.cpp
index 936ffed62..5acd662a9 100644
--- a/tests/auto/unit/mockbackend/qmockintegration.cpp
+++ b/tests/auto/unit/mockbackend/qmockintegration.cpp
@@ -63,7 +63,7 @@ QMockIntegration::~QMockIntegration()
QPlatformMediaDevices *QMockIntegration::devices()
{
if (!m_devices)
- m_devices = new QMockMediaDevices();
+ m_devices = new QMockMediaDevices(this);
return m_devices;
}
diff --git a/tests/auto/unit/mockbackend/qmockmediadevices.cpp b/tests/auto/unit/mockbackend/qmockmediadevices.cpp
index 287cd1e73..0114c1aca 100644
--- a/tests/auto/unit/mockbackend/qmockmediadevices.cpp
+++ b/tests/auto/unit/mockbackend/qmockmediadevices.cpp
@@ -42,8 +42,8 @@
QT_BEGIN_NAMESPACE
-QMockMediaDevices::QMockMediaDevices()
- : QPlatformMediaDevices()
+QMockMediaDevices::QMockMediaDevices(QPlatformMediaIntegration *integration)
+ : QPlatformMediaDevices(integration)
{
QCameraDevicePrivate *info = new QCameraDevicePrivate;
info->description = QString::fromUtf8("defaultCamera");
diff --git a/tests/auto/unit/mockbackend/qmockmediadevices_p.h b/tests/auto/unit/mockbackend/qmockmediadevices_p.h
index cfa0398f3..8dac25bf3 100644
--- a/tests/auto/unit/mockbackend/qmockmediadevices_p.h
+++ b/tests/auto/unit/mockbackend/qmockmediadevices_p.h
@@ -63,7 +63,7 @@ class QCameraDevice;
class QMockMediaDevices : public QPlatformMediaDevices
{
public:
- QMockMediaDevices();
+ QMockMediaDevices(QPlatformMediaIntegration *integration);
~QMockMediaDevices();
QList<QAudioDevice> audioInputs() const override;