• «
  • 1
  • 2
  • 3
  • »
  • Pages: 1/3     Go
主题 : mplayer 无GUI 移植成功, GUI 移植困难重重, 求解! 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
楼主  发表于: 2010-02-04 11:00

 mplayer 无GUI 移植成功, GUI 移植困难重重, 求解!

用系统自带的播放器播放480*800 视频,那简直是一个卡啊,所以就移植了 号称很是强大的mplayer 。。。
没GUI界面的移植步骤如下:
主机 :Fedora 9
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72)

1、下载源代码
http://www.mplayerhq.hu/design7/dload.html
版本:MPlayer v1.0rc2 source
2、解压缩
3、配置 ./configure --host-cc=gcc --cc=arm-linux-gcc --target=arm   --enable-static --disable-win32dll --disable-dvdread --disable-dvdread-internal --disable-dvdnav --disable-libdvdcss-internal --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --language=zh_CN --disable-live 2>&1 | tee logfile
4、make
其中会出错的,,需要更改两个文件
MPlayer-1.0rc2/libmpeg2/motion_comp_arm_s.S
MPlayer-1.0rc2/libavcodec/armv4l/dsputil_arm_s.S
中的代码,,在最开始的地方添加:
#ifndef HAVE_PLD
.macro pld reg
.endm
#endif
保存之后,再次make,就OK了

5、将生成的mplayer 二进制文件,复制到ARM 板的 /usr/bin 文件即可使用命令行方式播放。
mplayer test.avi -framedrop -quiet -vf -nosound rotate=1,scale=240:320

通过以上过程可以成功移植无GUI界面的mplayer , 现在开始讨论重点问题,, 我移植GUI时所碰到的问题。

前面两步一样,到第三步,配置的时候就会发生问题:

我的配置参数如下:
./configure --host-cc=gcc --cc=arm-linux-gcc --target=arm   --enable-gui --enable-fbdev  --enable-xshape --enable-static --enable-png --enable-x11 --with-glib-config=/usr/bin/glib-config   --with-gtk-config=/usr/bin/pkg-config     --disable-win32dll --disable-dvdread --disable-dvdread-internal --disable-dvdnav --disable-libdvdcss-internal --enable-fbdev --disable-mencoder --disable-live --disable-mp3lib --enable-mad --enable-libavcodec_a --language=zh_CN --disable-live 2>&1 | tee logfile

这里要做如下解释(参考资料 : http://k.kh.blog.163.com/blog/static/58014564200841352840229/ ):

--enable-gui  使用GUI
--enable-xshape   X11会使用到
--enable-fbdev  是打开FBDev绘图支持,FB应该就是framebuffer吧,没有此选项的话在播放时是没有图像的
--enable-png    支持png --enable-x11 支持x11,必需加上,
--with-glib-config=/usr/bin/glib-config
--with-gtk-config=/usr/bin/pkg-config      这两相我是参考 上面这个网址添加的,,,

按照这个配置,, 会出现如下错误:
Checking for GUI ... yes

Error: The GUI requires libavcodec with PNG support (needs zlib).

Check "configure.log" if you do not understand why it failed.

在configure.log中,什么提示也没有。。。。


而提示 The GUI requires libavcodec with PNG support (needs zlib). 。。。
我zlib 已经安装好了的。。。
RPM Group    : System Environment/Libraries
Source       : zlib-1.2.3-18.fc9.src.rpm
Build Time   : Wed Feb 13 16:28:15 2008
Install Time : Thu Jan  7 23:56:37 2010
License      : zlib

希望大家能够讨论讨论,把GUI的移植给弄出来。。。 说真的mplayer 的播放效果比系统
自带播放器确实好很多。。。


另外,由于我在系统中已经安装好了 GUI界面的mplayer,所以出错应该不是由于缺少skin 文件造成。。。




级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
1楼  发表于: 2010-02-04 11:28
怎么没人发表意见啊?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2010-02-04 11:36
而提示 The GUI requires libavcodec with PNG support (needs zlib). 。。。
我zlib 已经安装好了的。。。
RPM Group    : System Environment/Libraries
Source       : zlib-1.2.3-18.fc9.src.rpm
Build Time   : Wed Feb 13 16:28:15 2008
Install Time : Thu Jan  7 23:56:37 2010
License      : zlib

你想让ARM的开发板用PC上X86的zlib吗?

况且这里也不是在检查zlib, 而是libavcodec.
事实上,从官方网站下载的MPlayer源代码只支持GTK+的GUI,并不能支持mini2440默认的Qtopia 2.2.0 GUI环境.也许这个帖子会对你有帮助http://www.aiothome.net/read.php?tid-3107.html
[ 此帖被kasim在2010-02-04 13:56重新编辑 ]
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
3楼  发表于: 2010-02-04 16:12

 回 2楼(kasim) 的帖子

多谢版主老大提醒,, 我现在下载了 zlib-1.2.3的版本,使用arm-linux-gcc 4.3.2进行编译,
但是出现下面问题。。。
步骤: 参考 http://topic.csdn.net/u/20091230/20/4d6cf600-88ab-410a-b83a-feecce102150.html
1、
root@localhost bin]#cd usr/bin
root@localhost bin]#mv gcc gcc_x86
root@localhost bin]#mv ld ld_x86
[root@localhost bin]# ln -s /usr/local/arm/4.3.2/arm-none-linux-gnueabi/bin/gcc gcc
[root@localhost bin]# ln -s /usr/local/arm/4.3.2/arm-none-linux-gnueabi/bin/ld ld


[root@localhost bin]# cd /tmp/zlib/1.2.3
[root@localhost 1.2.3]# ./configure --prefix=/usr/local/arm/4.3.2/arm-none-linux-gnueabi --shared
Checking for gcc...
Checking for shared library support...
No shared library support.
Building static library libz.a version 1.2.3 with cc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.

看提示是否与stdio.h 相关,不过目前还未找到方法。。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2010-02-04 16:32

 回 3楼(dgc1127) 的帖子

你一定要戴着钢盔往墙上撞吗?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
Fighting!
级别: 侠客
UID: 1635
精华: 0
发帖: 111
金钱: 635 两
威望: 135 点
综合积分: 222 分
注册时间: 2008-09-16
最后登录: 2018-02-08
5楼  发表于: 2010-02-05 20:16
GUI是基于X86的吧

用QT自己写啊
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2010-02-06 11:07

 回 5楼(he119) 的帖子

GUI只是GUI,有X86的GTK也有ARM的GTK,这和CPU架构无关。问题只是MPlayer官方的源代码只支持GTK,不支持QT
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 4100
精华: 0
发帖: 14
金钱: 80 两
威望: 32 点
综合积分: 28 分
注册时间: 2009-02-25
最后登录: 2017-09-13
7楼  发表于: 2010-02-06 13:38
貌似官方的GUI不是用Framebuffer作为输送的吧  不知道网上有没有人写它的GUI 我也在研究Mplayer。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2010-02-06 13:49
引用第7楼adwolf于2010-02-06 13:38发表的  :
貌似官方的GUI不是用Framebuffer作为输送的吧  不知道网上有没有人写它的GUI 我也在研究Mplayer。。

官方的GUI是GTK,在嵌入式Linux上,它不会和Framebuffer直接打交道,而是通过下层的X11或者DirectFB这样的backend。
至于MPlayer的GUI frontend, 除了GTK之外,有很多项目在移植其他各种各样的,你可以参考http://www.mplayerhq.hu/design7/projects.html上的“MPlayer Frontends”部分
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
9楼  发表于: 2010-02-23 10:39

 回 8楼(kasim) 的帖子

版主老大,,,冒昧的问下这篇帖子
http://blog.chinaunix.net/u/13882/showart_121535.html
中看来是移植成功了,, 不知老大能看出其方法不?
谢谢
  • «
  • 1
  • 2
  • 3
  • »
  • Pages: 1/3     Go