X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=9498bc9995810d4f1e7c31c22e0dab7e2e2e1e6d;hb=88c05b08388985d752f86ed1451a20e9f4f3e22c;hp=0f88470554dec9957713e9d4e6d318e10634af5f;hpb=13fd6a6619b36bef2df2a126455f83776cc991b4;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 0f88470..9498bc9 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -42,6 +42,7 @@ using namespace std; using namespace CEC; CLibCEC::CLibCEC(const char *strDeviceName, cec_logical_address iLogicalAddress /* = CECDEVICE_PLAYBACKDEVICE1 */, uint16_t iPhysicalAddress /* = CEC_DEFAULT_PHYSICAL_ADDRESS */) : + m_iStartTime(GetTimeMs()), m_iCurrentButton(CEC_USER_CONTROL_CODE_UNKNOWN), m_buttontime(0) { @@ -183,6 +184,7 @@ void CLibCEC::AddLog(cec_log_level level, const string &strMessage) { cec_log_message message; message.level = level; + message.time = GetTimeMs() - m_iStartTime; snprintf(message.message, sizeof(message.message), "%s", strMessage.c_str()); m_logBuffer.Push(message); } @@ -215,7 +217,7 @@ void CLibCEC::AddCommand(cec_logical_address source, cec_logical_address destina if (m_commandBuffer.Push(command)) { CStdString strDebug; - strDebug.Format("stored command '%d' in the command buffer. buffer size = %d", opcode, m_commandBuffer.Size()); + strDebug.Format("stored command '%2x' in the command buffer. buffer size = %d", opcode, m_commandBuffer.Size()); AddLog(CEC_LOG_DEBUG, strDebug); } else