diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-03-18 14:42:35 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-06 08:08:40 +0000 |
commit | f67cea4dd9c2ba44c85267962655235c6143a966 (patch) | |
tree | 4590d90f6f37e21a37cdd05c8e5d55193365b67e /examples | |
parent | 782711418999c8e1f5914e805124ba7014687f93 (diff) |
Fix QML video rendering
Use the new QVideoSink class to get the video frames.
Fix some APIs, so that we correctly connect VideoOutput and
MediaPlayer.
Change-Id: I65a0d045988c46a917f70dfb922c1bbdb32f6511
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml index 8372acb7e..a98ee2b30 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml @@ -49,12 +49,11 @@ ****************************************************************************/ import QtQuick 2.0 -import QtMultimedia 5.0 +import QtMultimedia VideoOutput { id: root height: width - source: mediaPlayer property alias duration: mediaPlayer.duration property alias mediaSource: mediaPlayer.source @@ -72,6 +71,7 @@ VideoOutput { id: mediaPlayer autoLoad: false loops: Audio.Infinite + videoOutput: root; onError: { if (MediaPlayer.NoError != error) { |