[Interest] videoPlayer crashed
R. Reucher
rene.reucher at batcom-it.net
Sat Feb 18 16:37:13 CET 2012
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 at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120218/7d9734b6/attachment.html>
More information about the Interest
mailing list