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 /examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml | |
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 'examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml')
-rw-r--r-- | examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml index a7d4ef2f4..c6159a9af 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml @@ -70,6 +70,9 @@ VideoOutput { MediaPlayer { id: mediaPlayer videoOutput: root; + audioOutput: AudioOutput { + + } onErrorOccurred: function(error, errorString) { if (MediaPlayer.NoError !== error) { |