hi, i create a script to parse ffmpeg makefile and generate file list for android makefile. and i configure the source as following: ./configure \ --enable-hardcoded-tables \ --enable-cross-compile \ --cross-prefix=arm-none-linux-gnueabi- \ --arch=armv6j \ --cpu=arm1136jf-s \ --target-os=linux \ --enable-pic after configuration, following changes should apply to config.h if android toolchain is not used for generating config.h 1. android cross compiler does not understand "restrict" 2. no log2 and log2f in bionic libm.so 3. soundcard.h is located in linux/soundcard.h 4. no posix_memalign and then i created a NDK project to work with it, it should work, but... SharedLibrary : libffmpeg.so /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `avcodec_get_sample_fmt_name': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:48: multiple definition of `avcodec_get_sample_fmt_name' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:48: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `avcodec_get_sample_fmt': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:55: multiple definition of `avcodec_get_sample_fmt' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:55: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `avcodec_sample_fmt_string': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:65: multiple definition of `avcodec_sample_fmt_string' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:65: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `avcodec_guess_channel_layout': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:91: multiple definition of `avcodec_guess_channel_layout' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:91: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `avcodec_get_channel_layout_string': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:125: multiple definition of `avcodec_get_channel_layout_string' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:125: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `avcodec_channel_layout_num_channels': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:154: multiple definition of `avcodec_channel_layout_num_channels' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:154: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `av_audio_convert_alloc': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:170: multiple definition of `av_audio_convert_alloc' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:170: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `av_audio_convert_free': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:184: multiple definition of `av_audio_convert_free' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:184: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavfilter/avfilter.o: In function `av_audio_convert': /home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:191: multiple definition of `av_audio_convert' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/audioconvert.o:/home/luka/Eclipse/workspace/danmaku/jni/ffmpeg/libavcodec/audioconvert.c:191: first defined here /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavutil/inverse.o:(.rodata+0x0): multiple definition of `ff_inverse' /home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/objs/ffmpeg/libavcodec/inverse.o:(.rodata+0x0): first defined here collect2: ld returned 1 exit status make: *** [/home/luka/Eclipse/workspace/danmaku/obj/local/armeabi/libffmpeg.so] エラー 1 i can't get it resolved, plz help.
-- language: Chinese, Japanese, English -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting
ffmpeg.rb
Description: application/ruby