From: Lars Op den Kamp Date: Fri, 9 Dec 2011 11:36:04 +0000 (+0100) Subject: cec: fixed - transmit an active source message when the stream path has been set... X-Git-Tag: upstream/2.2.0~1^2~44^2~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=72689600b9622fd55a53d9a95b8af42823d00356;p=deb_libcec.git cec: fixed - transmit an active source message when the stream path has been set to a device that is handled by libcec --- diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index 57233fd..11d550c 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -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; }