Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiunn Haur Lim committed Aug 8, 2011
1 parent 9fc87b3 commit 0c18fdd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 <cstring>`
* 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/
40 changes: 3 additions & 37 deletions android.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
#
# Builds libraries for Android
# Written by Jiunn Haur Lim <jim@jh-lim.com>

export PATH="${NDK_ROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/:${PATH}"

Expand All @@ -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

0 comments on commit 0c18fdd

Please sign in to comment.