ut2416BV02及ut-s3c6410上移植mplayer

//--------------------------------------------------------------------------------------------

// 作者:longtian635241(longtian_huang@urbetter.com

// 论坛ID:idea6410

// 版权:idea6410

// 平台:友坚idea6410开发板

// 发布日期:2012-11-19

// 最后修改:2012-11-19

//http://www.urbetter.com/main.asp

//----------------------------------------------------------------------------------------------

 

平台:友坚ut2416bv02及idea6410

CROSSFILE:arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2

 

mplayer库:libmad-0.15.1b.tar.gz

http://download.csdn.net/detail/longtian635241/4567506

mplayer:MPlayer-1.0rc2.tar.bz2

http://download.csdn.net/detail/longtian635241/4567590

 

第一:

a、解压libmad-0.15.1b.tar.gz

                   tar xvf  libmad-0.15.1b.tar.gz

b、cd libmad-0.15.1b

c、配置编译等各选项(查看配置个选项意思:./configure --help)

      ./configure --enable-fpm=arm --host=arm-none-linux-gnueabi --disable-shared --disable-debugging --prefix=/usr/local/arm/arm-none-linux-gnueabi/lib CC=/usr/local/arm/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc

d、make:

     这时直接make应该会出问题:如下错误:
cc1: error: unrecognized command line option "-fforce-mem"
修改Makefile(vi Makefile +129)
在Makefile中找到包含"fforce-mem"字符串,将其删除即可;原因:gcc3.4或更高版本中,已将将该选项去除了。
再make
e、make install

其中遇到的问:./libtool: line 6091: arm-linux-ranlib: command not found
make[3]: *** [install-libLTLIBRARIES] 错误 127
make[3]:正在离开目录 `/mp3/libid3tag-0.15.1b'
make[2]: *** [install-am] 错误 2
make[2]:正在离开目录 `/mp3/libid3tag-0.15.1b'
make[1]: *** [install-recursive] 错误 1
make[1]:正在离开目录 `/mp3/libid3tag-0.15.1b'
make: *** [install] 错误 2

google知道好像是sudo引起的路径不一致~我是直接切换到root模式就能成功安装了~sudo -i

注意:这个是Mplayer依赖的文件必须成功安装,否则没必要执行第二步了!肯定有错误error!

第二:

        1、解压MPlayer-1.0rc2.tar.bz2

                 tar xvf MPlayer-1.0rc2.tar.bz2

        2、cd MPlayer-1.0rc2

         3、配置选项(查看配置个选项意思:./configure --help)

./configure --cc=/usr/local/arm/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc --target=arm-none-linux-gnueabi --enable-static --prefix=/tmp/mplayer-rc2 --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=/usr/local/arm/arm-none-linux-gnueabi/lib/include --with-extralibdir=/usr/local/arm/arm-none-linux-gnueabi/lib/lib --host-cc=gcc --enable-ossaudio --disable-ivtv --disable-tv

可能出现的问题:最后编译的Mplayer出现乱码其他功能正常,是由于我配置的为中文,应该是系统对中文识别不是很到位或者编码不对~使用默认的英文吧~将--language=zh_CN去掉即可~

         4、make

                  这时会出现

ioctl.c: In function 'ioctl_ReadCopyright':
ioctl.c:273:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReadDiscKey':
ioctl.c:446:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReadTitleKey':
ioctl.c:610:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReportAgid':
ioctl.c:734:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReportChallenge':
ioctl.c:868:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReportASF':
ioctl.c:1001:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReportKey1':
ioctl.c:1130:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_InvalidateAgid':
ioctl.c:1241:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_SendChallenge':
ioctl.c:1378:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_SendKey2':
ioctl.c:1515:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_ReportRPC':
ioctl.c:1670:5: error: #error "DVD ioctls are unavailable on this system"
ioctl.c: In function 'ioctl_SendRPC':
ioctl.c:1797:5: error: #error "DVD ioctls are unavailable on this system"
make[1]: *** [ioctl.o] Error 1
make[1]: Leaving directory `/home/xiao/MPlayer-1.0rc2/libdvdcss'
make: *** [libdvdcss/libdvdcss.a] 错误 2

找到ioctl.c将相应的行注释掉即可!
root@urbetter-ubuntu:/home/xiao/MPlayer-1.0rc2# find -name ioctl.c
./libdvdcss/ioctl.c

修改后应该就能成功编译了~

 

第三步:测试

             尽量将音乐改成英文名称!

 [root@urbetter /]# cd sdcard/
[root@urbetter /sdcard]# ./mplayer su.mp3
MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
CPU: ARM
 
Playing su.mp3.
Audio file file format detected.
==========================================================================
Requested audio codec family [mp3] (afm=mp3lib) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [ffmp3] afm: ffmpeg (FFmpeg MPEG layer-3 audio decoder)
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...

0 (26.0) of 254.0 (04:14.0) 22.9%  

这样就在播放了!

 

 

遇到的其他问题:Illegal instruction

运行编译好的mplayer显示上面内容非法指令!

root@urbetter-ubuntu:/home/xiao# file mplayer
mplayer: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, for GNU/Linux 2.6.14, not stripped

这时我们可以查看下适用的版本!和链接方式~动态改静态,换支持低版本的工具链等等~

我开始用4.5.1遇到上面问题后来换了现在的工具链问题解决~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值