Librtmp is a powerful rtmp open Source Library, a recent Android project involving RTMP and other technologies, before using FFMEPG used it, At that time it was just as a module to compile librtmp as a third-party library into FFmpeg (FFmpeg itself also supports rtmp).
What you need to do to get librtmp ported to Android:
1. Prepare the NDK and configure the environment variables
2. Of course it's ready for LIBRTMP's installation package.
clone git://git.ffmpeg.org/rtmpdump
The next step is to propose some of the NDK's compilation tools for the build environment under the Android platform, such as ARM-LINUX-ANDROIDEABI-GCC, etc.
/home/android-ndk-r10e/build/tools/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.8 --platform=android-14 --install-dir=/home/lide/work/lide/lide
Setting environment variables
PATH=/home/lide/work/lide/lide/bin:$PATH
source /etc/profile
Download polarssl-1.2.14 (mbed TLS (formerly known as POLARSSL)) it is best to download this version, or the bottom of the compilation librtmp when the error. There's latest updates in the lower right corner of the https://tls.mbed.org/version.
The comments in the include/polarssl/config.h are #define POLARSSL_HAVEGE_C removed before compiling, otherwise the Havege_random ' error occurs when compiling the librtmp undefined reference to , because the Havege module is closed by default for Polarssl.
CCAPPSDESTDIR=/home/lide/work/lide/lide/sysroot
Compile (librtmp as a dynamic library)
make SYS=android CROSS_COMPILE=arm-linux-androideabi- INC="-I/home/lide/work/lide/lide/sysroot/include" CRYPTO=POLARSSL
If you want to use Librtmp's static library, use the
make SYS=android CROSS_COMPILE=arm-linux-androideabi- INC="-I/home/lide/work/lide/lide/sysroot/include" CRYPTO=POLARSSL SHARED=
At this point, you've got Librtmp's Android repository, and then you can do it under Android. The next section introduces the use of the JNI for Android, start the Android C Tour ~ ~ ~ ~
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Compiling librtmp for Android