diff --git a/README.md b/README.md new file mode 100644 index 0000000..480bad7 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# liveMedia for Android +This is a port of live555's liveMedia library for Android. The original library is available [here][1]. Tested on Mac OS X 10.7 with Android NDK r6. + +## Instructions +To build the library for Android, follow the following steps: + +1. Edit your `.bashrc` or `.bash_profile` file and insert the following line: `export NDK_ROOT='/path/to/android-ndk-r6/'` +2. `cd` into the `live` directory +3. Execute `./android.sh` +4. Retrieve your shared/static libraries from `BasicUsageEnvironment`, `groupsock`, `liveMedia`, and `UsageEnvironment` +5. Use the libraries as prebuilt libraries in the jni folder of your Android project. Instructions on how to do that are available at [my blog][2]. + +To clean the directory, issue the following commands: + +```shell +$ make clean +``` + +## Feedback + +Please direct all questions, bug reports, and feedback about the porting process to jim@*NO-SPAM*jh-lim.com; likewise, please direct all questions regarding the liveMedia library to [live555][3]. + +## What I did + +* Wrote `android.sh` +* Wrote `config.android` +* Edited `RTSPServerSupportingHTTPStreaming.cpp` and added casts from `unsigned int` to `time_t` +* Edited `Locale.cpp` and added `#include ` +* Edited `GroupsockHelper.cpp` and removed `s_addr` from inet structs + + [1]: http://www.live555.com/liveMedia/ + [2]: http://blog.jh-lim.com/2011/06/compiling-open-source-libraries-for-android-part-1/ + [3]: http://www.live555.com/liveMedia/ diff --git a/android.sh b/android.sh index f0957bf..82468f3 100755 --- a/android.sh +++ b/android.sh @@ -1,4 +1,7 @@ #!/bin/sh +# +# Builds libraries for Android +# Written by Jiunn Haur Lim export PATH="${NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/:${PATH}" @@ -9,41 +12,4 @@ export LD="${PREF}ld --sysroot=${SYS_ROOT}" ./genMakefiles android make -# SYS_ROOT="${NDK_ROOT}/platforms/android-8/arch-arm" -# PREF="arm-linux-androideabi-" -# -# OUT_DIR="`pwd`/android-build" -# C_FLAGS="-lstdc++ -lsupc++ \ -# -I${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/include \ -# -I${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include \ -# -L${NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/libs/armeabi" -# -# set -e -# -# export CC="${PREF}gcc --sysroot=${SYS_ROOT}" -# export CXX="${PREF}g++ --sysroot=${SYS_ROOT}" -# export LD="${PREF}ld --sysroot=${SYS_ROOT}" -# export CPP="${PREF}cpp --sysroot=${SYS_ROOT}" -# export AS="${PREF}as --sysroot=${SYS_ROOT}" -# export OBJCOPY="${PREF}objcopy" -# export OBJDUMP="${PREF}objdump" -# export STRIP="${PREF}strip" -# export RANLIB="${PREF}ranlib" -# export CCLD="${PREF}gcc --sysroot=${SYS_ROOT}" -# export AR="${PREF}ar" -# -# cmake \ -# -DCMAKE_SYSTEM_NAME="Generic" \ -# -DCMAKE_CXX_FLAGS="${C_FLAGS}"\ -# -DCMAKE_FIND_ROOT_PATH="${SYS_ROOT}" \ -# -DCMAKE_INSTALL_PREFIX="${OUT_DIR}" . && \ -# -# make && \ -# make install -# -# cd ${OUT_DIR}/lib && \ -# ${AR} -x libjthread.a && \ -# ${CXX} ${C_FLAGS} -shared -Wl,-soname,libjthread.so -o libjthread.so *.obj && \ -# rm *.obj - exit 0 \ No newline at end of file