Playing real-time video on Android requires SDL to do the framework, ffmpeg to do the core. The direct JNI ffmpeg will be OK, I won't be Android
There are two problems, Ffmpeg,vs can not be compiled; virtual machine (Ubuntu) running simulator very card
Then the virtual machine creates Macintosh FFmpeg, this machine running simulator
"Virtual Machine"
Download Ndk8, my Ubuntu is 10.04,GCC version too low, can't open ndk9. Bin,
[Compiling arm version of FFmpeg]
#!/bin/bash
Ndk=/home/mynamepfd/android/ndk8
sysroot= $NDK/platforms/android-14/arch-arm
toolchain= $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86
function Build_one
{
./configure \
--prefix= $PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--cross-prefix= $TOOLCHAIN/bin/arm-linux-androideabi-\
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot= $SYSROOT \
--extra-cflags= "-os-fpic $ADDI _cflags" \
--extra-ldflags= "$ADDI _ldflags" \
$ADDITIONAL _configure_flag
Make clean
Make
Make install
}
Cpu=arm
prefix=$ (PWD)/android/$CPU
Addi_cflags= "-marm"
Build_one
"Native Environment"
Download Jdk,eclipse, install ADT offline, make sure you have the latest version, or you can't open the SDK with the NDK, and you can't update it.
Copy the FFmpeg from Ubuntu to the jni of SDL's Android-project,
Android Live video