系統: Ubuntu 14.04.2 LTS 64bit

1.安裝ant
sudo apt-get install ant
如果出現一堆套件無法取得的資訊就先執行sudo apt-get update在執行上面指令

2.安裝android sdk
3.安裝android ndk
4.下載openh264原始碼,解開目錄放好,根據最以下英文說明資料設好NDK和SDK目錄

5.去openh264目錄執行 make OS=android NDKROOT=**ANDROID_NDK** TARGET=**ANDROID_TARGET**

因為我的SDK和NDK都設好在/etc/profile裡了,所以我這裡是執行make OS=android TARGET=android-15,

更詳細操作請見 https://github.com/cisco/openh264/blob/master/README.md

To build for android platform, You need to install android sdk and ndk. You also need to export **ANDROID_SDK**/tools to PATH. On Linux, this can be done by

export PATH=**ANDROID_SDK**/tools:$PATH
The codec and demo can be built by

make OS=android NDKROOT=**ANDROID_NDK** TARGET=**ANDROID_TARGET**
Valid **ANDROID_TARGET** can be found in **ANDROID_SDK**/platforms, such as android-12. You can also set ARCH, NDKLEVEL according to your device and NDK version. ARCH specifies the architecture of android device. Currently arm, arm64, x86 and x86_64 are supported, the default is arm. (mips and mips64 can also be used, but there's no specific optimization for those architectures.) NDKLEVEL specifies android api level, the api level can be 12-19, the default is 12.

By default these commands build for the armeabi-v7a ABI. To build for the other android ABIs, add ARCH=arm64, ARCH=x86, ARCH=x86_64, ARCH=mips or ARCH=mips64. To build for the older armeabi ABI (which has armv5te as baseline), add APP_ABI=armeabi (ARCH=arm is implicit).

arrow
arrow
    文章標籤
    ubuntu openh264
    全站熱搜

    大衛的記事 發表在 痞客邦 留言(0) 人氣()