【ijkplayer】Demo調試

項目需要整合ijkplayer這一播放器,簡單研究了一下github下載下來的Demo,略經調試,發現github的版本還是有些小坑,故作記錄。

Github鏈接:
https://github.com/bilibili/ijkplayer
官網給出的Demo運行步驟
以上就是github給出的調試步驟。

其中容易報錯的亮點:

1、緩存問題:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
 
fatal: The remote end hung up unexpectedly
 
fatal: early EOF
 
fatal: index-pack failed

因爲curl的postBuffer的默認值太小,我們需要調整它的大小,在終端重新配置大小。

解決方法在於:

git config --global http.postBuffer 524288000

然後輸入,查看是否生效。

git config --list

2、編譯問題(libavutil/imgutils.h問題)

參考了網上教程,應該是編譯ffmpeg過程出了問題。

解決方法在於:

找到compile-ffmpeg.sh
在這裏插入圖片描述
調出終端輸入vim以及文件路徑,進入編輯狀態。

刪除掉其中IOS8_SDK中對應的armv7字段,保存。

修改完成後cd到/(路徑)/ijkplayer-ios/ios中,執行

./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

即可完美運行。

參考資料:
1、https://stackoverflow.com/questions/38618885/error-rpc-failed-curl-transfer-closed-with-outstanding-read-data-remaining
2、https://www.jianshu.com/p/8d10850add80

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章