diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-06-07 12:21:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-06-11 15:12:36 +0200 |
commit | fc9cc90818a56b919ea1e50838bd13376b268bfe (patch) | |
tree | a18fb6dddd5e873d1e9fdf2bb944132070833a42 /tests/auto/unit/mockbackend/qmockintegration.cpp | |
parent | 923a000261717ba6c898205bc4a5973b34bed2c5 (diff) |
Use QAudioOutput in QMediaPlayer
Adjust QMediaPlayer to the new audio output architecture.
One now needs to explicitly add a QAudioOutput to the
media player to get audio playback. While this requires
two more lines of code to set up the media player, it does
make the API consistent between audio and video and also
consistent with what we have in QMediaCaptureSession.
Adjusted auto tests where required and ported all platforms.
Change-Id: I247e915e4862dee6d6bce367b83664b1d1d69726
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/unit/mockbackend/qmockintegration.cpp')
-rw-r--r-- | tests/auto/unit/mockbackend/qmockintegration.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/unit/mockbackend/qmockintegration.cpp b/tests/auto/unit/mockbackend/qmockintegration.cpp index 55a92c3c7..69e5c8e05 100644 --- a/tests/auto/unit/mockbackend/qmockintegration.cpp +++ b/tests/auto/unit/mockbackend/qmockintegration.cpp @@ -45,6 +45,7 @@ #include "qmockmediacapturesession.h" #include "qmockvideosink.h" #include "qmockimagecapture.h" +#include "qmockaudiooutput.h" QT_BEGIN_NAMESPACE @@ -118,6 +119,11 @@ QPlatformVideoSink *QMockIntegration::createVideoSink(QVideoSink *sink) return m_lastVideoSink; } +QPlatformAudioOutput *QMockIntegration::createAudioOutput(QAudioOutput *q) +{ + return new QMockAudioOutput(q); +} + bool QMockCamera::simpleCamera = false; QT_END_NAMESPACE |