移植环境(红色粗字体字为修改后内容,蓝色粗体字为特别注意内容)
1,开发板:韦东山JZ2440
2,linux 版本:linux-3.4.2
3,系统版本:Ubuntu9.10
4,交叉编译环境:arm-linux-gcc-4.4.3
5,参考文献:http://blog.chinaunix.net/uid-20587912-id-405026.html、https://www.linuxidc.com/Linux/2011-02/32616.htm
————————————————
经过笔者亲测,这种方式应该是依赖最少的移植方式,只需要安装两个包,分别是libmad和MPlayer。相比网上其他方法要简便得多!这两个包的下载地址如下:
libmad:https://nchc.dl.sourceforge.net/project/mad/libmad/0.15.1b/libmad-0.15.1b.tar.gz
Mplayer:http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
Step1:编译libmad
libmad-0.15.1b# CC=arm-linux-gcc ./configure --host=arm-linux --disable-shared --enable-static --prefix=/work/software/madplayer/_install
root@ubuntu:/home/sxbg/madplayer/libmad-0.15.1b# make
cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] Error 1
make[2]: Leaving directory `/home/sxbg/madplayer/libmad-0.15.1b'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sxbg/madplayer/libmad-0.15.1b'
make: *** [all] Error
解决方法:将Makefile中的"-fforce-mem"选项去掉
root@ubuntu:/home/sxbg/madplayer/libmad-0.15.1b# make
root@ubuntu:/home/sxbg/madplayer/libmad-0.15.1b# make install
Step2:编译mplayer
./configure --cc=arm-linux-gcc --target=arm-linux --enable-static --prefix=/work/software/madplayer/MPlayer-1.0rc2/_install --disable-win32dll --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --language=zh_CN --disable-armv5te --disable-armv6 --with-extraincdir=/work/software/madplayer/_install/include --with-extralibdir=/work/software/madplayer/_install/lib --host-cc=gcc --enable-ossaudio
错误一:
vo_ivtv.c: In function 'ivtv_reset':
vo_ivtv.c:79: error: storage size of 'sd' isn't known
vo_ivtv.c:80: error: storage size of 'sd1' isn't known
vo_ivtv.c:84: error: 'IVTV_STOP_FL_HIDE_FRAME' undeclared (first use in this function)
vo_ivtv.c:84: error: (Each undeclared identifier is reported .ly .ce
vo_ivtv.c:84: error: for each function it appears in.)
vo_ivtv.c:87: error: 'IVTV_IOC_STOP_DECODE' undeclared (first use in this function)
v