Use the Qt-4.7.4 (with versions supporting Phonon), install Qt Gcc with version 4.3.2, and make with version 3.8.2
First. Install the phonon library. Phonon is not installed by default when you install Qt.
Cd/opt/qt-4.7.4/src/phonon
Make
Make install
Download phonon-mplayer.tar. bz.
Tar jxvf phonon-mplayer.tar.bz
First, clear the intermediate files in the compiled directory.
Cd libmplayer
Make distclean
Qmake
Make
Generate libmplayer. a in the directory
Cd ..
Make distclean
Qmake
Make
Generate the library file libphon_mp.so
Cp libphonon_mp.so QTDir/plugins/phonon_backend // create a new
At this point, phonon_mplayer has been installed.
You also need to install the MPlayer. Http://www.mplayerhq.hu/MPlayer/releases/
Install some Decoding
Mkdir-p/usr/lib/codecs
Mkdir-p/usr/lib/wincodecs
Tar jxvf all-20061022.tar.bz2
Mv all-20061022/usr/lib/codecs
Chmod 644/usr/lib/codecs /*
Chown root. root/usr/lib/codecs /*
Tar jxvf essential-20061022.tar.bz2
Music Video essential-20061022/usr/lib/wincodecs
Chown root. root/usr/lib/wincodecs /*
Chmod 644/usr/lib/wincodecs /*
Install MPlayer
Tar jxvf MPlayer-1.0pre8.tar.bz2
Cd MPlayer-1.0pre8
./Configure -- enable-gui -- enable-largefiles -- enable-menu -- prefix =/usr/local/mplaer
-- With-codecsdir =/usr/lib/codecs/-- with-win32libdir =/usr/lib/wincodecs/-- confdir =/etc/mplayer -- cc = gcc // note, try to use version 4.3.2 in gcc, or an error will be reported.
Make
Make install
Font installation
Tar jxvf font-arial-cp1250.tar.bz2
Mv font-arial-cp1250/usr/local/mplayer/share/mplayer/font/
Cd/usr/local/mplayer/share/mplayer/font/
Ln-s font-arial-cp1250 font
Copy the simsun. tts font in windows to root/. mplayer and change it to subfont. ttf.
Install skin // no skin, cannot be used normally
Tar jxvf Blue-1.8.tar.bz2
Mv Blue/usr/local/mplayer/share/mplayer/skins
Cd/usr/local/mplayer/share/mplayer/skins
Ln-s Blue default
Now MPlayer is fully installed.
Copy the/usr/local/mplayer/bin file to/usr/lib.
You can run the Qt/demos/qmediapalyer example for testing, or run gmplayer in/usr/local/mplayer/bin.
If there is no sound, you can set it in Linux.
Start-> preferences-> Sound check two options Enable sound server startup and sound for events
Now, you can use Phonon to Develop multimedia players in linux.
From the hsl tribe