金阁寺在哪里:[opencore/openmax

来源:百度文库 编辑:九乡新闻网 时间:2024/05/02 12:39:05

[转的]如何打开opencore/openmax里的log及如何编译opencore时显示命令

2011-05-19 07:5034人阅读评论(0)收藏举报

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

PVLOGGER_INST_LEVEL 全部定义为5

PVLOGGER_ENABLE 全部定义为1

2.在/sdcard/建立一个文件 pvlogger.txt,将8写入,echo 8 >/sdcard/pvlogger.txt

但是这里有个问题,就是按照上述步骤更改以后编译出来的库,其他地方的log全部能打印,但是component里面的却没法打印。

根据opencore的邮件组,component里面的PVLOGGER_LOGMSG方式无法将消息正常打印出来,是由一个bug引起的。

我们有一个walk around。

采用LOGE来打印debug信息。

具体做法是包含log.h,logd.h,android_log.h,uio.h文件到你的文件夹中,在你的文件中加入

#define LOG_TAG "xxxx"

#include "log.h"

然后用LOGE打印,即可。

如何在自己编译opencore的时候显示命令

opencore默认make的时候不会显示gcc的命令。

make SHOW_CMDS=1

=========================================================================================

首先看一下文件pv_omxdefs.h(androidsrc/external/opencore/codecs_v2/omx /omx_common/include).有以下内容:

//Enable/disable this switch to build the workspace with or without proxy
// 1 – Enable,  0 – disable
// 1 – Multithreaded, 0 – AO
#define PROXY_INTERFACE 1 

#define PROFILING_ON 0 

#if PROFILING_ON

#if PROXY_INTERFACE
#undef PROXY_INTERFACE
#endif

#endif

#if (PROXY_INTERFACE) && (PVLOGGER_INST_LEVEL>0)
// Logging in pv omx components that run in separate threads can only be done by sending a log into
// a separate file. The file is created and logging works unless built for release mode
// By default – logging for multi-threaded components is ON in dbg build
// TO DISABLE LOGGING IN OMX COMPONENTS – SET THE #define below to 0 
#define PV_OMX_LOGGER_OUTPUT 0 
#endif

#define PROFILING_ON 0设置为1,改为:

#define PROXY_INTERFACE 0 

#define PROFILING_ON 1

再看logcat,打印信息就如愿出来。这样就可以使用opencore自己的PVLOGGER_LOGMSG添加打印信息了,