本文整理汇总了C++中CPVRRecordingPtr::Channel方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRRecordingPtr::Channel方法的具体用法?C++ CPVRRecordingPtr::Channel怎么用?C++ CPVRRecordingPtr::Channel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRRecordingPtr
的用法示例。
在下文中一共展示了CPVRRecordingPtr::Channel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateFromClient
void CPVRRecordings::UpdateFromClient(const CPVRRecordingPtr &tag)
{
CSingleLock lock(m_critSection);
if (tag->IsDeleted())
m_bHasDeleted = true;
CPVRRecordingPtr newTag = GetById(tag->m_iClientId, tag->m_strRecordingId);
if (newTag)
{
newTag->Update(*tag);
}
else
{
newTag = CPVRRecordingPtr(new CPVRRecording);
newTag->Update(*tag);
if (newTag->BroadcastUid() != EPG_TAG_INVALID_UID)
{
const CPVRChannelPtr channel(newTag->Channel());
if (channel)
{
const EPG::CEpgInfoTagPtr epgTag = EPG::CEpgContainer::GetInstance().GetTagById(channel, newTag->BroadcastUid());
if (epgTag)
epgTag->SetRecording(newTag);
}
}
newTag->m_iRecordingId = ++m_iLastId;
m_recordings.insert(std::make_pair(CPVRRecordingUid(newTag->m_iClientId, newTag->m_strRecordingId), newTag));
}
}
示例2: UpdateFromClient
void CPVRRecordings::UpdateFromClient(const CPVRRecordingPtr &tag)
{
CSingleLock lock(m_critSection);
if (tag->IsDeleted())
{
if (tag->IsRadio())
m_bDeletedRadioRecordings = true;
else
m_bDeletedTVRecordings = true;
}
CPVRRecordingPtr newTag = GetById(tag->m_iClientId, tag->m_strRecordingId);
if (newTag)
{
newTag->Update(*tag);
}
else
{
newTag = CPVRRecordingPtr(new CPVRRecording);
newTag->Update(*tag);
if (newTag->BroadcastUid() != EPG_TAG_INVALID_UID)
{
const CPVRChannelPtr channel(newTag->Channel());
if (channel)
{
const CPVREpgInfoTagPtr epgTag = CServiceBroker::GetPVRManager().EpgContainer().GetTagById(channel, newTag->BroadcastUid());
if (epgTag)
epgTag->SetRecording(newTag);
}
}
newTag->m_iRecordingId = ++m_iLastId;
m_recordings.insert(std::make_pair(CPVRRecordingUid(newTag->m_iClientId, newTag->m_strRecordingId), newTag));
if (newTag->IsRadio())
++m_iRadioRecordings;
else
++m_iTVRecordings;
}
}
示例3: GetListItemAndPlayerLabel
bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem *item, const CGUIInfo &info, std::string &strValue) const
{
const CPVRTimerInfoTagPtr timer = item->GetPVRTimerInfoTag();
if (timer)
{
switch (info.m_info)
{
case LISTITEM_DATE:
strValue = timer->Summary();
return true;
case LISTITEM_STARTDATE:
strValue = timer->StartAsLocalTime().GetAsLocalizedDate(true);
return true;
case LISTITEM_STARTTIME:
strValue = timer->StartAsLocalTime().GetAsLocalizedTime("", false);
return true;
case LISTITEM_ENDDATE:
strValue = timer->EndAsLocalTime().GetAsLocalizedDate(true);
return true;
case LISTITEM_ENDTIME:
strValue = timer->EndAsLocalTime().GetAsLocalizedTime("", false);
return true;
case LISTITEM_TITLE:
strValue = timer->Title();
return true;
case LISTITEM_COMMENT:
strValue = timer->GetStatus();
return true;
case LISTITEM_TIMERTYPE:
strValue = timer->GetTypeAsString();
return true;
case LISTITEM_CHANNEL_NAME:
strValue = timer->ChannelName();
return true;
case LISTITEM_EPG_EVENT_TITLE:
case LISTITEM_EPG_EVENT_ICON:
case LISTITEM_GENRE:
case LISTITEM_PLOT:
case LISTITEM_PLOT_OUTLINE:
case LISTITEM_DURATION:
case LISTITEM_ORIGINALTITLE:
case LISTITEM_YEAR:
case LISTITEM_SEASON:
case LISTITEM_EPISODE:
case LISTITEM_EPISODENAME:
case LISTITEM_DIRECTOR:
case LISTITEM_CHANNEL_NUMBER:
case LISTITEM_PREMIERED:
break; // obtain value from channel/epg
default:
return false;
}
}
const CPVRRecordingPtr recording(item->GetPVRRecordingInfoTag());
if (recording)
{
// Note: CPVRRecoding is derived from CVideoInfoTag. All base class properties will be handled
// by CVideoGUIInfoProvider. Only properties introduced by CPVRRecording need to be handled here.
switch (info.m_info)
{
case LISTITEM_DATE:
strValue = recording->RecordingTimeAsLocalTime().GetAsLocalizedDateTime(false, false);
return true;
case LISTITEM_STARTDATE:
strValue = recording->RecordingTimeAsLocalTime().GetAsLocalizedDate(true);
return true;
case VIDEOPLAYER_STARTTIME:
case LISTITEM_STARTTIME:
strValue = recording->RecordingTimeAsLocalTime().GetAsLocalizedTime("", false);
return true;
case LISTITEM_ENDDATE:
strValue = recording->EndTimeAsLocalTime().GetAsLocalizedDate(true);
return true;
case VIDEOPLAYER_ENDTIME:
case LISTITEM_ENDTIME:
strValue = recording->EndTimeAsLocalTime().GetAsLocalizedTime("", false);
return true;
case LISTITEM_EXPIRATION_DATE:
if (recording->HasExpirationTime())
{
strValue = recording->ExpirationTimeAsLocalTime().GetAsLocalizedDate(false);
return true;
}
break;
case LISTITEM_EXPIRATION_TIME:
if (recording->HasExpirationTime())
{
strValue = recording->ExpirationTimeAsLocalTime().GetAsLocalizedTime("", false);;
return true;
}
break;
case VIDEOPLAYER_EPISODENAME:
case LISTITEM_EPISODENAME:
strValue = recording->EpisodeName();
return true;
case VIDEOPLAYER_CHANNEL_NAME:
case LISTITEM_CHANNEL_NAME:
strValue = recording->m_strChannelName;
return true;
//.........这里部分代码省略.........
示例4: 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();
//.........这里部分代码省略.........