CCECBusDevice::CCECBusDevice(CCECProcessor *processor, cec_logical_address iLogicalAddress, uint16_t iPhysicalAddress) :
m_iPhysicalAddress(iPhysicalAddress),
+ m_iStreamPath(0),
m_iLogicalAddress(iLogicalAddress),
m_powerStatus(CEC_POWER_STATUS_UNKNOWN),
m_processor(processor),
}
}
-void CCECBusDevice::SetPhysicalAddress(uint16_t iNewAddress, uint16_t iOldAddress /* = 0 */)
+void CCECBusDevice::SetPhysicalAddress(uint16_t iNewAddress)
{
if (iNewAddress > 0)
{
}
}
+void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = 0 */)
+{
+ if (iNewAddress > 0)
+ {
+ CStdString strLog;
+ strLog.Format(">> %i stream path from %04x to %04x", m_iLogicalAddress, iOldAddress, iNewAddress);
+ AddLog(CEC_LOG_DEBUG, strLog.c_str());
+
+ m_iStreamPath = iNewAddress;
+ }
+}
+
void CCECBusDevice::SetPowerStatus(const cec_power_status powerStatus)
{
if (m_powerStatus != powerStatus)
virtual const char * GetVendorName(void) { return GetVendor().AsString(); }
virtual bool MyLogicalAddressContains(cec_logical_address address) const;
- virtual void SetPhysicalAddress(uint16_t iNewAddress, uint16_t iOldAddress = 0);
+ virtual void SetPhysicalAddress(uint16_t iNewAddress);
+ virtual void SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress = 0);
virtual void SetCecVersion(const cec_version newVersion);
virtual void SetMenuLanguage(const cec_menu_language &menuLanguage);
virtual void SetVendorId(const cec_datapacket &data);
cec_device_type m_type;
CStdString m_strDeviceName;
uint16_t m_iPhysicalAddress;
+ uint16_t m_iStreamPath;
cec_logical_address m_iLogicalAddress;
cec_power_status m_powerStatus;
cec_menu_language m_menuLanguage;
CCECBusDevice *device = GetDevice(command.initiator);
if (device)
- device->SetPhysicalAddress(iNewAddress, iOldAddress);
+ device->SetStreamPath(iNewAddress, iOldAddress);
}
return true;
}