FFMPEG 添加 Android log, 能用 logcat 打出来, 便于调试
在需要加 log 的文件中, 添加一些头文件即可, 例如在 allformats.c 文件中的函数 av_register_all 中打 log
- #include <Android/log.h>
- #define LOGE(format, ...) __android_log_print(ANDROID_LOG_ERROR, "wenfengtou", format, ##__VA_ARGS__)
- #define LOGI(format, ...) __android_log_print(ANDROID_LOG_INFO, "wenfengtou", format, ##__VA_ARGS__)
- void av_register_all(void)
- {
- LOGE("wenfengtou av_register_all");
- ff_thread_once(&av_format_next_init, av_format_init_next);
- }
结果如下:
image.PNG
来源: http://www.jianshu.com/p/14c85d25f31f