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/gstreamer/common/qgstreamermediaplayer_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/gstreamer/common/qgstreamermediaplayer_p.h')
-rw-r--r-- | src/multimedia/platform/gstreamer/common/qgstreamermediaplayer_p.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer_p.h b/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer_p.h index 23062e4d0..2d939a0f8 100644 --- a/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer_p.h +++ b/src/multimedia/platform/gstreamer/common/qgstreamermediaplayer_p.h @@ -84,9 +84,6 @@ public: float bufferProgress() const override; - int volume() const override; - bool isMuted() const override; - bool isAudioAvailable() const override; bool isVideoAvailable() const override; @@ -102,8 +99,7 @@ public: bool streamPlaybackSupported() const override { return true; } - bool setAudioOutput(const QAudioDevice &) override; - QAudioDevice audioOutput() const override; + void setAudioOutput(QPlatformAudioOutput *output) override; QMediaMetaData metaData() const override; @@ -120,13 +116,8 @@ public: void pause() override; void stop() override; - void setVolume(int volume) override; - void setMuted(bool muted) override; - bool processBusMessage(const QGstreamerMessage& message) override; public Q_SLOTS: - void volumeChangedHandler(int volume) { volumeChanged(volume); } - void mutedChangedHandler(bool mute) { mutedChanged(mute); } void updatePosition() { positionChanged(position()); } private: |