QVideoWidget not showing video
-
Hi,
I was playing with QtMultimedia and I thought the next piece of code should show the video@
//VIDEO PLAYING .....
QMediaPlayer *player = new QMediaPlayer; QMediaPlaylist *playlist = new QMediaPlaylist(player); playlist->addMedia(QUrl("E:/karamage.avi")); playlist->addMedia(QUrl("E:/karamage1.avi")); QVideoWidget *videoWidget = new QVideoWidget; player->setVideoOutput(videoWidget); playlist->setCurrentIndex(1); player->play(); //VIDEO PLAYING ENDS HERE. //WE DEAL WITH LAYOUTS HERE QVBoxLayout * mLayout=new QVBoxLayout(); mLayout->addWidget(videoWidget); setLayout(mLayout); //LAYOUT HANDLING ENDS HERE.
@
But when I run the application ,I simply see an empty widget .I feel I missed sth and I would appreciate it if you helped me point it out.I apologize if this is obvious.(I am jut getting started with Multimedia programming) .
My setup: Windows8.1/ Qt 5.2 / VS2012
Thanks for your time.
-
Hi,
Check the console output, it might be some missing codecs (avi is only a container and can have many things in it)