MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / HandleLogicalAddressLost

Method HandleLogicalAddressLost

src/libcec/CECProcessor.cpp:1095–1122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093}
1094
1095void CCECProcessor::HandleLogicalAddressLost(cec_logical_address oldAddress)
1096{
1097 m_libcec->AddLog(CEC_LOG_NOTICE, "logical address %x was taken by another device, allocating a new address", oldAddress);
1098
1099 // stall outgoing messages until we know our new LA
1100 m_bStallCommunication = true;
1101
1102 // reset the TV and the previous address
1103 GetTV()->SetDeviceStatus(CEC_DEVICE_STATUS_UNKNOWN);
1104 if (oldAddress < CECDEVICE_BROADCAST)
1105 m_busDevices->At(oldAddress)->SetDeviceStatus(CEC_DEVICE_STATUS_UNKNOWN);
1106
1107 // try to detect the vendor id
1108 GetTV()->GetVendorId(CECDEVICE_UNREGISTERED);
1109
1110 CECClientPtr client = GetClient(oldAddress);
1111 if (!client)
1112 client = GetPrimaryClient();
1113 if (client)
1114 {
1115 if (m_addrAllocator)
1116 while (m_addrAllocator->IsRunning()) Sleep(5);
1117 delete m_addrAllocator;
1118
1119 m_addrAllocator = new CCECAllocateLogicalAddress(this, client);
1120 m_addrAllocator->CreateThread();
1121 }
1122}
1123
1124void CCECProcessor::HandlePhysicalAddressChanged(uint16_t iNewAddress)
1125{

Callers

nothing calls this directly

Calls 4

SetDeviceStatusMethod · 0.80
AddLogMethod · 0.45
AtMethod · 0.45
GetVendorIdMethod · 0.45

Tested by

no test coverage detected