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


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

本文整理汇总了C++中CCECBusDevice::TransmitActiveSource方法的典型用法代码示例。如果您正苦于以下问题:C++ CCECBusDevice::TransmitActiveSource方法的具体用法?C++ CCECBusDevice::TransmitActiveSource怎么用?C++ CCECBusDevice::TransmitActiveSource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCECBusDevice的用法示例。


在下文中一共展示了CCECBusDevice::TransmitActiveSource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
  }
}
开发者ID:,项目名称:,代码行数:33,代码来源:

示例2:

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

示例3: HandleSetStreamPath

bool CVLCommandHandler::HandleSetStreamPath(const cec_command &command)
{
  if (command.parameters.size >= 2)
  {
    int streamaddr = ((uint16_t)command.parameters[0] << 8) | ((uint16_t)command.parameters[1]);
    CStdString strLog;
    strLog.Format(">> %i requests stream path from physical address %04x", command.initiator, streamaddr);
    m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str());
    if (streamaddr == m_busDevice->GetMyPhysicalAddress())
    {
     CCECBusDevice *device = GetDeviceByPhysicalAddress(streamaddr);
     if (device)
      {
        return device->TransmitActiveSource() &&
               device->TransmitActiveView() &&
               device->TransmitMenuState(command.initiator);
      }
      return false;
    }
  }
  return true;
}
开发者ID:joshua-nord,项目名称:libcec,代码行数:22,代码来源:VLCommandHandler.cpp


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