After two days of migration, ffmpeg0.7.6 to adnroid is successfully transplanted. The following problems are encountered during the transplantation process. Please indicate the source.
Tools:
Ffmpeg-0.7.6
Android-ndk-r4b
Ubuntu 10.11
Path: Root \ Android \ android-ndk-r4b \ samples \ FFMPEG \ JNI \ ffmpeg-0.7.6
Notes for porting:
1: Delete all static methods before libavutil/libm. h.
2: modify some of the following flags in the config. h file after./config. Sh is executed in the ffmpeg-0.7.6:
Sed-I's/have_lrint 0/have_lrint 1/G' config. h
Sed-I's/have_lrintf 0/have_lrintf 1/G' config. h
Sed-I's/have_round 0/have_round 1/G' config. h
Sed-I's/have_roundf 0/have_roundf 1/G' config. h
Sed-I's/have_truncf 0/have_truncf 1/G' config. h
Sed-I's/have_symver 1/have_symver 0/G' config. h
Sed-I's/have_trunc 0/have_trunc 1/G' config. h
Sed-I's/# define restrict/G' config. h
3: the following error occurs:
/Home/chf0001/Android-ndk/android-ndk-r5/samples/FFMPEG/obj/local/armeabi/libavutil. A (inverse. o ):(. rodata + 0x0): Multiple definition of 'ff _ inverse'
/Home/chf0001/Android-ndk/android-ndk-r5/samples/FFMPEG/obj/local/armeabi/libavcodec. A (inverse. o ):(. rodata + 0x0): first defined here
Directly modify libavcodec/makefile and delete the following line:
Objs-$ (! Config_small) + = inverse. o
4: delete the following two makefile files in libavutil, libavcodec, libavformat, libavfilter, libpostproct, and libswscale respectively:
Include $ (subdir) ../subdir. Mak
Include $ (subdir) ../config. Mak
5: Remember to create Av. mk under ffmpeg-0.7.6
6: if the last FFMPEG. So generated with the ndk-r4b is 1.6 K, you need to add the whole_satatic_libraries definition in the build/CORE/build-binary.mk
7: The above points must be correct and correct. If an error occurs, the encoding fails, and the FFmpeg is normal. so> = 3.2m. the above reasons are not mentioned. this is my summary of the issues that have occurred over the past two days. I hope this will help you. Next I will upload the android files under various directories. mk. if your environment is the same as mine, you can use it directly.
Android. mk file address