Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QMediaPlayer Android Gives NoMedia
carlinski last edited by
Ubuntu 12.04, Qt5.2.1, Android
QVideoWidget* ptr_videoWidget = new QVideoWidget(this);
this->setCentralWidget(ptr_videoWidget); QMediaPlayer* player = new QMediaPlayer(ptr_videoWidget); player->setVideoOutput(ptr_videoWidget); QFile file("/storage/extSdCard/test1.mp4"); if(!file.open(QIODevice::ReadOnly)) qDebug() << "file not found"; player->setMedia( QUrl::fromLocalFile(QFileInfo(file).absoluteFilePath())); player->play(); qDebug() << "mediasStatus=" << player->mediaStatus();
Get this back:
File exists (however it is on an sd card, would that make a difference?)
I do all this in the initialisation of the MainWindow.
Working on the desktop it works fine, a video displays (change path obviously).
I found another post on here where somebody had same problem, and they used Ministro to install. I have tried it that way also.