Hi����ӭ����Ƕ��ʽ��ѵ�߶�Ʒ�� - ����Զ����������<�����ܲ�����>��רעǶ��ʽ����ʦ����15�꣡
��ǰλ��: > ����Զ���������� > Ƕ��ʽѧϰ > ��ʦ���� > Mplayer ��ֲ
Mplayer ��ֲ
ʱ�䣺2017-01-05���ߣ�����Զ��

����mplayer��ֲ�������Ϻܶ࣬�����ܻ��ҡ��ڴˣ�������һ������mplayer ����ϸ�ܽᡣ����֮ǰ���ڽ�ѹԴ�������ͨ��./configure --help��һ��������á�

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�ϣ�ʹ��4.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-none-linux-gnueabi --disable-shared --disable-debugging        --prefix=/usr/local/arm/3.3.2/lib CC=arm-none-linux-gnueabi-gcc

����������
        --enable-fpm=arm 
        --host=arm-none-linux-gnueabi
        --disable-shared 
        --disable-debugging 
        --prefix=/home/linux/libmad(make install ��װ·��)
        CC=arm-none-linux-gnueabi-gcc(4.3.2�Ľ�����빤����)

(2)#make

ע���������error:unrecognized command line option "-fforce-mem"������Ҫ�޸�makefile,ȥ��--fforce-mem��־(��Ϊarm-eabi����������֧�����ѡ��)

(3)#make install

��ʱ����/home/linuxĿ¼������includeĿ¼��libĿ¼��
        ����licludeĿ¼�����ļ� mad.h
        lib Ŀ¼���ļ� libmad.a libmad.la

2 ���ð�װmplayer

(1)#./configure    --host-cc=gcc    --cc=arm-none-linux-gnueabi-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    --disable-dvdnav    --disable-dvdread    --disable-dvdread-internal        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-none-linux-gnueabi-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

���п��ܻ������������⣺

1.Error:motion_comp_arm_s.S

��libmpeg2/motion_comp_arm_s.S�ļ���ǰ��������µ����ݣ�

#ifndef HAVE_PLD
        .macro pld reg
        .endm
        #endif

2.vo_ivtv.c:79: error: storage size of ’sd’ isn’t known

vo_ivtv.c:80: error: storage size of ’sd1′ isn’t known

���--disable-ivtv

3. undefined reference to `video_out_ivtv'

���ļ� file libvo/video_out.c, �ҵ�
        #ifdef HAVE_DXR2
        extern vo_functions_t video_out_dxr2;
        #endif
        extern vo_functions_t video_out_dxr3; 
        #ifdef HAVE_IVTV
        extern vo_functions_t video_out_ivtv;
        #endif 
        edit it like this:
        #ifdef HAVE_DXR2
        extern vo_functions_t video_out_dxr2;
        #endif
        #ifdef HAVE_DXR3    //��һ����Ҫ��ӵ�
        extern vo_functions_t video_out_dxr3; 
        #endif    //�����Ҫ��ӵ�
        #ifdef HAVE_IVTV
        extern vo_functions_t video_out_ivtv;
        #endif

ʹ��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�ж���Щ��������ϸ�Ľ�����

Mplayer������£�

Qt��дMplayerǰ�˳���

��������
�����б���������۽������ѱ����˿���������������վͬ����۵��֤ʵ��������