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 /src/multimedia/platform/qplatformaudiooutput_p.h | |
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 'src/multimedia/platform/qplatformaudiooutput_p.h')
-rw-r--r-- | src/multimedia/platform/qplatformaudiooutput_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/multimedia/platform/qplatformaudiooutput_p.h b/src/multimedia/platform/qplatformaudiooutput_p.h index 594d59ed0..9979a6d5e 100644 --- a/src/multimedia/platform/qplatformaudiooutput_p.h +++ b/src/multimedia/platform/qplatformaudiooutput_p.h @@ -66,11 +66,14 @@ public: virtual void setAudioDevice(const QAudioDevice &/*device*/) {} virtual void setMuted(bool /*muted*/) {} virtual void setVolume(float /*volume*/) {} + virtual void setAudioRole(QAudio::Role /*role*/) {} + virtual QList<QAudio::Role> supportedAudioRoles() const { return {}; } QAudioOutput *q = nullptr; QAudioDevice device; float volume = 1.; bool muted = false; + QAudio::Role role = QAudio::UnknownRole; }; QT_END_NAMESPACE |