[root@localhost mplayer-vaapi]# rpm -qa gcc
gcc-4.7.0-5.fc17.i686

[root@localhost mplayer-vaapi]# uname -a
Linux localhost.localdomain 3.3.4-5.fc17.i686.PAE #1 SMP Mon May 7 17:37:39 UTC 2012 i686 i686 i386 GNU/Linux


2.

                 from h264_cabac.c:33:
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
cabac.h:527:5: error: 'asm' operand has impossible constraints
In file included from ../libavutil/intreadwrite.h:70:0,
                 from dsputil.h:33,
                 from h264_cabac.c:31:
../libavutil/x86/intreadwrite.h:35:5: error: 'asm' operand has impossible constraints
../libavutil/x86/intreadwrite.h:35:5: error: 'asm' operand has impossible constraints
../libavutil/x86/intreadwrite.h:35:5: error: 'asm' operand has impossible constraints
make[1]: *** [h264_cabac.o] Error 1
make[1]: Leaving directory `/home/fujitsu/mb86h55/trunk/original/intel_graphic/mplayer/mplayer-vaapi/ffmpeg/libavcodec'
make: *** [ffmpeg/libavcodec/libavcodec.a] Error 2
[root@localhost mplayer-vaapi]#


see
http://lp007819.wordpress.com/2011/05/30/mplayer-compile-error-svn-2011/

goo 了一下发现这个问题很常见了,好像libavcode 较新版本都有这个问题。
解决方法是给CFLAG 加参数 -fomit-frame-pointer ....but not ok

所以直接改 config 參數 避掉...


最後的流程如下


echo "-----build mplayer-----"
#
#Compile MPlayer on Target Use these steps to build MPlayer with hardware accelerated video decoding in the target system. Before proceeding, ensure that the system has an Internet connection.

#1. Install yasm and git:
yum -y install yasm git

#2. Install some alsa dependencies:
yum -y install alsa*

#3. Clone MPlayer git repository:

git clone git://gitorious.org/vaapi/mplayer.git


#If the command executes successfully, the MPlayer tree is downloaded in the target under the mplayer directory.

#4. Configure MPlayer:
#
cd mplayer
git checkout -t origin/hwaccel-vaapi


#//-------------------------------------
#[root@localhost mplayer]# git checkout -t origin/hwaccel-vaapi
#Branch hwaccel-vaapi set up to track remote branch hwaccel-vaapi from origin.
#Switched to a new branch 'hwaccel-vaapi'
#//-------------------------------------

./configure

echo "At the No FFmpeg checkout prompt, press Enter."


#//-------------------------------------
#[root@localhost mplayer]# ./configure
#No FFmpeg checkout, press enter to download one with git or CTRL+C to abort
#
#Cloning into 'ffmpeg'...
#remote: Counting objects: 286779, done.
#remote: Compressing objects: 100% (66619/66619), done.
#Receiving objects:  10% (29775/286779), 5.43 MiB | 972 KiB/s
#//-------------------------------------

cd ffmpeg
git checkout -b ffmpeg-0.6.3

#[you can use the latest version tag]

#//-------------------------------------
#[root@localhost ffmpeg]# git checkout -b ffmpeg-0.6.3
#Switched to a new branch 'ffmpeg-0.6.3'
#//-------------------------------------

#5. Get out of ffmpeg directory:
cd ..

#6. Now we are in the MPlayer directory. Configure MPlayer with options as follows:
#./configure --prefix=/usr/local --enable-xv --enable-gl --enable-vaapi --disable-vdpau --disable-mencoder --disable-faad --enable-runtime-cpudetection
#err

#LDFLAGS="-lX11 -lXext"  LIBS="-lX11" ./configure --prefix=/usr/local --enable-xv --enable-x11 --enable-vaapi --disable-vdpau --disable-menu

./configure --enable-vaapi  --disable-menu
#ok

#7. Compile MPlayer:
make
make install

cd ..
mplayer -vo help



//---------------------------
// fedora 16
//---------------------------

echo "-----build mplayer-----"
#tar jvxf mplayer-vaapi-latest-FULL.tar.bz2          //去抓這包
#cd mplayer-vaapi-20110127
ls -al
cd mplayer
sh checkout-patch-build.sh
cd mplayer-vaapi

#./configure --enable-x11 --enable-vaapi
./configure --enable-vaapi --disable-menu

make
make install
cd ..
mplayer -vo help




參考資料
http://www.freedesktop.org/wiki/Software/vaapi
http://wiki.videolan.org/VLC_VAAPI



立你斯 發表在 痞客邦 留言(0) 人氣()