{
LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X): physical address changed from %04x to %04x", GetLogicalAddressName(), m_iLogicalAddress, m_iPhysicalAddress, iNewAddress);
m_iPhysicalAddress = iNewAddress;
+
+ if (m_processor->GetDevices()->GetActiveSourceAddress() == iNewAddress)
+ MarkAsActiveSource();
}
return true;
}
}
}
+void CCECBusDevice::ImageViewOnSent(void)
+{
+ CLockObject lock(m_mutex);
+ if (m_powerStatus != CEC_POWER_STATUS_ON && m_powerStatus != CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON)
+ {
+ m_iLastPowerStateUpdate = GetTimeMs();
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X): power status changed from '%s' to '%s'", GetLogicalAddressName(), m_iLogicalAddress, ToString(m_powerStatus), ToString(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON));
+ m_powerStatus = CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON;
+ }
+}
+
bool CCECBusDevice::RequestPowerStatus(const cec_logical_address initiator, bool bWaitForResponse /* = true */)
{
bool bReturn(false);
if (bWasActivated)
{
- m_processor->SetActiveSource(true, false);
+ if (IsHandledByLibCEC())
+ m_processor->SetActiveSource(true, false);
CCECClient *client = GetClient();
if (client)
client->SourceActivated(m_iLogicalAddress);
if (bWasDeactivated)
{
- m_processor->SetActiveSource(false, bClientUnregistered);
+ if (IsHandledByLibCEC())
+ m_processor->SetActiveSource(false, bClientUnregistered);
CCECClient *client = GetClient();
if (client)
client->SourceDeactivated(m_iLogicalAddress);
MarkBusy();
bImageViewOnSent = m_handler->TransmitImageViewOn(m_iLogicalAddress, CECDEVICE_TV);
MarkReady();
+
+ if (bImageViewOnSent)
+ {
+ CCECBusDevice* tv = m_processor->GetDevice(CECDEVICE_TV);
+ if (tv)
+ tv->ImageViewOnSent();
+ }
+
return bImageViewOnSent;
}