- CLockObject lock(&m_writeMutex);
- 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);
-
- cec_command command;
- cec_command::Format(command, m_iLogicalAddress, CECDEVICE_BROADCAST, CEC_OPCODE_ACTIVE_SOURCE, m_iTransmitTimeout);
- command.parameters.PushBack((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
- command.parameters.PushBack((uint8_t) (m_iPhysicalAddress & 0xFF));