本文整理汇总了C++中CPVRTimerInfoTag::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRTimerInfoTag::Start方法的具体用法?C++ CPVRTimerInfoTag::Start怎么用?C++ CPVRTimerInfoTag::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRTimerInfoTag
的用法示例。
在下文中一共展示了CPVRTimerInfoTag::Start方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
int CPVRTimers::Update()
{
CSingleLock lock(m_critSection);
CLog::Log(LOGDEBUG, "PVRTimers - %s - updating timers",
__FUNCTION__);
int iCurSize = size();
/* clear channel timers */
for (unsigned int iTimerPtr = 0; iTimerPtr < size(); iTimerPtr++)
{
CPVRTimerInfoTag *timerTag = &at(iTimerPtr);
if (!timerTag || !timerTag->Active())
continue;
CPVREpgInfoTag *epgTag = (CPVREpgInfoTag *)timerTag->EpgInfoTag();
if (!epgTag)
continue;
epgTag->SetTimer(NULL);
}
/* clear timers */
clear();
/* get all timers from the clients */
CLIENTMAP *clients = g_PVRManager.Clients();
CLIENTMAPITR itr = clients->begin();
while (itr != clients->end())
{
if (g_PVRManager.GetClientProps((*itr).second->GetID())->SupportTimers)
{
if ((*itr).second->GetNumTimers() > 0)
{
(*itr).second->GetAllTimers(this);
}
}
itr++;
}
//XXX
g_PVRManager.UpdateRecordingsCache();
/* set channel timers */
for (unsigned int ptr = 0; ptr < size(); ptr++)
{
/* get the timer tag */
CPVRTimerInfoTag *timerTag = &at(ptr);
if (!timerTag || !timerTag->Active())
continue;
/* try to get the channel */
CPVRChannel *channel = CPVRChannels::GetByClientFromAll(timerTag->Number(), timerTag->ClientID());
if (!channel)
continue;
/* try to get the EPG */
CPVREpg *epg = channel->GetEPG();
if (!epg)
continue;
/* try to set the timer on the epg tag that matches */
CPVREpgInfoTag *epgTag = (CPVREpgInfoTag *) epg->InfoTagBetween(timerTag->Start(), timerTag->Stop());
if (epgTag)
epgTag->SetTimer(timerTag);
}
return size() - iCurSize;
}
示例2: GetEPGSearch
int CPVREpgs::GetEPGSearch(CFileItemList* results, const PVREpgSearchFilter &filter)
{
for (unsigned int iEpgPtr = 0; iEpgPtr < size(); iEpgPtr++)
{
CPVREpg *epg = at(iEpgPtr);
epg->Get(results, filter);
}
/* filter recordings */
if (filter.m_bIgnorePresentRecordings && PVRRecordings.size() > 0)
{
for (unsigned int iRecordingPtr = 0; iRecordingPtr < PVRRecordings.size(); iRecordingPtr++)
{
for (int iResultPtr = 0; iResultPtr < results->Size(); iResultPtr++)
{
const CPVREpgInfoTag *epgentry = results->Get(iResultPtr)->GetEPGInfoTag();
CPVRRecordingInfoTag *recording = &PVRRecordings[iRecordingPtr];
if (epgentry)
{
if (epgentry->Title() != recording->Title() ||
epgentry->PlotOutline() != recording->PlotOutline() ||
epgentry->Plot() != recording->Plot())
continue;
results->Remove(iResultPtr);
iResultPtr--;
}
}
}
}
/* filter timers */
if (filter.m_bIgnorePresentTimers && PVRTimers.size() > 0)
{
for (unsigned int iTimerPtr = 0; iTimerPtr < PVRTimers.size(); iTimerPtr++)
{
for (int iResultPtr = 0; iResultPtr < results->Size(); iResultPtr++)
{
const CPVREpgInfoTag *epgentry = results->Get(iResultPtr)->GetEPGInfoTag();
CPVRTimerInfoTag *timer = &PVRTimers[iTimerPtr];
if (epgentry)
{
if (epgentry->ChannelTag()->ChannelNumber() != timer->ChannelNumber() ||
epgentry->Start() < timer->Start() ||
epgentry->End() > timer->Stop())
continue;
results->Remove(iResultPtr);
iResultPtr--;
}
}
}
}
/* remove duplicate entries */
if (filter.m_bPreventRepeats)
{
unsigned int iSize = results->Size();
for (unsigned int iResultPtr = 0; iResultPtr < iSize; iResultPtr++)
{
const CPVREpgInfoTag *epgentry_1 = results->Get(iResultPtr)->GetEPGInfoTag();
for (unsigned int iTagPtr = 0; iTagPtr < iSize; iTagPtr++)
{
const CPVREpgInfoTag *epgentry_2 = results->Get(iTagPtr)->GetEPGInfoTag();
if (iResultPtr == iTagPtr)
continue;
if (epgentry_1->Title() != epgentry_2->Title() ||
epgentry_1->Plot() != epgentry_2->Plot() ||
epgentry_1->PlotOutline() != epgentry_2->PlotOutline())
continue;
results->Remove(iTagPtr);
iSize = results->Size();
iResultPtr--;
iTagPtr--;
}
}
}
return results->Size();
}