在iOS5.0上编译ffmpeg0.8.11

1. 从ffmpeg.org上下载ffmpeg0.8.11并解压缩到用户目录。

2. 从https://github.com/yuvi/gas-preprocessor下载https://github.com/yuvi/gas-preprocessor.git脚本并放到ffmpeg0.8.11目录。

3. ./configure --enable-memalign-hack --disable-doc --disable-gpl --disable-nonfree --disable-version3 --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --disable-encoders --disable-muxers --disable-decoder=vp8 --disable-parser=vp8 --disable-devices --disable-avdevice --disable-avfilter --disable-hwaccels --disable-decoder=vp8 --disable-demuxer=vp8 --enable-protocols --enable-protocol=file --enable-protocol=cache --enable-protocol=pipe --enable-protocol=crypto --enable-protocol=md5 --enable-protocol=http --enable-protocol=applehttp --enable-protocol=hls --enable-network --disable-yasm --disable-armv6 --disable-armv6t2 --enable-armvfp --enable-neon --enable-pthreads --disable-debug --disable-zlib --enable-cross-compile --arch=arm --target-os=darwin --enable-pic --disable-shared --enable-static --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --cpu=cortex-a8 --enable-neon --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk'

4.编译,后来出错,提示:

invalid operand in inline asm: 'adds   $1, ${2:R}, ${2:Q}, lsr #31  
mvnne  $1, #1<<31             
moveq  $0, ${2:Q}                
eorne  $0, $1,  ${2:R}, asr #31  
'

5.注释掉libavutil/arm/intmath.h中的函数:

/*
#define av_clipl_int32 av_clipl_int32_arm
static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
{
    int x, y;
    __asm__ ("adds   %1, %R2, %Q2, lsr #31  \n\t"
             "mvnne  %1, #1<<31             \n\t"
             "moveq  %0, %Q2                \n\t"
             "eorne  %0, %1,  %R2, asr #31  \n\t"
             : "=r"(x), "=&r"(y) : "r"(a):"cc");
    return x;
}
*/

6. 重新编译,生成最终的Lib,未出其他错误。

7. 针对xcode4.4及iOS5.1编译ffmpeg0.11依然适用。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值