It might help to provide a stack-trace... anyway, it could just be the back- end that's crashing (DirectShow 9 on Windows) due to missing or bad codecs... I've had good results with the "Windows 7 Codec Pack" so far: http://www.windows7codecs.com/
HTH, Ren?? On Saturday 18 February 2012 11:54:55 Brian Li wrote: > Dear all?? > I'm learning to use the Phonon in QT, followed up some examples in the help > document to setup one VideoPlayer, but when running this programe, it > always crashed, the example is so simple I don't known where is wrong. > #include <QtCore> > #include <QtGui> > #include <phonon> > > > int main(int argc, char *argv[]) { > QApplication app(argc, argv); > > QWidget *widget = new QWidget; > widget->setWindowTitle("Video Player"); > widget->resize(400,400); > > QString fileName = QFileDialog::getOpenFileName(0, > ("Open videos"), "e:\\usr", ("All Files (*.*)")); > > Phonon::VideoPlayer *player = new > Phonon::VideoPlayer(Phonon::VideoCategory, widget); > > > player->load(Phonon::MediaSource(fileName)); > > player->play(); > > widget->show(); > > return app.exec(); > } > > Anyone can give me a hand? The example is runned under Windows XP. > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest