QML MediaPlayer Performace
-
Hi comunity,
I am getting an unexpected high use of CPU rate when using MediaPlayer + VideoOutput QML components.
I say "unexpected" because I am playering the same video file with QtWidget (QMediaPlayer + QVideoWidget) and I am getting a not bad response.So, I would like to know if anyone knows about QML Media Player CPU performance or someone can give a tip in order to use properly these QML component or to reduce CPU rate, or let me know if that is a QML limitation.
Environment:
SO: Windows
QT: 5.4
Kit: Desktop Qt 5.4 MSVC2013 32bitQTWidget Code:
@ player = new QMediaPlayer;
player->setMedia(QUrl::fromLocalFile("file.mp4"));playerWidget = new QVideoWidget;
player->setVideoOutput(playerWidget);
playerWidget->show();player->play();@
QML Code:
@MediaPlayer {
id: playMusic
source: "file.mp4"} VideoOutput { anchors.fill: parent source: playMusic } Component.onCompleted: { playMusic.play() }@
Many thanks.
-
Hello,
I have the same problem like you. Did you resolve it?best regards