本文整理汇总了C++中CCECBusDevice::MarkAsInactiveSource方法的典型用法代码示例。如果您正苦于以下问题:C++ CCECBusDevice::MarkAsInactiveSource方法的具体用法?C++ CCECBusDevice::MarkAsInactiveSource怎么用?C++ CCECBusDevice::MarkAsInactiveSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCECBusDevice
的用法示例。
在下文中一共展示了CCECBusDevice::MarkAsInactiveSource方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetStreamPath
void CCECBusDevice::SetStreamPath(uint16_t iNewAddress, uint16_t iOldAddress /* = CEC_INVALID_PHYSICAL_ADDRESS */)
{
if (iNewAddress != CEC_INVALID_PHYSICAL_ADDRESS)
SetPowerStatus(CEC_POWER_STATUS_ON);
CLockObject lock(m_mutex);
if (iNewAddress != m_iStreamPath)
{
LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s (%X): stream path changed from %04x to %04x", GetLogicalAddressName(), m_iLogicalAddress, iOldAddress == 0 ? m_iStreamPath : iOldAddress, iNewAddress);
m_iStreamPath = iNewAddress;
}
if (!LIB_CEC->IsValidPhysicalAddress(iNewAddress))
return;
CCECBusDevice *device = m_processor->GetDeviceByPhysicalAddress(iNewAddress);
if (device)
{
// if a device is found with the new physical address, mark it as active, which will automatically mark all other devices as inactive
device->MarkAsActiveSource();
// respond with an active source message if this device is handled by libCEC
if (device->IsHandledByLibCEC())
device->TransmitActiveSource(true);
}
else
{
// try to find the device with the old address, and mark it as inactive when found
device = m_processor->GetDeviceByPhysicalAddress(iOldAddress);
if (device)
device->MarkAsInactiveSource();
}
}