主机:ubuntu 11.04
交叉编译器:arm-linux-gcc 3.4.1
硬件平台:FL2440
软件资源:libmad-0.15.1b.tar.gz,MPlayer-1.0rc2.tar.bz2
转载请标明出处http://blog.csdn.net/yming0221
下载软件 播放器和解码器
http://www.mplayerhq.hu/MPlayer/releases/
http://cdnetworks-kr-1.dl.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz
1.将libmad-0.15.1b.tar.gz和MPlayer-1.0rc2.tar.bz2解压.
2.进入libmad-0.15.1b:
(1)配置,生成Makefile:(--prefix=/opt/arm/3.4.1/lib为指定最终生成的库文件的安装路径,CC=/opt/arm/3.4.1/bin/arm-linux-gcc为指定交叉编译工具路径)
sudo ./configure --enable-fpm=arm --host=arm-linux --disable-shared --disable-debugging --prefix=/opt/arm/3.4.1/lib CC=/opt/arm/3.4.1/bin/arm-linux-gcc
(2)编译:
sudo make
(3)安装:
sudo make install
3.进入MPlayer-1.0rc2:
(1)配置,生成Makefile:(extraincdir=/opt/arm/3.4.1/lib/include和--with-extralibdir=/opt/arm/3.4.1/lib/lib指定了上一步安装库文件在路径)
sudo ./configure --cc=/opt/arm/3.4.1/bin/arm-linux-gcc --target=arm-linux --enable-static --prefix=/tmp/mplayer-rc2 --disable-win32dll --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --language=en_US --disable-armv5te --disable-armv6 --with-extraincdir=/opt/arm/3.4.1/lib/include --with-extralibdir=/opt/arm/3.4.1/lib/lib --host-cc=gcc --enable-ossaudio
(2)编译:
sudo make
当前目录下会生成mplayer.
然后执行./mplayer ***./mp4
成功,不过了能由于硬件的限制,有点卡,声音视频不同步。