Video in QMediaPlayer - "Media session serious error"
I'm still struggling to get video to play properly in my QWidget-based window, which is then embedded into a QDeclarativeView. When I write a basic program which doesn't use QDeclarativeView, i.e. where the mainWindow is simply a QWidget-based window, everything works as expected, and the video plays correctly. However, in my QDeclarativeView-based code, when I've loaded the video into the QMediaPlayer, I get both "LoadedMedia" and "BufferedMedia" state changes through the mediaStateChanged signal, but then the state changes to "UnknownMediaStatus".
Then, I get printed to the console: "handleSessionEvent: serious error = -1072875802" (I don't know who or what prints this). Finally, through the error() signal, I get the "Media session serious error." message. QMediaPlayer::error() returns QMediaPlayer::ResourceError at that point.
Any idea what could be the problem here? My first guess is that I have to rewrite my application such that the player is no longer embedded into a QDeclarativeView, although I would like to avoid that if possible.
Which version of Qt on which platform are you using? I'm just seeing those messages after switching from Qt 5.0.1 to (self compiled) Qt 5.0.2. Before that I had no issues. Platform is Windows 8 here.
I'm using 5.0.1 on a Windows 7 machine.
I rewrote my code such that the QMediaPlayer is no longer embedded in a QML view, this window and its parents are strictly QWidget-based (there are other siblings which use QML, but that seems to be entirely isolated). This seems to eliminate the problem.
i got that error too,
my qt creator version is 5.1.1
But I soved that problem when i cut one line
The line is below
in the videoplayer.cpp,
connect(&mediaplayer, signal(error(QMediaPlayer::Error)), this, SLOT(handleError()));
i got that error again
really don't know how to solve it
when i build just example code it was fully working
but it wasn't working when i copy to another project .
i really do my best to solve the problem
anybody got the answer for this error
I am getting the same error with
Qt 5.4.1 MSVC2013_64bit
Qt 5.4.1 MSVC2013_64bit OpenGL
I can't even play a simple avi like the one that comes with 64-bit Windows 7:
playlist->addMedia(QUrl::fromLocalFile( "C:\\Program Files\\Common Files\\Microsoft Shared\\ink\\en-US\\delete.avi"));
Has anyone solved this problem yet? Looks like it's been two years since the first occurrence.
Looks like there is a bug about this but it doesn't like anyone is able to fix it.
The bug was filed for Qt 5.0.2, 5.1.0 , 5.2.0, 5.3.2, 5.4.0.
They should add 5.4.1 to the list too.