bool CSLCommandHandler::HandleGivePhysicalAddress(const cec_command &command) { if (m_processor->IsStarted() && m_busDevice->MyLogicalAddressContains(command.destination)) { CCECBusDevice *device = GetDevice(command.destination); if (device) return device->TransmitPhysicalAddress(); } return false; }
void CSLCommandHandler::HandleVendorCommandPowerOn(const cec_command &command) { if (command.initiator != CECDEVICE_TV) return; CCECBusDevice *device = m_processor->GetPrimaryDevice(); if (device) { SetSLInitialised(); device->MarkAsActiveSource(); device->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON); device->TransmitPowerState(command.initiator, true); CEvent::Sleep(2000); device->SetPowerStatus(CEC_POWER_STATUS_ON); device->TransmitPowerState(command.initiator, false); device->TransmitPhysicalAddress(false); { CLockObject lock(m_SLMutex); m_bActiveSourceSent = false; } } }