Video in QMediaPlayer - "Media session serious error"
-
Hi all,
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.
Regards,
Daniel -
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 am getting the same error with
Qt 5.4.1 MSVC2013_64bit
and
Qt 5.4.1 MSVC2013_64bit OpenGLI 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.
[QTBUG-30435]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.