X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECParser.cpp;h=547d6268116576529553a8c34d5c2df2e637453e;hb=c49c485b94c3670438d329c15f4a785609a126f6;hp=97fbcd370b3542831ee2a67d41bade1068be92d0;hpb=fac23b028a858e6c8e4773b8a1670b4f96c96ce7;p=deb_libcec.git diff --git a/src/lib/CECParser.cpp b/src/lib/CECParser.cpp index 97fbcd3..547d626 100644 --- a/src/lib/CECParser.cpp +++ b/src/lib/CECParser.cpp @@ -761,6 +761,12 @@ void CCECParser::ParseCurrentFrame(void) BroadcastActiveSource(); } } + else + { + cec_frame params = m_currentframe; + params.erase(params.begin(), params.begin() + 2); + AddCommand((cec_logical_address) initiator, (cec_logical_address) destination, opCode, ¶ms); + } } else { @@ -867,7 +873,16 @@ void CCECParser::AddCommand(cec_logical_address source, cec_logical_address dest command.opcode = opcode; if (parameters) command.parameters = *parameters; - m_commandBuffer.Push(command); + if (m_commandBuffer.Push(command)) + { + CStdString strDebug; + strDebug.Format("stored command '%d' in the command buffer. buffer size = %d", opcode, m_commandBuffer.Size()); + AddLog(CEC_LOG_DEBUG, strDebug); + } + else + { + AddLog(CEC_LOG_WARNING, "command buffer is full"); + } } int CCECParser::GetMinVersion(void)