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


C++ CPVREpgInfoTagPtr::Channel方法代码示例

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


在下文中一共展示了CPVREpgInfoTagPtr::Channel方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetRecordingForEpgTag

CPVRRecordingPtr CPVRRecordings::GetRecordingForEpgTag(const CPVREpgInfoTagPtr &epgTag) const
{
  CSingleLock lock(m_critSection);

  for (const auto recording : m_recordings)
  {
    if (recording.second->IsDeleted())
      continue;

    unsigned int iEpgEvent = recording.second->BroadcastUid();
    if (iEpgEvent != EPG_TAG_INVALID_UID)
    {
      if (iEpgEvent == epgTag->UniqueBroadcastID())
      {
        // uid matches. perfect.
        return recording.second;
      }
    }
    else
    {
      // uid is optional, so check other relevant data.

      // note: don't use recording.second->Channel() for comparing channels here as this can lead
      //       to deadlocks. compare client ids and channel ids instead, this has the same effect.
      if (epgTag->Channel() &&
          recording.second->ClientID() == epgTag->Channel()->ClientID() &&
          recording.second->ChannelUid() == epgTag->Channel()->UniqueID() &&
          recording.second->RecordingTimeAsUTC() <= epgTag->StartAsUTC() &&
          recording.second->EndTimeAsUTC() >= epgTag->EndAsUTC())
        return recording.second;
    }
  }

  return CPVRRecordingPtr();
}
开发者ID:jrcarpenter,项目名称:xbmc,代码行数:35,代码来源:PVRRecordings.cpp

示例2: MatchChannelGroup

bool CPVREpgSearchFilter::MatchChannelGroup(const CPVREpgInfoTagPtr &tag) const
{
  bool bReturn(true);

  if (m_iChannelGroup != EPG_SEARCH_UNSET && CServiceBroker::GetPVRManager().IsStarted())
  {
    CPVRChannelGroupPtr group = CServiceBroker::GetPVRManager().ChannelGroups()->GetByIdFromAll(m_iChannelGroup);
    bReturn = (group && group->IsGroupMember(tag->Channel()));
  }

  return bReturn;
}
开发者ID:HitcherUK,项目名称:xbmc,代码行数:12,代码来源:EpgSearchFilter.cpp

示例3: MatchChannelNumber

bool CPVREpgSearchFilter::MatchChannelNumber(const CPVREpgInfoTagPtr &tag) const
{
  bool bReturn(true);

  if (m_channelNumber.IsValid() && CServiceBroker::GetPVRManager().IsStarted())
  {
    CPVRChannelGroupPtr group = (m_iChannelGroup != EPG_SEARCH_UNSET) ? CServiceBroker::GetPVRManager().ChannelGroups()->GetByIdFromAll(m_iChannelGroup) : CServiceBroker::GetPVRManager().ChannelGroups()->GetGroupAllTV();
    if (!group)
      group = CServiceBroker::GetPVRManager().ChannelGroups()->GetGroupAllTV();

    bReturn = (m_channelNumber == group->GetChannelNumber(tag->Channel()));
  }

  return bReturn;
}
开发者ID:HitcherUK,项目名称:xbmc,代码行数:15,代码来源:EpgSearchFilter.cpp

示例4: OnInputDone

void CGUIWindowPVRGuideBase::OnInputDone()
{
  const int iChannelNumber = GetChannelNumber();
  if (iChannelNumber >= 0)
  {
    for (const CFileItemPtr event : m_vecItems->GetList())
    {
      const CPVREpgInfoTagPtr tag(event->GetEPGInfoTag());
      if (tag->HasChannel() && tag->ChannelNumber() == iChannelNumber)
      {
        CGUIEPGGridContainer* epgGridContainer = GetGridControl();
        if (epgGridContainer)
        {
          epgGridContainer->SetChannel(tag->Channel());
          return;
        }
      }
    }
  }
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:20,代码来源:GUIWindowPVRGuide.cpp

示例5: GetListItemAndPlayerBool

bool CPVRGUIInfo::GetListItemAndPlayerBool(const CFileItem *item, const CGUIInfo &info, bool &bValue) const
{
  switch (info.m_info)
  {
    case LISTITEM_ISRECORDING:
      if (item->IsPVRChannel())
      {
        bValue = item->GetPVRChannelInfoTag()->IsRecording();
        return true;
      }
      else if (item->IsEPG() || item->IsPVRTimer())
      {
        const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
        if (timer)
          bValue = timer->IsRecording();
        return true;
      }
      else if (item->IsPVRRecording())
      {
        bValue = item->GetPVRRecordingInfoTag()->IsInProgress();
        return true;
      }
      break;
    case LISTITEM_INPROGRESS:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
        if (epgTag)
          bValue = epgTag->IsActive();
        return true;
      }
      break;
    case LISTITEM_HASTIMER:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
        if (epgTag)
          bValue = epgTag->HasTimer();
        return true;
      }
      break;
    case LISTITEM_HASTIMERSCHEDULE:
      if (item->IsPVRChannel() || item->IsEPG() || item->IsPVRTimer())
      {
        const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
        if (timer)
          bValue = timer->GetTimerRuleId() != PVR_TIMER_NO_PARENT;
        return true;
      }
      break;
    case LISTITEM_TIMERISACTIVE:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
        if (timer)
          bValue = timer->IsActive();
        break;
      }
      break;
    case LISTITEM_TIMERHASCONFLICT:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
        if (timer)
          bValue = timer->HasConflict();
        return true;
      }
      break;
    case LISTITEM_TIMERHASERROR:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVRTimerInfoTagPtr timer = CPVRItem(item).GetTimerInfoTag();
        if (timer)
          bValue = (timer->IsBroken() && !timer->HasConflict());
        return true;
      }
      break;
    case LISTITEM_HASRECORDING:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
        if (epgTag)
          bValue = epgTag->HasRecording();
        return true;
      }
      break;
    case LISTITEM_HAS_EPG:
      if (item->IsPVRChannel() || item->IsEPG() || item->IsPVRTimer())
      {
        const CPVREpgInfoTagPtr epgTag = CPVRItem(item).GetEpgInfoTag();
        bValue = (epgTag != nullptr);
        return true;
      }
      break;
    case LISTITEM_ISENCRYPTED:
      if (item->IsPVRChannel() || item->IsEPG())
      {
        const CPVRChannelPtr channel = CPVRItem(item).GetChannel();
        if (channel)
          bValue = channel->IsEncrypted();
//.........这里部分代码省略.........
开发者ID:HitcherUK,项目名称:xbmc,代码行数:101,代码来源:PVRGUIInfo.cpp

示例6: MatchFreeToAir

bool CPVREpgSearchFilter::MatchFreeToAir(const CPVREpgInfoTagPtr &tag) const
{
  return (!m_bFreeToAirOnly || !tag->Channel()->IsEncrypted());
}
开发者ID:HitcherUK,项目名称:xbmc,代码行数:4,代码来源:EpgSearchFilter.cpp

示例7: MatchChannelType

bool CPVREpgSearchFilter::MatchChannelType(const CPVREpgInfoTagPtr &tag) const
{
  return (CServiceBroker::GetPVRManager().IsStarted() && tag->Channel()->IsRadio() == m_bIsRadio);
}
开发者ID:HitcherUK,项目名称:xbmc,代码行数:4,代码来源:EpgSearchFilter.cpp


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