X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FLibCEC.cpp;h=afbf2260f5c16dbeaee4e55a764bf2eb49875e16;hb=9dee1670cb5167360026a910a33de46e811a8588;hp=6b53f049563ff74397089944f9fcf84f307bb773;hpb=a6b6469cc934c046067a5f518d47344b749ab9f1;p=deb_libcec.git diff --git a/src/lib/LibCEC.cpp b/src/lib/LibCEC.cpp index 6b53f04..afbf226 100644 --- a/src/lib/LibCEC.cpp +++ b/src/lib/LibCEC.cpp @@ -148,7 +148,7 @@ bool CLibCEC::GetNextCommand(cec_command *command) return m_commandBuffer.Pop(*command); } -bool CLibCEC::Transmit(const cec_frame &data, bool bWaitForAck /* = true */) +bool CLibCEC::Transmit(const cec_command &data, bool bWaitForAck /* = true */) { return m_cec ? m_cec->Transmit(data, bWaitForAck) : false; } @@ -204,20 +204,12 @@ void CLibCEC::AddKey(void) } } -void CLibCEC::AddCommand(cec_logical_address source, cec_logical_address destination, cec_opcode opcode, cec_frame *parameters) +void CLibCEC::AddCommand(cec_command &command) { - cec_command command; - command.clear(); - - command.source = source; - command.destination = destination; - command.opcode = opcode; - if (parameters) - command.parameters = parameters->packet; if (m_commandBuffer.Push(command)) { CStdString strDebug; - strDebug.Format("stored command '%2x' in the command buffer. buffer size = %d", opcode, m_commandBuffer.Size()); + strDebug.Format("stored command '%2x' in the command buffer. buffer size = %d", command.opcode, m_commandBuffer.Size()); AddLog(CEC_LOG_DEBUG, strDebug); } else