X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=d1a4855c793364ac65981cf7913d6906f3dfac02;hb=855a3a98394762b90bd86e7522110057a616fa6e;hp=a33a577b0606367ebee5da10c32a142cb7523747;hpb=8354f74710bf154d9b31335958b0189f10d6a408;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index a33a577..d1a4855 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -53,6 +53,8 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command) strLog.Format(">> %s (%X) -> %s (%X): %s (%2X)", m_processor->ToString(command.initiator), command.initiator, m_processor->ToString(command.destination), command.destination, m_processor->ToString(command.opcode), command.opcode); m_busDevice->AddLog(CEC_LOG_NOTICE, strLog); + m_processor->AddCommand(command); + switch(command.opcode) { case CEC_OPCODE_REPORT_POWER_STATUS: @@ -110,13 +112,13 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command) HandleSystemAudioModeRequest(command); break; case CEC_OPCODE_REPORT_AUDIO_STATUS: - HandleReportAudioStatus(command);//YYY + HandleReportAudioStatus(command); break; case CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS: - HandleSystemAudioModeStatus(command);//YYY + HandleSystemAudioModeStatus(command); break; case CEC_OPCODE_SET_SYSTEM_AUDIO_MODE: - HandleSetSystemAudioMode(command);//YYY + HandleSetSystemAudioMode(command); break; case CEC_OPCODE_REQUEST_ACTIVE_SOURCE: HandleRequestActiveSource(command); @@ -154,7 +156,6 @@ bool CCECCommandHandler::HandleCommand(const cec_command &command) break; } - m_processor->AddCommand(command); return bHandled; } @@ -642,3 +643,16 @@ void CCECCommandHandler::SetPhysicalAddress(cec_logical_address iAddress, uint16 } } } + +void CCECCommandHandler::HandlePoll(const cec_logical_address iInitiator, const cec_logical_address iDestination) +{ + CStdString strLog; + strLog.Format("<< POLL: %s (%x) -> %s (%x)", m_processor->ToString(iInitiator), iInitiator, m_processor->ToString(iDestination), iDestination); + m_processor->AddLog(CEC_LOG_DEBUG, strLog); +} + +bool CCECCommandHandler::HandleReceiveFailed(void) +{ + /* default = error */ + return true; +}