Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.1
-
None
-
Mac OS X 10.7.5
Qt: git://gitorious.org/qt/qt5.git (stable branch) d3d46ac7b315145cfce399450e5f99a2c16dd41b
-
-
e728a61eb68c44ef1746804cb379e46be64580e5
Description
When you try to load a bogus or unsupported media file there is no indication of this error. I believe the problem lies in the fact the av foundation impl (qtmultimedia/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm) does not emit this signal when it has an error. There is a TODO in there that I believe should emit the "error" signal.
Code below would probably be sufficient.
-(void) assetFailedToPrepareForPlayback:(NSError *)error
{
Q_UNUSED(error)
//TODO: Let the session know that the assest failed to prepare for playback
// Let the media player know that something went wrong
Q_EMIT error(QMediaPlayer::FormatError, tr("Failed to load media"));
#ifdef QT_DEBUG_AVF
qDebug() << Q_FUNC_INFO;
qDebug() << [[error localizedDescription] UTF8String];
qDebug() << [[error localizedFailureReason] UTF8String];
qDebug() << [[error localizedRecoverySuggestion] UTF8String];
#endif
}