本文整理汇总了C++中CCECBusDevice::IsActiveSource方法的典型用法代码示例。如果您正苦于以下问题:C++ CCECBusDevice::IsActiveSource方法的具体用法?C++ CCECBusDevice::IsActiveSource怎么用?C++ CCECBusDevice::IsActiveSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCECBusDevice
的用法示例。
在下文中一共展示了CCECBusDevice::IsActiveSource方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CSLCommandHandler::HandleVendorCommand01(const cec_command &command)
{
m_processor->GetPrimaryDevice()->SetPowerStatus(CEC_POWER_STATUS_IN_TRANSITION_STANDBY_TO_ON);
TransmitVendorCommand0205(command.destination, command.initiator);
CCECBusDevice* dev = m_processor->GetDevice(command.destination);
if (dev && dev->IsHandledByLibCEC() && dev->IsActiveSource())
dev->TransmitActiveSource(false);
}
示例2: SetActiveRoute
void CCECBusDevice::SetActiveRoute(uint16_t iRoute)
{
SetPowerStatus(CEC_POWER_STATUS_ON);
CCECDeviceMap* map = m_processor->GetDevices();
if (!map)
return;
CCECBusDevice* newRoute = m_processor->GetDeviceByPhysicalAddress(iRoute, true);
if (newRoute && newRoute->IsHandledByLibCEC() && !newRoute->IsActiveSource())
{
// we were made the active source, send notification
newRoute->ActivateSource();
}
}
示例3: IsActiveSource
bool CCECProcessor::IsActiveSource(cec_logical_address iAddress)
{
CCECBusDevice *device = m_busDevices->At(iAddress);
return device && device->IsActiveSource();
}
示例4: SetConfiguration
bool CCECClient::SetConfiguration(const libcec_configuration &configuration)
{
bool bIsRunning(m_processor && m_processor->CECInitialised());
CCECBusDevice *primary = bIsRunning ? GetPrimaryDevice() : NULL;
uint16_t iPA = primary ? primary->GetCurrentPhysicalAddress() : CEC_INVALID_PHYSICAL_ADDRESS;
// update the callbacks
if (configuration.callbacks)
EnableCallbacks(configuration.callbackParam, configuration.callbacks);
// update the client version
SetClientVersion((cec_client_version)configuration.clientVersion);
// update the OSD name
CStdString strOSDName(configuration.strDeviceName);
SetOSDName(strOSDName);
// update the TV vendor override
SetTVVendorOverride((cec_vendor_id)configuration.tvVendor);
// just copy these
{
CLockObject lock(m_mutex);
m_configuration.bUseTVMenuLanguage = configuration.bUseTVMenuLanguage;
m_configuration.bActivateSource = configuration.bActivateSource;
m_configuration.bGetSettingsFromROM = configuration.bGetSettingsFromROM;
m_configuration.wakeDevices = configuration.wakeDevices;
m_configuration.powerOffDevices = configuration.powerOffDevices;
m_configuration.bPowerOffScreensaver = configuration.bPowerOffScreensaver;
m_configuration.bPowerOffOnStandby = configuration.bPowerOffOnStandby;
// client version 1.5.1
if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_5_1)
m_configuration.bSendInactiveSource = configuration.bSendInactiveSource;
// client version 1.6.0
if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_6_0)
{
m_configuration.bPowerOffDevicesOnStandby = configuration.bPowerOffDevicesOnStandby;
m_configuration.bShutdownOnStandby = configuration.bShutdownOnStandby;
}
// client version 1.6.2
if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_6_2)
{
memcpy(m_configuration.strDeviceLanguage, configuration.strDeviceLanguage, 3);
}
// client version 1.6.3
if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_6_3)
{
m_configuration.bMonitorOnly = configuration.bMonitorOnly;
}
// client version 1.8.0
if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_8_0)
m_configuration.cecVersion = configuration.cecVersion;
// client version 1.8.2
if (configuration.clientVersion >= CEC_CLIENT_VERSION_1_8_2)
m_configuration.adapterType = configuration.adapterType;
// ensure that there is at least 1 device type set
if (m_configuration.deviceTypes.IsEmpty())
m_configuration.deviceTypes.Add(CEC_DEVICE_TYPE_RECORDING_DEVICE);
}
bool bNeedReinit(false);
// device types
if (SetDeviceTypes(configuration.deviceTypes))
{
// the device type changed. just copy the rest, and re-register
{
CLockObject lock(m_mutex);
m_configuration.iPhysicalAddress = configuration.iPhysicalAddress;
m_configuration.baseDevice = configuration.baseDevice;
m_configuration.iHDMIPort = configuration.iHDMIPort;
bNeedReinit = true;
}
}
else
{
// set the physical address
SetPhysicalAddress(configuration);
}
// persist the new configuration
PersistConfiguration(m_configuration);
if (!primary)
primary = GetPrimaryDevice();
if (bNeedReinit || !primary || primary->GetCurrentPhysicalAddress() != iPA)
{
// PA or device type changed
m_processor->RegisterClient(this);
}
else if (primary && configuration.bActivateSource == 1 && bIsRunning && !primary->IsActiveSource())
{
//.........这里部分代码省略.........