希望能够打印Ijkplayer在各个阶段运行时的时间,以此为标准进行优化
git clone https://github.com/Bilibili/ijkplayer.git
~/.bash_profile
或者~/.profile
文件中,加入路径配置# add these lines to your ~/.bash_profile or ~/.profile
export ANDROID_SDK=<your sdk path>
export ANDROID_NDK=<your ndk path>
在添加完路径后,需要使用时,需要在Termianl中输入
source ~/.bash_profile
让当前路径在Terminal中生效,否则无法找到NDK路径
./ijkplayer/init-android.sh
,该脚本主要下载了ffmpeg的源码,并且将其clone到extra目录下cd config
rm module.sh
ln -s module-default.sh module.sh
在module.sh
中可以选择要编译的配置
Options
cd android/contrib/
./compile-ffmpeg.sh clean
:清理ffmpeg的目录
./compile-ffmpeg.sh all
:编译所有架构的ffmpeg库
cd ..
./compile-ijk.sh all
:编译所有版本的ijkplayer编译完成
ijkplayer最好用ndk-r10e来进行编译,否则会出现很多Cmake等等问题
/android/ijkplayer
工程,配置一下Gradle版本ijkplayer-example
即可