本文整理汇总了C++中CGUIWindowPVR::Reset方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIWindowPVR::Reset方法的具体用法?C++ CGUIWindowPVR::Reset怎么用?C++ CGUIWindowPVR::Reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIWindowPVR
的用法示例。
在下文中一共展示了CGUIWindowPVR::Reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
bool CPVRManager::Load(void)
{
/* start the add-on update thread */
m_addons->Start();
/* load at least one client */
while (GetState() == ManagerStateStarting && m_addons && !m_addons->HasConnectedClients())
Sleep(50);
if (GetState() != ManagerStateStarting || !m_addons || !m_addons->HasConnectedClients())
return false;
CLog::Log(LOGDEBUG, "PVRManager - %s - active clients found. continue to start", __FUNCTION__);
/* load all channels and groups */
ShowProgressDialog(g_localizeStrings.Get(19236), 0);
if (!m_channelGroups->Load() || GetState() != ManagerStateStarting)
return false;
/* get timers from the backends */
ShowProgressDialog(g_localizeStrings.Get(19237), 50);
m_timers->Load();
/* get recordings from the backend */
ShowProgressDialog(g_localizeStrings.Get(19238), 75);
m_recordings->Load();
CSingleLock lock(m_critSection);
if (GetState() != ManagerStateStarting)
return false;
CGUIWindowPVR *pWindow = (CGUIWindowPVR *) g_windowManager.GetWindow(WINDOW_PVR);
if (pWindow)
pWindow->Reset();
/* start the other pvr related update threads */
ShowProgressDialog(g_localizeStrings.Get(19239), 85);
m_guiInfo->Start();
/* close the progess dialog */
HideProgressDialog();
return true;
}
示例2: Process
void CPVRManager::Process(void)
{
/* load the pvr data from the db and clients if it's not already loaded */
if (!Load())
{
/* close the busy dialog */
ShowBusyDialog(false);
CLog::Log(LOGERROR, "PVRManager - %s - failed to load PVR data", __FUNCTION__);
return;
}
/* reset observers that are observing pvr related data in the pvr windows, or updates won't work after a reload */
CGUIWindowPVR *pWindow = (CGUIWindowPVR *) g_windowManager.GetWindow(WINDOW_PVR);
if (pWindow)
pWindow->Reset();
/* start the other pvr related update threads */
m_addons->Start();
m_guiInfo->Start();
m_epg->RegisterObserver(this);
m_epg->Start();
/* continue last watched channel after first startup */
if (!m_bStop && m_bFirstStart && g_guiSettings.GetInt("pvrplayback.startlast") != START_LAST_CHANNEL_OFF)
ContinueLastChannel();
/* close the busy dialog */
ShowBusyDialog(false);
/* signal to window that clients are loaded */
if (pWindow)
pWindow->UnlockWindow();
/* check whether all channel icons are cached */
m_channelGroups->GetGroupAllRadio()->CacheIcons();
m_channelGroups->GetGroupAllTV()->CacheIcons();
CLog::Log(LOGDEBUG, "PVRManager - %s - entering main loop", __FUNCTION__);
/* main loop */
while (!m_bStop)
{
/* keep trying to load remaining clients if they're not already loaded */
if (!m_addons->AllClientsLoaded())
m_addons->TryLoadClients(1);
/* execute the next pending jobs if there are any */
ExecutePendingJobs();
/* check if the (still) are any enabled addons */
if (DisableIfNoClients())
{
CLog::Log(LOGNOTICE, "PVRManager - %s - no add-ons enabled. disabling PVR functionality", __FUNCTION__);
Stop();
return;
}
WaitForSingleObject(m_triggerEvent, 1000);
}
}