sep4020移植mplayer
1.交叉编译环境的建立:首先,下载一个arm-linux-gcc-3.3.2.tar.bz2的交叉编译工具可以从www.armfans.net上下载到拷贝到根目录下解压:[root@localhost /]# tar -jxvf arm-linux-gcc-3.3.2.tar.bz2[root@localhost /]# gedit etc/bashrc在最后一行添加:export PATH="/usr/local/arm/3.3.2/bin:$PATH这样就确保了arm-linux-gcc-3.3.2作为你编译mplayer的交叉编译工具[root@localhost ~]# echo $PATH/usr/local/arm/3.3.2/bin:/usr/local/arm/3.4.1/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin可以看到3.3.2在开头部分,说明设置正确2,交叉编译mplayer:在根目录下新建一个mplayer的文件夹,然后将libmad-0.15.1b.tar.gz 、MPlayer-1.0pre7try2.tar.bz2拷贝进来[root@localhost mplay]# tar -zxvf libmad-0.15.1b.tar.gz[root@localhost mplay]# cd libmad-0.15.1b[root@localhost libmad-0.15.1b]# ./configure --enable-fpm=arm --host=arm-linux --disable-shared --disable-debugging --prefix=/usr/local/arm/3.3.2/lib CC="arm-linux-gcc"[root@localhost libmad-0.15.1b]# make[root@localhost libmad-0.15.1b]# make install[root@localhost mplay]# tar -jxvf MPlayer-1.0pre7try2.tar.bz2[root@localhost mplay]# cd MPlayer-1.0pre7try2[root@localhost MPlayer-1.0pre7try2]# touch setup.sh[root@localhost MPlayer-1.0pre7try2]# gedit setup.shSetup.sh里面的内容如下:./configure --cc=arm-linux-gcc --target=arm-armv4-linux --enable-static --prefix=/tmp/mplayer --disable-win32 --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --enable-mad --enable-libavcodec --with-extraincdir=/usr/local/arm/3.3.2/lib/include --with-extralibdir=/usr/local/arm/3.3.2/lib/lib --host-cc=gcc保存并退出[root@localhost MPlayer-1.0pre7try2]# chmod 777 setup.sh[root@localhost MPlayer-1.0pre7try2]# ./setup.sh[root@localhost MPlayer-1.0pre7try2]# make将生成的mplayer可执行文件拷贝的nfs文件夹下面在终端上执行:./mplayer xjzb.avi 播放失败执行:./mplayer –nosound xjzb.avi这样就会有动画出来了,但是却没有声音
现在只能做到这一步,声音问题还没解决,如果有人会的话,指点下,不胜感激!
文章评论(0条评论)
登录后参与讨论