mplayer移植记录(一)
2013-10-31 14:12
316 查看
X86的LINUX上已经自带了解码库,不需要另外安装解码库,而arm平台自己做的
文件系统没有解码库,需要另外安装解码库。
下载MPlayer:MPlayer-1.0rc2.tar.bz2
解码库:libmad-0.15.0b.tar.gz
一、在X86的LINUX上安装mplayer
1 #./configure (./configure --enable-gui –-enable-live –-language=zh )
2 #make
3 #make install
此时在MPlayer-1.0rc2目录下会生成可执行文件mplayer.
把它拷贝到/bin/目录下。要执行时:
#/bin/mpalyer /路径/要播放的媒体文件名;
#/bin/mplayer a.mp3
二、移植mplayer到arm平台的LINUX上(使用3.3.2编译器)
1 配置安装libmad
(如果不先配置安装libmad,则在make mplayer时出现找不到mad.h 错误)
echo PATH=/usr/local/arm/3.3.2/bin:$PATH
(1)#./configure --enable-fpm=arm --host=arm-linux --disable-shared --disable-debugging --prefix=/usr/local/arm/3.3.2/lib CC=arm-linux-gcc
参数解析:
--enable-fpm=arm
--host=arm-linux
--disable-shared
--disable-debugging
--prefix=/usr/local/arm/3.3.2/lib
CC=arm-linux-gcc
(2)#make
(3)#make install
此时会在/usr/local/arm/3.3.2/lib/目录下生成include目录和lib目录。
其中liclude目录下有文件 mad.h
lib 目录有文件 libmad.a libmad.la
2 配置安装mplayer
(1)#./configure --host-cc=gcc --cc=arm-linux-gcc --target=arm-linux --enable-static --enable-ossaudio --prefix=/tmp/mplayer-rc2 --disable-win32dll --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --disable-armv5te --disable-armv6 --with-extraincdir=/usr/local/arm/3.3.2/lib/include --with-extralibdir=/usr/local/arm/3.3.2/lib/lib
参数解析:
--host-cc=gcc # C compiler for tools needed while building [gcc]
--cc=arm-linux-gcc #C compiler to build MPlayer [gcc]
--target=arm-linux #target platform (i386-linux, arm-linux, etc)
--enable-static #build a statically linked binary
--enable-ossaudio #enable OSS audio output [autodetect]
--prefix=/tmp/mplayer-rc2 #prefix directory for installation [/usr/local]
--disable-win32dll # disable Win32 DLL support [enabled]
--disable-dvdread #disable libdvdread [autodetect]
--enable-fbdev #enable FBDev video output [autodetect]
--disable-mencoder #disable MEncoder (A/V encoder) compilation [enable] 使能编码器编辑
--disable-live #disable LIVE555 Streaming Media [autodetect] 让Mpalyer不支持流媒体协议
--disable-mp3lib # disable builtin mp3lib [enabled]
--enable-mad #disable libmad (MPEG audio) support [autodetect]
--enable-libavcodec_a #disable static libavcodec [autodetect]
--disable-armv5te #disable DSP extensions (ARM) [autodetect]
--disable-armv6 #disable ARMv6 (ARM) [autodetect]
--with-extraincdir=/usr/local/arm/3.3.2/lib/include #指明mad.h文件所在路径
--with-extralibdir=/usr/local/arm/3.3.2/lib/lib #指明limad相关链接库所在路径
(2)#make
使用arm-linux-gcc 3.3.2编译mplayer可能会出现in.h头文件错误如下:
/usr/local/arm/3.3.2/include/netinet/in.h:259: parse error before '(' token
/usr/local/arm/3.3.2/include/netinet/in.h:259: parse error before "__u32"
/usr/local/arm/3.3.2/include/netinet/in.h:260: parse error before '(' token
/usr/local/arm/3.3.2/include/netinet/in.h:260: parse error before "__u16"
/usr/local/arm/3.3.2/include/netinet/in.h:262: parse error before '(' token
/usr/local/arm/3.3.2/include/netinet/in.h:262: parse error before "__u32"
需要修改一下/usr/local/arm/3.3.2/include/netinet/in.h中,在 __BEGIN_DECLS 后面增加下述文字
#undef ntohl
#undef ntohs
#undef htonl
#undef htons
(3)make install(出现提示不认识的文件。因为是ARM平台运行的文件,所有不认识)
install -m 755 -s mplayer /tmp/mplayer-rc2/bin
strip: Unable to recognise the format of the input file `/tmp/mplayer-rc2/bin/mplayer'
此时在MPlayer-1.0rc2目录下会生成可执行文件mplayer.
把它拷贝到/bin/目录下。要执行时:
#/bin/mpalyer /路径/要播放的媒体文件名;
#/bin/mplayer -ac mad a.mp3
三、MPlayer slave命令
在命令中添加 -slave 和 -quiet就可以通过命令设置Mplayer实现相应的功能。在mplayer源码中的,
/DOCS/tech/slave.txt中对这些命令有详细的解析。
阅读(801) | 评论(0) | 转发(0) |
0
上一篇:u-boot移植记录
下一篇:mplayer移植到S3C2440(二)
相关热门文章
欢迎弈天蝎在ChinaUnix博客安...
欢迎572745975在ChinaUnix博客...
欢迎baimaa6vw1在ChinaUnix博...
欢迎lcj1992在ChinaUnix博客安...
欢迎kunzj在ChinaUnix博客安家...
linux守护进程的几个关键地方...
stagefright与opencore对比
嵌入式Linux之我行——u-boot-...
嵌入式Linux之我行——内核、...
CodeNavigator -- 程序员必备...
ChinaUnix & ITPUB社区12周年...
ssh连接出现以下提示,求解...
如何扩展MYSQL
准备做一个大型门户,用户什么...
gbk or utf8
给主人留下些什么吧!~~
评论热议
文件系统没有解码库,需要另外安装解码库。
下载MPlayer:MPlayer-1.0rc2.tar.bz2
解码库:libmad-0.15.0b.tar.gz
一、在X86的LINUX上安装mplayer
1 #./configure (./configure --enable-gui –-enable-live –-language=zh )
2 #make
3 #make install
此时在MPlayer-1.0rc2目录下会生成可执行文件mplayer.
把它拷贝到/bin/目录下。要执行时:
#/bin/mpalyer /路径/要播放的媒体文件名;
#/bin/mplayer a.mp3
二、移植mplayer到arm平台的LINUX上(使用3.3.2编译器)
1 配置安装libmad
(如果不先配置安装libmad,则在make mplayer时出现找不到mad.h 错误)
echo PATH=/usr/local/arm/3.3.2/bin:$PATH
(1)#./configure --enable-fpm=arm --host=arm-linux --disable-shared --disable-debugging --prefix=/usr/local/arm/3.3.2/lib CC=arm-linux-gcc
参数解析:
--enable-fpm=arm
--host=arm-linux
--disable-shared
--disable-debugging
--prefix=/usr/local/arm/3.3.2/lib
CC=arm-linux-gcc
(2)#make
(3)#make install
此时会在/usr/local/arm/3.3.2/lib/目录下生成include目录和lib目录。
其中liclude目录下有文件 mad.h
lib 目录有文件 libmad.a libmad.la
2 配置安装mplayer
(1)#./configure --host-cc=gcc --cc=arm-linux-gcc --target=arm-linux --enable-static --enable-ossaudio --prefix=/tmp/mplayer-rc2 --disable-win32dll --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --disable-armv5te --disable-armv6 --with-extraincdir=/usr/local/arm/3.3.2/lib/include --with-extralibdir=/usr/local/arm/3.3.2/lib/lib
参数解析:
--host-cc=gcc # C compiler for tools needed while building [gcc]
--cc=arm-linux-gcc #C compiler to build MPlayer [gcc]
--target=arm-linux #target platform (i386-linux, arm-linux, etc)
--enable-static #build a statically linked binary
--enable-ossaudio #enable OSS audio output [autodetect]
--prefix=/tmp/mplayer-rc2 #prefix directory for installation [/usr/local]
--disable-win32dll # disable Win32 DLL support [enabled]
--disable-dvdread #disable libdvdread [autodetect]
--enable-fbdev #enable FBDev video output [autodetect]
--disable-mencoder #disable MEncoder (A/V encoder) compilation [enable] 使能编码器编辑
--disable-live #disable LIVE555 Streaming Media [autodetect] 让Mpalyer不支持流媒体协议
--disable-mp3lib # disable builtin mp3lib [enabled]
--enable-mad #disable libmad (MPEG audio) support [autodetect]
--enable-libavcodec_a #disable static libavcodec [autodetect]
--disable-armv5te #disable DSP extensions (ARM) [autodetect]
--disable-armv6 #disable ARMv6 (ARM) [autodetect]
--with-extraincdir=/usr/local/arm/3.3.2/lib/include #指明mad.h文件所在路径
--with-extralibdir=/usr/local/arm/3.3.2/lib/lib #指明limad相关链接库所在路径
(2)#make
使用arm-linux-gcc 3.3.2编译mplayer可能会出现in.h头文件错误如下:
/usr/local/arm/3.3.2/include/netinet/in.h:259: parse error before '(' token
/usr/local/arm/3.3.2/include/netinet/in.h:259: parse error before "__u32"
/usr/local/arm/3.3.2/include/netinet/in.h:260: parse error before '(' token
/usr/local/arm/3.3.2/include/netinet/in.h:260: parse error before "__u16"
/usr/local/arm/3.3.2/include/netinet/in.h:262: parse error before '(' token
/usr/local/arm/3.3.2/include/netinet/in.h:262: parse error before "__u32"
需要修改一下/usr/local/arm/3.3.2/include/netinet/in.h中,在 __BEGIN_DECLS 后面增加下述文字
#undef ntohl
#undef ntohs
#undef htonl
#undef htons
(3)make install(出现提示不认识的文件。因为是ARM平台运行的文件,所有不认识)
install -m 755 -s mplayer /tmp/mplayer-rc2/bin
strip: Unable to recognise the format of the input file `/tmp/mplayer-rc2/bin/mplayer'
此时在MPlayer-1.0rc2目录下会生成可执行文件mplayer.
把它拷贝到/bin/目录下。要执行时:
#/bin/mpalyer /路径/要播放的媒体文件名;
#/bin/mplayer -ac mad a.mp3
三、MPlayer slave命令
在命令中添加 -slave 和 -quiet就可以通过命令设置Mplayer实现相应的功能。在mplayer源码中的,
/DOCS/tech/slave.txt中对这些命令有详细的解析。
阅读(801) | 评论(0) | 转发(0) |
0
上一篇:u-boot移植记录
下一篇:mplayer移植到S3C2440(二)
相关热门文章
欢迎弈天蝎在ChinaUnix博客安...
欢迎572745975在ChinaUnix博客...
欢迎baimaa6vw1在ChinaUnix博...
欢迎lcj1992在ChinaUnix博客安...
欢迎kunzj在ChinaUnix博客安家...
linux守护进程的几个关键地方...
stagefright与opencore对比
嵌入式Linux之我行——u-boot-...
嵌入式Linux之我行——内核、...
CodeNavigator -- 程序员必备...
ChinaUnix & ITPUB社区12周年...
ssh连接出现以下提示,求解...
如何扩展MYSQL
准备做一个大型门户,用户什么...
gbk or utf8
给主人留下些什么吧!~~
评论热议
相关文章推荐
- u-boot移植记录
- Qt界面的一些技巧和实现笔记
- qt移植到s3c2440开发板上
- Qt/e输入法程序设计指南
- QtEmbedded软键盘输入法实战
- Qt实现大图片快速缩小的算法
- Qt资料下载网站
- UNIX下c语言的图形编程
- 拷贝构造函数遇到指针的问题
- C语言常见的几个排序
- const注意的几个事项
- 自适应图片宽度的jQuery焦点幻灯轮播代码
- 教你如何将ARM的代码直接拷到驱动程序中
- 制作.jffs2文件系统
- 通过NFS挂载使LINUX挂载到S3C2440开发板
- 制作.cramfs文件系统
- 【PAT Advanced Level】1013. Battle Over Cities (25)
- <s:select ></s:select>使用
- Darling Divas Tot Terrors In Tiaras
- Tar压缩文件