编译ffmpeg.c并通过JNI调用它的main()

时间:2011-03-23 22:58:00

标签: c++ android c ffmpeg java-native-interface

我在Android上构建了FFmpeg。我试图通过JNI调用ffmpeg.c中的main()并传递它所期望的参数,从命令行开始。当我将ffmpeg.c文件添加到我的android.mk时,我得到了一些错误,可以通过在顶部注释出“#if HAVE_SYS_RESOURCE_H”行来轻松修复,这样就可以引入一对包含。之后我现在有了所有指向“cmdutils.h”的未定义引用错误包括。以下是我的一些编译错误......

/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_audio_channels':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2770: undefined reference to `parse_number_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_audio_rate':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2764: undefined reference to `parse_number_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_me_threshold':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2523: undefined reference to `parse_number_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_thread_count':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2744: undefined reference to `parse_number_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_verbose':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2529: undefined reference to `parse_number_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_bitrate':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2546: undefined reference to `opt_default'
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2548: undefined reference to `avcodec_opts'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_rec_timestamp':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2906: undefined reference to `parse_time_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_input_ts_offset':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2912: undefined reference to `parse_time_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_start_time':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2900: undefined reference to `parse_time_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `opt_recording_time':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:2894: undefined reference to `parse_time_or_die'
/home/kieran/workspace/VideoEditor//obj/local/armeabi/objs/ffmpeg/ffmpeg.o: In function `show_help':
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:3719: undefined reference to `show_help_options'
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:3721: undefined reference to `show_help_options'
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:3724: undefined reference to `show_help_options'
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:3727: undefined reference to `show_help_options'
/home/kieran/workspace/VideoEditor//jni/ffmpeg/ffmpeg.c:3730: undefined reference to `show_help_options'

0 个答案:

没有答案