Cross compiling librtmp for Android

Is there anyone who successfully uses cross-compiled librtmp for the Android platform? I know that rtmpdump android download includes librtmp.so, but I think I need librtmp.a as well (I'm trying to cross-compile ffmpeg with librtmp support).

Is anyone lucky with this? It made me bonkers ...

That

Dan

+5
source share
2 answers

* librtmp Android, Guardian Project OpenSSL repo. .

, OpenSSL GuardianProject, script 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.

+1

All Articles