diff --git a/_studio/shared/include/mfx_utils.h b/_studio/shared/include/mfx_utils.h index bab156a8..740c4925 100644 --- a/_studio/shared/include/mfx_utils.h +++ b/_studio/shared/include/mfx_utils.h @@ -92,7 +92,7 @@ static inline T mfx_sts_trace(const char* fileName, const uint32_t lineNum, cons #define MFX_FAILED(sts) (MFX_STS_TRACE(sts) != MFX_ERR_NONE) #define MFX_RETURN(sts) { return MFX_STS_TRACE(sts); } #define MFX_RETURN_IF_ERR_NONE(sts) { if (MFX_SUCCEEDED(sts)) return MFX_ERR_NONE; } -#define MFX_CHECK(EXPR, ERR) { if (!(EXPR)) MFX_RETURN(ERR); } +#define MFX_CHECK(EXPR, ERR) { if (!(EXPR)) { MFX_TRACE_S("MFX_CHECK false!") MFX_RETURN(ERR); }} #define MFX_CHECK_NO_RET(EXPR, STS, ERR){ if (!(EXPR)) { std::ignore = MFX_STS_TRACE(ERR); STS = ERR; } } diff --git a/_studio/shared/mfx_trace/src/mfx_trace.cpp b/_studio/shared/mfx_trace/src/mfx_trace.cpp index 50b4392d..081433c5 100644 --- a/_studio/shared/mfx_trace/src/mfx_trace.cpp +++ b/_studio/shared/mfx_trace/src/mfx_trace.cpp @@ -313,7 +313,7 @@ mfxTraceU32 mfx_trace_get_category_index(mfxTraceChar* category, mfxTraceU32& in inline bool MFXTrace_IsPrintableCategoryAndLevel(mfxTraceU32 m_OutputInitilized, mfxTraceU32 level) { - bool logFlag = false; + bool logFlag = true; if (m_OutputInitilized == MFX_TRACE_OUTPUT_TEXTLOG) { #ifndef NDEBUG if (g_Level == MFX_TXTLOG_LEVEL_MAX) @@ -400,7 +400,7 @@ mfxTraceU32 MFXTrace_Init() g_OutputMode = 0; for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (output_mode & g_TraceAlgorithms[i].m_OutputMask) + if (1) { sts = g_TraceAlgorithms[i].m_InitFn(); if (sts == 0) @@ -434,7 +434,7 @@ mfxTraceU32 MFXTrace_Close(void) for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (g_OutputMode & g_TraceAlgorithms[i].m_OutputInitilized) + if (1) { res = g_TraceAlgorithms[i].m_CloseFn(); if (!sts && res) sts = res; @@ -460,7 +460,7 @@ mfxTraceU32 MFXTrace_SetLevel(mfxTraceChar* category, mfxTraceLevel level) for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (g_OutputMode & g_TraceAlgorithms[i].m_OutputInitilized) + if (1) { res = g_TraceAlgorithms[i].m_SetLevelFn(category, level); if (!sts && res) sts = res; @@ -484,7 +484,7 @@ mfxTraceU32 MFXTrace_DebugMessage(mfxTraceStaticHandle *static_handle, va_start(args, format); for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (g_OutputMode & g_TraceAlgorithms[i].m_OutputInitilized) + if (1) { if (!MFXTrace_IsPrintableCategoryAndLevel(g_TraceAlgorithms[i].m_OutputInitilized, level)) continue; @@ -515,7 +515,7 @@ mfxTraceU32 MFXTrace_vDebugMessage(mfxTraceStaticHandle *static_handle, for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (g_OutputMode & g_TraceAlgorithms[i].m_OutputInitilized) + if (1) { if (!MFXTrace_IsPrintableCategoryAndLevel(g_TraceAlgorithms[i].m_OutputInitilized, level)) continue; @@ -552,7 +552,7 @@ mfxTraceU32 MFXTrace_BeginTask(mfxTraceStaticHandle *static_handle, for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (g_OutputMode & g_TraceAlgorithms[i].m_OutputInitilized) + if (1) { if (!MFXTrace_IsPrintableCategoryAndLevel(g_TraceAlgorithms[i].m_OutputInitilized, level)) continue; @@ -593,7 +593,7 @@ mfxTraceU32 MFXTrace_EndTask(mfxTraceStaticHandle *static_handle, for (i = 0; i < sizeof(g_TraceAlgorithms)/sizeof(mfxTraceAlgorithm); ++i) { - if (g_OutputMode & g_TraceAlgorithms[i].m_OutputInitilized) + if (1) { if (!MFXTrace_IsPrintableCategoryAndLevel(g_TraceAlgorithms[i].m_OutputInitilized, level)) continue; diff --git a/_studio/shared/mfx_trace/src/mfx_trace_textlog.cpp b/_studio/shared/mfx_trace/src/mfx_trace_textlog.cpp index cc67e1ab..554088b5 100644 --- a/_studio/shared/mfx_trace/src/mfx_trace_textlog.cpp +++ b/_studio/shared/mfx_trace/src/mfx_trace_textlog.cpp @@ -24,7 +24,7 @@ extern "C" { -#define MFT_TRACE_PATH_TO_TEMP_LIBLOG MFX_TRACE_STRING("/tmp/mfxlib.log") +#define MFT_TRACE_PATH_TO_TEMP_LIBLOG MFX_TRACE_STRING("/data/local/tmp/mfx-gen.log") #include #include "mfx_trace_utils.h" @@ -91,8 +91,8 @@ mfxTraceU32 MFXTraceTextLog_Init() sts = MFXTraceTextLog_Close(); if (!sts) sts = MFXTraceTextLog_GetRegistryParams(); std::string StrPid = "/mfxlib_Pid"; - std::string filename_path = VplLogPath + StrPid + std::to_string(getpid()) + "_Tid" + std::to_string(pthread_self()) + ".log"; - strncpy(g_mfxTracePrintfFileName,filename_path.c_str(), MAX_PATH - 1); + // std::string filename_path = VplLogPath + StrPid + std::to_string(getpid()) + "_Tid" + std::to_string(pthread_self()) + ".log"; + // strncpy(g_mfxTracePrintfFileName,filename_path.c_str(), MAX_PATH - 1); g_mfxTracePrintfFileName[MAX_PATH - 1] = 0; if (!sts) diff --git a/_studio/shared/mfx_trace/src/mfx_trace_utils_linux.cpp b/_studio/shared/mfx_trace/src/mfx_trace_utils_linux.cpp index 64af175b..489c7ade 100644 --- a/_studio/shared/mfx_trace/src/mfx_trace_utils_linux.cpp +++ b/_studio/shared/mfx_trace/src/mfx_trace_utils_linux.cpp @@ -74,7 +74,7 @@ FILE* mfx_trace_open_conf_file(const char* name) std::stringstream ss; #if defined(ANDROID) - const char* home = "/data/data/com.intel.vtune/mediasdk"; + const char* home = "/data/local"; #else const char* home = getenv("HOME"); #endif