I want to play video using QMediaplayer with internet link. I tried to do this by passing internet link to "setMedia" function but error occured:
"DirectShowPlayerService::doRender: Unresolved error code 80040218"
Example Code is:
#include "mainwindow.h"
#include <QApplication>
#include <QMediaPlayer>
#include <QVideoWidget>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
//MainWindow w;
//w.show();
QMediaPlayer * player = new QMediaPlayer;
QVideoWidget * vw = new QVideoWidget;
player->setVideoOutput(vw);
player->setMedia(QUrl("http://21.179.127.116/Katy%20Perry%20-%20Roar%20(Official).mp4"));
vw->setGeometry(100,100,300,400);
vw->show();
player->play();
qDebug()<<player->state();
return a.exec();
}
I am using Qt Creator 3.5.1 (enterprise)