Qt Phonon with MinGW in QtCreator in windows XP ?
-
Hi All,
i have configure QT 4.7 and also added MingW for compilation of QT programs.
I want to write sample application that will play video in QT.
For that i am using phonon but i am not able to build phonon with my application ?
When i compile application that will use phonon framework then it gives undefined phonon ?
Can anyone give me idea or link that how to integrate phonon with my QT SDK and MinGW ?Thanks,
Neel -
@#include <QtGui/QApplication>
#include <Phonon/VideoPlayer>
using namespace Phonon;int main(int argc, char *argv[])
{
QApplication a(argc, argv);MediaSource m("file path"); VideoPlayer *player = new VideoPlayer(Phonon::VideoCategory, 0); QObject::connect(player, SIGNAL(finished()), player, SLOT(deleteLater())); player->play(m); return a.exec();
}/@
I think this code may help you a lot
-
ok....try to play any .wmv file ....It will surely work....
-
ok.. thanks for your help... now i am able to play .avi file.i will try .wmv file and let u know the result.
One question for knowledge..
How many file format is supported by the framework?
I mean can i play all the file format like .mp4,.flv etc... ?
just for knowledge where the decoder is come into picture in phonon framework itself or DirectX of microsoft ? How the actual flow when i give input file?Thanks,
Neel -
Actually I'm also new to Qt ....But in Qt you can not able to play flash files as there is no Flash NPAPI plugin in QtWebkit....go through this link,this may help you ....
http://doc.qt.nokia.com/qtmobility-1.1/qmediaplayer.html#supportedMimeTypes