织梦CMS - 轻松建站从此开始!

罗索

使用Xcode4.5 编译运行 iFrameExtractor

落鹤生 发布于 2013-02-25 17:46 点击:次 
IOS平台上使用FFmpeg解码H264的例子 https://github.com/lajos/iFrameExtractor Xcode4.5 安装路径变了的缘故吧,修改了下build_armv6 build_armv7 build_i386 三个编译脚本
TAG:

IOS平台上使用FFmpeg解码H264的例子

https://github.com/lajos/iFrameExtractor

Xcode4.5 安装路径变了的缘故吧,修改了下build_armv6 build_armv7 build_i386 三个编译脚本

build_armv6

  1. #!/bin/tcsh -f 
  2.   
  3.  if (! -d armv6) mkdir armv6 
  4.  if (! -d lib) mkdir lib 
  5.   
  6.  rm armv6/*.a 
  7.   
  8.  make clean 
  9.   
  10.  ./configure --disable-doc --disable-ffmpeg --disable-ffplay
  11.  --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin
  12.  --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
  13.  --as='gas-preprocessor/gas-preprocessor.pl
  14.  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc'
  15.  --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
  16.  --cpu=arm1176jzf-s --extra-cflags='-arch armv6'
  17.  --extra-ldflags='-arch armv6  -isysroot
  18.  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk' 
  19.   
  20.  make -j4 
  21.   
  22.  mv libavcodec/libavcodec.a armv6/ 
  23.  mv libavdevice/libavdevice.a armv6/ 
  24.  mv libavformat/libavformat.a armv6/ 
  25.  mv libavutil/libavutil.a armv6/ 
  26.  mv libswscale/libswscale.a armv6/ 
  27.   
  28.  rm lib/*.a 
  29.   
  30.  cp armv6/*.a lib/ 

build_armv7

  1. #!/bin/tcsh -f 
  2.   
  3.  if (! -d armv7) mkdir armv7 
  4.  if (! -d lib) mkdir lib 
  5.   
  6.  rm armv7/*.a 
  7.   
  8.  make clean 
  9.   
  10.  ./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver
  11.  --enable-cross-compile --arch=arm --target-os=darwin
  12.  --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
  13.  --as='gas-preprocessor/gas-preprocessor.pl
  14.  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc'
  15.  --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
  16.  --cpu=cortex-a8 --extra-cflags='-arch armv7'
  17.  --extra-ldflags='-arch armv7 -isysroot
  18.  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk'
  19.  --enable-pic 
  20.   
  21.  make -j4 
  22.   
  23.  mv libavcodec/libavcodec.a armv7/ 
  24.  mv libavdevice/libavdevice.a armv7/ 
  25.  mv libavformat/libavformat.a armv7/ 
  26.  mv libavutil/libavutil.a armv7/ 
  27.  mv libswscale/libswscale.a armv7/ 
  28.   
  29.  rm lib/*.a 
  30.   
  31.  cp armv7/*.a lib/ 

build_i386

  1. #!/bin/tcsh -f 
  2.   
  3.  if (! -d i386) mkdir i386 
  4.  if (! -d lib) mkdir lib 
  5.   
  6.  rm i386/*.a 
  7.   
  8.  make clean 
  9.   
  10.  ./configure --disable-bzlib --disable-mmx --disable-doc --disable-ffmpeg
  11.  --disable-ffplay --disable-ffserver
  12.  --cc=/Applications/Xcode.app/Contents/Developer
  13. /Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
  14.  --as="gas-preprocessor/gas-preprocessor.pl
  15.  /Applications/Xcode.app/Contents/Developer
  16. /Platforms/iPhoneOS.platform/Developer/usr/bin/gcc"
  17.  --sysroot=/Applications/Xcode.app/Contents/Developer
  18. /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
  19.  --extra-ldflags="-arch i386
  20.  -L/Applications/Xcode.app/Contents/Developer/Platforms
  21. /iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/lib/system"
  22.  --extra-cflags="-arch i386 -fmessage-length=0 -pipe -Wno-trigraphs
  23.  -fpascal-strings -O0 -fasm-blocks -Wreturn-type -Wunused-variable
  24.  -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000
  25.  -isysroot
  26.  /Applications/Xcode.app/Contents/Developer/Platforms
  27. /iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
  28.  -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2" 
  29.   
  30.  make -j4 
  31.   
  32.  mv libavcodec/libavcodec.a i386/ 
  33.  mv libavdevice/libavdevice.a i386/ 
  34.  mv libavformat/libavformat.a i386/ 
  35.  mv libavutil/libavutil.a i386/ 
  36.  mv libswscale/libswscale.a i386/ 
  37.   
  38.  rm lib/*.a 
  39.   
  40.  cp i386/*.a lib/ 

没有真机,模拟器就使用i386编译出来的库。
用xcode打开项目,编译运行。

Xcode 4.5编译运行iFrameExtractor

接下来 学习Objective-C,移植rtmpdump,能直接使用FFmpeg里的rtmp协议处理最好

(bashell)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201302/16511.html]
本文出处:http://bashell.sinaapp.com 作者:bashell 原文
顶一下
(0)
0%
踩一下
(1)
100%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容