为iOS 5编译x264 [英] Compiling x264 for iOS 5

查看:135
本文介绍了为iOS 5编译x264的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将最新版本的libx264编译为iOS 5手臂。

I'm trying to compile the latest version of libx264 to iOS 5 arm.

2010年中期,Gabriel脚本用于构建。

In mid-2010, the Gabriel script for building worked.

它不再。

它说没有工作的C编译器找到。

It says "No working C compiler found."

任何人都可以直接回答我吗?
这是2012年,谷歌中没有人似乎已经编译了。

Can anyone give me straight answer? It's 2012 and no one in google seems to have compiled it.

推荐答案

更新:
我已经将需要的文件添加到下面的github仓库。
https://github.com/rodisbored/ffmpeg_x264_iOS5_build

我拿了gabriel的脚本并修改了它。我已经意图在线发布完整的脚本,但这是您需要的部分。将其流行到Gabriel的脚本中。这适用于XCode 4.2。我还没有更新到4.3来测试路径名是否仍然有效,但我想你可以从下面找出哪里更新。

I took gabriel's script and modified it. I've been meaning to post the complete script online, but here's the part(s) you need. Pop it into Gabriel's script. This works with XCode 4.2. I haven't updated to 4.3 to test whether the path names are still valid, but I think you can figure out where to update from the below.

对于armv6

CC = / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / llvm -gcp ./configure --host = arm-apple-darwin --sysroot = / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS5.0.sdk --prefix ='dist'--extra-cflags =' -arch arm-6--extra-ldflags =' - L / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS5.0.sdk / usr / lib / system -arch armv6'--enable-pic --disable- asm --enable-static

CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv6' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv6' --enable-pic --disable-asm --enable-static

对于armv7

CC = / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / llvm-gcc ./configure --host = arm-apple-darwin --sysroot = / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS5.0.sdk --prefix ='dist' -extra-cflags =' - arch armv7'--extra-ldflags =' - L / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS5.0.sdk / usr / lib / system -arch armv7'--enable -pic --enable-static

CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv7' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv7' --enable-pic --enable-static

要将这些链接到ffmpeg,请确保将库和标题的路径放入--extra -cflags和--extra-ldflags。如果不这样做,它会抱怨找不到libx264库。以下是您需要将其全部打开。

To link these to ffmpeg, make sure you put the path of the library and and headers into the --extra-cflags and --extra-ldflags. If you don't, it'll complain about not finding the libx264 library. The below is what you need to turn this all on.

--enable-libx264 \
--enable-encoder=libx264 \
--enable-encoder=libx264rgb \
--enable-gpl

这篇关于为iOS 5编译x264的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆