X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2FCECProcessor.cpp;h=782b611647520f6d8f04da001c28e0c704557d1d;hb=868dc71fc0084c08a6f3d19888a7f4f855add3f4;hp=cf6405370b1dce2390d7c1b0ba7fc4a843598c24;hpb=f8ae32954754d261552c2c11a6a9055f02d61bba;p=deb_libcec.git diff --git a/src/lib/CECProcessor.cpp b/src/lib/CECProcessor.cpp index cf64053..782b611 100644 --- a/src/lib/CECProcessor.cpp +++ b/src/lib/CECProcessor.cpp @@ -139,27 +139,14 @@ bool CCECProcessor::Start(void) bool CCECProcessor::TryLogicalAddress(cec_logical_address address, unsigned int iIndex) { - const char *strLabel = CCECCommandHandler::ToString(address); - CStdString strLog; - strLog.Format("trying logical address '%s'", strLabel); - AddLog(CEC_LOG_DEBUG, strLog); - - SetAckMask(0x1 << address); - if (!m_busDevices[address]->TransmitPoll(address)) + if (m_busDevices[address]->TryLogicalAddress()) { - strLog.Format("using logical address '%s'", strLabel); - AddLog(CEC_LOG_NOTICE, strLog); - /* only set our OSD name and active source for the primary device */ if (m_logicalAddresses.IsEmpty()) { m_busDevices[address]->m_strDeviceName = m_strDeviceName; m_busDevices[address]->m_bActiveSource = true; } - m_busDevices[address]->m_powerStatus = CEC_POWER_STATUS_STANDBY; - m_busDevices[address]->m_cecVersion = CEC_VERSION_1_3A; - m_busDevices[address]->m_deviceStatus = CEC_DEVICE_STATUS_HANDLED_BY_LIBCEC; - m_logicalAddresses.Set(address); // TODO @@ -168,8 +155,6 @@ bool CCECProcessor::TryLogicalAddress(cec_logical_address address, unsigned int return true; } - strLog.Format("logical address '%s' already taken", strLabel); - AddLog(CEC_LOG_DEBUG, strLog); return false; }