ShikinChen / ijkplayer-android

基于b站的https://github.com/bilibili/ijkplayer 升级到FFmpeg6
GNU General Public License v2.0
14 stars 12 forks source link

请问如何编译到so文件 #2

Open Warren-W opened 1 week ago

ShikinChen commented 5 days ago

你是说将ffmpeg编译成so?好像我尝试过,好像报一些arm64还是armv7一些错,忘记具体是什么,后面还是改回用静态库

davikl commented 2 days ago

我说我编译静态库,怎么少这少那 /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/aacsbr_template.c:412: error: undefined reference to 'log2f' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/aacsbr_template.c:457: error: undefined reference to 'log2f' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/aacsbr_template.c:604: error: undefined reference to 'log2f' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/mediacodec_surface.c:47: error: undefined reference to 'ANativeWindow_acquire' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/mediacodec_surface.c:73: error: undefined reference to 'ANativeWindow_release' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/mediacodec_wrapper.c:2296: error: undefined reference to 'ANativeWindow_release' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/mediacodec_wrapper.c:2319: error: undefined reference to 'ANativeWindow_fromSurface' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/v4l2_buffers.c:537: error: undefined reference to 'mmap64' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavformat/hls.c:918: error: undefined reference to 'atof' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavformat/hls.c:905: error: undefined reference to 'strtof' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavformat/hlsproto.c:139: error: undefined reference to 'atof' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavutil/file.c:97: error: undefined reference to 'mmap64' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavutil/hwcontext_mediacodec.c:100: error: undefined reference to 'ANativeWindow_release' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavutil/mem.c:105: error: undefined reference to 'posix_memalign' /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavutil/arm/cpu.c:58: error: undefined reference to 'getauxval' clang90: error: linker command failed with exit code 1 (use -v to see invocation) davik@ubuntu:~/Desktop/ijkplayer-android_ffmpeg6/android/contrib$ cat /home/davik/Desktop/ijkplayer-android_ffmpeg6/extra/ffmpeg/libavcodec/aacsbr_template.c

ShikinChen commented 1 day ago

编译时候 export ANDROID_NDK的版本是r27?

davikl commented 1 day ago

所有版本都一样 21-27 都试过

ShikinChen commented 1 day ago

试下更新一下代码 我在脚本加上 -lm 我在ubuntu 22.04没出现这个问题