
Player
Source (link to git-repo or to original if based on someone elses unmodified work):
Available as/for:
Description:This application is to help those they need to learn how to use Qt Phonon module and I'm not "Reinventing the wheel" ;-)
** update **
Using new user interface and can be compiled with mingw on windows no need for visual studio any more .
Note : I will keep the source code for the older version as a download too.
Ratings & Comments
6 Comments
For those who struggle to compile this example project as .zip does not have any instructions. My system: WinXP, Qt4.6.2 for VisualStudio, MS Visual Studio C++ 2008 Express Edition 1) I edited Player.pro file, added the following lines to keep release folder clean after compilation. OBJECTS_DIR = obj MOC_DIR = moc 2) Create platform dependent makefiles Create the following bat script, save to project folder, run it set path=%path%;C:\Qt\4.6.2\bin qmake -makefile 3) Compile a project Create the following bat script, save to project folder, run it call "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" nmake release pause 4) Copy images folder, run an app Copy images folder to release/images, run release/Player.exe application
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded I used mingw32+QT4.5.0,can you help me how to fix this problem.
First you cannot use phonon with mingw32. You have to build Qt from the source with visual studio 2008 express edition (free from microsoft). You can look on google on how to build Qt with VS or you can read this : (its a french website translated to english) Good luck http://translate.google.com/translate?prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fwww.siteduzero.com%2Ftutoriel-3-36553-utiliser-qt-avec-visual-studio.html%23ss_part_2&sl=fr&tl=en&history_state0=
How to add the phonon when i make it, it gives me error about phonon Thanks
I think that phonon module is not installed with Qt, you need to recompile it. type ./configure -v or configure.exe -v to see if the phonon module is available. If not you need to install the backend and it depends on your OS. take a look at this overview: http://doc.trolltech.com/4.4/phonon-overview.html and http://www.qtcentre.org has a lot of help too. Good luck !
I installed Phonon but still give these errors In file included from src/main.cpp:25: src/player.h:30:18: error: phonon: No such file or directory In file included from src/main.cpp:25: src/player.h:51: error: ‘Phonon’ has not been declared src/player.h:51: error: ISO C++ forbids declaration of ‘SeekSlider’ with no type src/player.h:51: error: expected ‘;’ before ‘*’ token src/player.h:52: error: ‘Phonon’ has not been declared src/player.h:52: error: ISO C++ forbids declaration of ‘MediaObject’ with no type src/player.h:52: error: expected ‘;’ before ‘*’ token src/player.h:54: error: ‘Phonon’ has not been declared src/player.h:54: error: ISO C++ forbids declaration of ‘VolumeSlider’ with no type src/player.h:54: error: expected ‘;’ before ‘*’ token src/player.h:55: error: ‘Phonon’ has not been declared src/player.h:55: error: ISO C++ forbids declaration of ‘AudioOutput’ with no type src/player.h:55: error: expected ‘;’ before ‘*’ token src/player.h:57: error: ‘Phonon’ has not been declared src/player.h:57: error: ISO C++ forbids declaration of ‘VideoWidget’ with no type src/player.h:57: error: expected ‘;’ before ‘*’ token src/player.h:58: error: ‘Phonon’ was not declared in this scope src/player.h:58: error: template argument 1 is invalid src/player.h:79: error: ‘Phonon’ has not been declared src/player.h:79: error: ISO C++ forbids declaration of ‘MediaSource’ with no type src/player.h:79: error: expected ‘;’ before ‘getAudio’ src/player.h:97: error: ‘Phonon’ has not been declared src/player.h:97: error: ‘Phonon’ has not been declared src/player.h:97: error: multiple parameters named ‘State’