ijkplayer打包支持https的so

Build android

git clone [https://github.com/Bilibili/ijkplayer.git](https://github.com/Bilibili/ijkplayer.git) ijkplayer-android

cd ijkplayer-android

git checkout -B latest k0.8.8

创建更小的jar

cd config

rm [module.sh](http://module.sh)

ln -s [module-lite.sh](http://module-lite.sh) [module.sh](http://module.sh)

cd android/contrib

进入工程根目录

cd ijkplayer 

//checkout ffmpeg 源码,默认从https://github.com/Bilibili/FFmpeg.git checkout

./init-android.sh

//checkout openssl code,增加 https 协议支持需要用到该库。
checkout openssl android源码,默认从https://github.com/Bilibili/openssl.git checkout

./init-android-openssl.sh

编译 openssl

// 首先 cd 到 ijkplayer/android/contrib 目录下,Android下编译脚本就放在该目录下

cd android/contrib

// 编译 openssl

./compile-openssl.sh clean 

./compile-openssl.sh all

编译 ffmpeg

./compile-ffmpeg.sh clean 

./compile-ffmpeg.sh all

编译 ijkplayer native code

// 返回到 ijkplayer/android 目录

cd .. 

// 编译生成各CPU架构的so,如果不加 all 默认只生成 armv7a 架构的 so
// 编译指定架构的so:compile-ijk.sh armv7a,具体参考 .sh 文件中的 Usage

./compile-ijk.sh all

编译完成后 so 就放在 ijkplayer/android/ijkplayer/ijkplayer-xxx/src/main/libs 目录下。此时编译好的 so 是支持 https 协议的。

获取已经编译好的so,请点击

转载请注明出处,有问题和想法,欢迎私信或者评论留言,一起学习,一起进步!

    原文作者:wish_xy
    原文地址: https://www.jianshu.com/p/716766154ef6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞