shithub: openh264

Download patch

ref: 5eb18b101e590a572f478c1de764f3d31688f2aa
parent: cce1c2984436b2bdf0dd463fa691598b6df31d34
author: sijchen <sijchen@cisco.com>
date: Wed Jan 13 17:13:43 EST 2016

change the output way of debug trace

--- a/codec/common/src/WelsThreadPool.cpp
+++ b/codec/common/src/WelsThreadPool.cpp
@@ -133,7 +133,7 @@
 }
 
 void CWelsThreadPool::ExecuteTask() {
-  //printf("ThreadPool: schedule tasks\n");
+  //fprintf(stdout, "ThreadPool: schedule tasks\n");
   CWelsTaskThread* pThread = NULL;
   IWelsTask*    pTask = NULL;
   while (GetWaitedTaskNum() > 0) {
@@ -142,7 +142,7 @@
       break;
     }
     pTask = GetWaitedTask();
-    //printf("ThreadPool:  ExecuteTask = %x at thread %x\n", pTask, pThread);
+    //fprintf(stdout, "ThreadPool:  ExecuteTask = %x at thread %x\n", pTask, pThread);
     pThread->SetTask (pTask);
   }
 }
@@ -150,12 +150,12 @@
 WELS_THREAD_ERROR_CODE CWelsThreadPool::QueueTask (IWelsTask* pTask) {
   CWelsAutoLock  cLock (m_cLockPool);
 
-  //printf("ThreadPool:  QueueTask = %x\n", pTask);
+  //fprintf(stdout, "ThreadPool:  QueueTask = %x\n", pTask);
   if (GetWaitedTaskNum() == 0) {
     CWelsTaskThread* pThread = GetIdleThread();
 
     if (pThread != NULL) {
-      //printf("ThreadPool:  ExecuteTask = %x\n", pTask);
+      //fprintf(stdout, "ThreadPool:  ExecuteTask = %x\n", pTask);
       pThread->SetTask (pTask);
 
       return WELS_THREAD_ERROR_OK;
@@ -163,7 +163,7 @@
   }
 
   AddTaskToWaitedList (pTask);
-  //printf("ThreadPool:  AddTaskToWaitedList: %x\n", pTask);
+  //fprintf(stdout, "ThreadPool:  AddTaskToWaitedList: %x\n", pTask);
   SignalThread();
   return WELS_THREAD_ERROR_OK;
 }
--- a/test/common/WelsThreadPoolTest.h
+++ b/test/common/WelsThreadPoolTest.h
@@ -17,7 +17,7 @@
   virtual int32_t OnTaskExecuted (IWelsTask* pTask) {
     WelsCommon::CWelsAutoLock cAutoLock (m_cTaskCountLock);
     m_iTaskCount ++;
-    //printf("Task execute over count is %d\n", m_iTaskCount);
+    //fprintf(stdout, "Task execute over count is %d\n", m_iTaskCount);
     return cmResultSuccess;
   }
 
@@ -24,7 +24,7 @@
   virtual int32_t OnTaskCancelled (IWelsTask* pTask) {
     WelsCommon::CWelsAutoLock cAutoLock (m_cTaskCountLock);
     m_iTaskCount ++;
-    //printf("Task execute cancelled count is %d\n", m_iTaskCount);
+    //fprintf(stdout, "Task execute cancelled count is %d\n", m_iTaskCount);
     return cmResultSuccess;
   }
 
@@ -31,7 +31,7 @@
   virtual int OnTaskExecuted() {
     WelsCommon::CWelsAutoLock cAutoLock (m_cTaskCountLock);
     m_iTaskCount ++;
-    printf ("Task execute over count is %d\n", m_iTaskCount);
+    //fprintf(stdout, "Task execute over count is %d\n", m_iTaskCount);
     return cmResultSuccess;
   }
 
@@ -38,7 +38,7 @@
   virtual int OnTaskCancelled() {
     WelsCommon::CWelsAutoLock cAutoLock (m_cTaskCountLock);
     m_iTaskCount ++;
-    printf ("Task execute cancelled count is %d\n", m_iTaskCount);
+    //fprintf(stdout, "Task execute cancelled count is %d\n", m_iTaskCount);
     return cmResultSuccess;
   }