当前位置: 首页>>代码示例>>C++>>正文


C++ CCECBusDevice::IsActiveSource方法代码示例

本文整理汇总了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);
}
开发者ID:AndresStepa,项目名称:tcp-cec,代码行数:9,代码来源:SLCommandHandler.cpp

示例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();
  }
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例3: IsActiveSource

bool CCECProcessor::IsActiveSource(cec_logical_address iAddress)
{
  CCECBusDevice *device = m_busDevices->At(iAddress);
  return device && device->IsActiveSource();
}
开发者ID:BuzzBumbleBee,项目名称:libcec,代码行数:5,代码来源:CECProcessor.cpp

示例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())
  {
//.........这里部分代码省略.........
开发者ID:behaviour,项目名称:libcec,代码行数:101,代码来源:CECClient.cpp


注:本文中的CCECBusDevice::IsActiveSource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。