有没有人为Android平台成功交叉编译librtmp?我知道 rtmpdump android 下载包含 librtmp.so,但我认为我也需要 librtmp.a(我正在尝试交叉编译具有 librtmp 支持的 ffmpeg)。
有人对此有任何运气吗?它让我发疯......
塔
担
看看这里http://stream-recorder.com/forum/rtmpdump-build-android-t13466.html 我已经在我的github上放了一个howto https://github.com/S74ck3r/rtmpdump/blob/主/自述文件-howto-build.txt
希望对理查德有所帮助
我* 刚刚使用Guardian Project 的 OpenSSL repo成功构建了适用于 Android 的 librtmp 。我在这里记录了我的步骤以及保留的构建脚本。
简而言之,按照 GuardianProject 的指示构建 OpenSSL,然后运行以下脚本rtmpdump/librtmp
:
#build_librtmp_for_android.sh
NDK=/path/to/android-ndk-r9c
SYSROOT=$NDK/platforms/android-19/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64
OPENSSL_DIR=/path/to/openssl-android/
# Note: Change the above variables for your system. Also ensure you've built openssl-android
function build_one
{
set -e
make clean
ln -s ${SYSROOT}usr/lib/crtbegin_so.o
ln -s ${SYSROOT}usr/lib/crtend_so.o
export XLDFLAGS="$ADDI_LDFLAGS -L${OPENSSL_DIR}libs/armeabi -L${SYSROOT}usr/lib "
export CROSS_COMPILE=$TOOLCHAIN/bin/arm-linux-androideabi-
export XCFLAGS="${ADDI_CFLAGS} -I${OPENSSL_DIR}include -isysroot ${SYSROOT}"
export INC="-I${SYSROOT}"
make prefix=\"${PREFIX}\" OPT= install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one
*在我的好朋友Chris的大力帮助下。