return true;
}
+CCECCommandHandler *CCECBusDevice::GetHandler(void)
+{
+ ReplaceHandler(false);
+ MarkBusy();
+ return m_handler;
+}
+
bool CCECBusDevice::HandleCommand(const cec_command &command)
{
bool bHandled(false);
bool CCECBusDevice::TransmitActiveSource(void)
{
bool bSendActiveSource(false);
+ uint16_t iPhysicalAddress(CEC_INVALID_PHYSICAL_ADDRESS);
{
CLockObject lock(m_mutex);
+ if (!HasValidPhysicalAddress())
+ {
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X) has an invalid physical address, not sending active source commands", GetLogicalAddressName(), m_iLogicalAddress);
+ return false;
+ }
+
+ iPhysicalAddress = m_iPhysicalAddress;
+
if (m_powerStatus != CEC_POWER_STATUS_ON && m_powerStatus != CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON)
LIB_CEC->AddLog(CEC_LOG_DEBUG, "<< %s (%X) is not powered on", GetLogicalAddressName(), m_iLogicalAddress);
else if (m_bActiveSource)
LIB_CEC->AddLog(CEC_LOG_DEBUG, "<< %s (%X) is not the active source", GetLogicalAddressName(), m_iLogicalAddress);
}
+ bool bActiveSourceSent(false);
if (bSendActiveSource)
{
MarkBusy();
- m_handler->TransmitActiveSource(m_iLogicalAddress, m_iPhysicalAddress);
+ bActiveSourceSent = m_handler->TransmitActiveSource(m_iLogicalAddress, iPhysicalAddress);
MarkReady();
- return true;
}
- return false;
+ return bActiveSourceSent;
}
bool CCECBusDevice::TransmitImageViewOn(void)
}
}
+ bool bImageViewOnSent(false);
MarkBusy();
- m_handler->TransmitImageViewOn(m_iLogicalAddress, CECDEVICE_TV);
+ bImageViewOnSent = m_handler->TransmitImageViewOn(m_iLogicalAddress, CECDEVICE_TV);
MarkReady();
- return true;
+ return bImageViewOnSent;
}
bool CCECBusDevice::TransmitInactiveSource(void)