ijkplayer-android 移植与调试日志

  • Post author:
  • Post category:其他





step 1:



git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android



cd ijkplayer-android



git checkout -B latest k0.8.4






cd config



rm module.sh



ln -s module-default.sh module.sh



#以上是默认的设置,也可以使用



# ln -s module-lite.sh module.sh



step 2: 下载更新android-ndk



在C:\cygwin\home\Administrator\.profile文件尾添加



export ANDROID_SDK=E:/AS_install/sdk



export ANDROID_NDK=E:/AS_install/android-ndk-r10e



export PATH=$PATH:$ANDROID_SDK:$ANDROID_NDK:$ANDROID_SDK/platform-tools/



然后 source C:\cygwin\home\Administrator\.profile



step 3: 编译ijkplayer



./init-android.sh



cd android/contrib



./compile-ffmpeg.sh clean



./compile-ffmpeg.sh all或 ./compile-ffmpeg.sh armv7a






#编译ijkplayer



cd ..



./compile-ijk.sh armv7a


出现的问题及解决办法:


由于ijkplayer编译出来只有一个.so文件,要更改文件(屏蔽以下):

C:\cygwin\home\Administrator\ijkplayer-android\android\compile-ijk.sh

do_sub_cmd () {


SUB_CMD=$1



#moved by yanhongfei

if [ -L “./android-ndk-prof” ]; then

rm android-ndk-prof

fi

#if [ “$PARAM_SUB_CMD” = ‘prof’ ]; then

#    echo ‘profiler build: YES’;

#    ln -s ../../../../../../ijkprof/android-ndk-profiler/jni android-ndk-prof

#else

#    echo ‘profiler build: NO’;

#    ln -s ../../../../../../ijkprof/android-ndk-profiler-dummy/jni android-ndk-prof

#fi

case $SUB_CMD in

prof)

$ANDROID_NDK/ndk-build $FF_MAKEFLAGS

;;

clean)

$ANDROID_NDK/ndk-build clean

;;

rebuild)

$ANDROID_NDK/ndk-build clean

$ANDROID_NDK/ndk-build $FF_MAKEFLAGS

;;

*)

$ANDROID_NDK/ndk-build $FF_MAKEFLAGS

;;

esac

}

在文件C:\cygwin\home\Administrator\ijkplayer-android\android\ijkplayer\ijkplayer-armv7a\src\main\jni\Android.mk尾添加:

include C:/cygwin/home/Administrator/ijkplayer-android/ijkmedia/*.mk

include C:/cygwin/home/Administrator/ijkplayer-android/ijkprof/android-ndk-profiler-dummy/jni/*.mk



版权声明:本文为yanhongfei268原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。