- // need to support opcodes play and deck control before doing anything with this
- CStdString strLog;
- strLog.Format("<< %x -> %x: deck status feature abort", m_iLogicalAddress, dest);
- AddLog(CEC_LOG_NOTICE, strLog);
+ bool bSendActiveSource(false);
+
+ {
+ CLockObject lock(&m_mutex);
+ if (m_powerStatus != CEC_POWER_STATUS_ON)
+ {
+ CStdString strLog;
+ strLog.Format("<< %s (%X) is not powered on", GetLogicalAddressName(), m_iLogicalAddress);
+ AddLog(CEC_LOG_DEBUG, strLog);
+ }
+ else if (m_bActiveSource)
+ {
+ CStdString strLog;
+ strLog.Format("<< %s (%X) -> broadcast (F): active source (%4x)", GetLogicalAddressName(), m_iLogicalAddress, m_iPhysicalAddress);
+ AddLog(CEC_LOG_NOTICE, strLog);
+ bSendActiveSource = true;
+ }
+ else
+ {
+ CStdString strLog;
+ strLog.Format("<< %s (%X) is not the active source", GetLogicalAddressName(), m_iLogicalAddress);
+ AddLog(CEC_LOG_DEBUG, strLog);
+ }
+ }
+
+ if (bSendActiveSource)
+ {
+ m_handler->TransmitActiveSource(m_iLogicalAddress, m_iPhysicalAddress);
+ m_handler->TransmitImageViewOn(m_iLogicalAddress, CECDEVICE_TV);
+ return true;
+ }