Chinaunix首页 | 论坛 | 博客
  • 博客访问: 355544
  • 博文数量: 107
  • 博客积分: 927
  • 博客等级: 大尉
  • 技术积分: 865
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-13 17:50
文章分类

全部博文(107)

文章存档

2014年(2)

2013年(13)

2012年(16)

2011年(76)

分类: Java

2011-06-29 13:32:21

After searching a lot over the Internet to capture the logs for Packet Video Multimedia framework, the following things are concluded, though I am still not able to capture the log in pvlogger.txt file.

Most of the people mentioned to compile with ENABLE_PV_LOGGING=1 option compilation for Android platform with /sdcard/pvlogger.txt. It was also mentioned to write [Log Level] [Node to log] in the pvlogger.txt. Under the heaven, I was still clueless to see a single log.

The most important part of source exists in external\opencore\android\thread_init.cpp, where it checks PVLOGGER_INST_LEVEL and then includes android_logger_config.h which has the logger class. Therefore, add “#define PVLOGGER_INST_LEVEL 5″ in this file and create pvlogger.txt file with 8 in it. You can see the log. Enjoy!!

1.将文件 external/opencore/oscl/oscl/osclbase/src/pvlogger.h 里

PVLOGGER_INST_LEVEL 全部定义为5

PVLOGGER_ENABLE 全部定义为1

patch 文件如下

diff --git a/external/opencore/oscl/oscl/osclbase/src/pvlogger.h b/external/opencore/oscl/oscl/osclbase/src/pvlogger.h
index 7f381ec..074c19a 100644
--- a/external/opencore/oscl/oscl/osclbase/src/pvlogger.h
+++ b/external/opencore/oscl/oscl/osclbase/src/pvlogger.h
@@ -128,7 +128,7 @@ const int32 PVLOGGER_LEVEL_UNINTIALIZED = -1;
 #ifndef PVLOGGER_INST_LEVEL
 #if defined(NDEBUG)
 /* Release mode-- No logging */
-#define PVLOGGER_INST_LEVEL 0
+#define PVLOGGER_INST_LEVEL 5
 #else
 /* Debug mode-- Complete logging */
 #define PVLOGGER_INST_LEVEL 5
@@ -347,7 +347,7 @@ const int32 PVLOGGER_LEVEL_UNINTIALIZED = -1;
  */
 #ifndef PVLOGGER_ENABLE
 #if (PVLOGGER_INST_LEVEL<1)
-#define PVLOGGER_ENABLE 0
+#define PVLOGGER_ENABLE 1
 #else
 #define PVLOGGER_ENABLE 1
 #endif

2.在/sdcard/建立一个文件 pvlogger.txt,将8写入,然后重新编译,logcat就能将PV的log打印出来了

阅读(1272) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~