X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=93f11e6fbb344354a754abb776cc378dea545ad4;hb=a11148b7b6b9fb9b1aed569c4445958d4e91b860;hp=ece2f1c253f5f06cfd218c25ef438309d5ff04bd;hpb=3ab277988a47c251d5ec5f630e5a4e4bfe0ae5dc;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index ece2f1c..93f11e6 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -320,6 +320,7 @@ void CCECProcessor::ReportPhysicalAddress(void) cec_command::format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_REPORT_PHYSICAL_ADDRESS); command.parameters.push_back((uint8_t) ((m_physicaladdress >> 8) & 0xFF)); command.parameters.push_back((uint8_t) (m_physicaladdress & 0xFF)); + command.parameters.push_back((uint8_t) (CEC_DEVICE_TYPE_PLAYBACK_DEVICE)); Transmit(command); } @@ -454,6 +455,7 @@ bool CCECProcessor::ParseMessage(cec_adapter_message &msg) uint8_t iData = msg[1]; logStr.AppendFormat(" %02x", iData); m_currentframe.push_back(iData); + m_currentframe.eom = msg.eom(); } m_controller->AddLog(CEC_LOG_DEBUG, logStr.c_str()); } @@ -526,7 +528,6 @@ void CCECProcessor::ParseCommand(cec_command &command) break; case CEC_OPCODE_GIVE_DEVICE_POWER_STATUS: ReportPowerState(command.initiator); - SetActiveView(); break; case CEC_OPCODE_GET_CEC_VERSION: ReportCECVersion(command.initiator); @@ -583,3 +584,14 @@ void CCECProcessor::ParseCommand(cec_command &command) m_controller->AddLog(CEC_LOG_DEBUG, strLog.c_str()); } } + +const char *CCECProcessor::CECVendorIdToString(const uint64_t iVendorId) +{ + switch (iVendorId) + { + case CEC_VENDOR_SAMSUNG: + return "Samsung"; + default: + return "Unknown"; + } +}