cec: fixed - transmit an active source message when the stream path has been set...
authorLars Op den Kamp <lars@opdenkamp.eu>
Fri, 9 Dec 2011 11:36:04 +0000 (12:36 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Fri, 9 Dec 2011 11:36:04 +0000 (12:36 +0100)
src/lib/implementations/CECCommandHandler.cpp

index 57233fd3cc08aad07b346a8200e5f0771611765e..11d550c32adf7bdd6874eab1bef9d3e544e9789a 100644 (file)
@@ -463,6 +463,14 @@ bool CCECCommandHandler::HandleSetStreamPath(const cec_command &command)
     CStdString strLog;
     strLog.Format(">> %i sets stream path to physical address %04x", command.initiator, iStreamAddress);
     m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
+
+    /* one of the device handled by libCEC has been made active */
+    CCECBusDevice *device = GetDeviceByPhysicalAddress(iStreamAddress);
+    if (device && m_busDevice->MyLogicalAddressContains(device->GetLogicalAddress()))
+    {
+      device->SetActiveSource();
+      device->TransmitActiveSource();
+    }
   }
   return false;
 }