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

Method ActivateSource

src/libcec/implementations/PHCommandHandler.cpp:115–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool CPHCommandHandler::ActivateSource(bool bTransmitDelayedCommandsOnly /* = false */)
116{
117
118 CCECBusDevice* tv = m_processor->GetDevice(CECDEVICE_TV);
119 if (m_busDevice->IsActiveSource() &&
120 m_busDevice->IsHandledByLibCEC() &&
121 tv && tv->GetCurrentPowerStatus() != CEC_POWER_STATUS_ON &&
122 !bTransmitDelayedCommandsOnly)
123 {
124 // tv sometimes ignores image view on. check the power status of the tv in 5 seconds, and retry when it failed to power up
125 if (m_imageViewOnCheck && !m_imageViewOnCheck->IsRunning())
126 return m_imageViewOnCheck->CreateThread(false);
127 }
128
129 return CCECCommandHandler::ActivateSource(bTransmitDelayedCommandsOnly);
130}
131
132int CPHCommandHandler::HandleUserControlPressed(const cec_command& command)
133{

Callers

nothing calls this directly

Calls 4

GetCurrentPowerStatusMethod · 0.80
GetDeviceMethod · 0.45
IsActiveSourceMethod · 0.45
IsHandledByLibCECMethod · 0.45

Tested by

no test coverage detected