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


C++ CGUIWindowPVR类代码示例

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


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

示例1: GetActiveView

PVRWindow CGUIViewStatePVR::GetActiveView()
{
  PVRWindow returnWindow = PVR_WINDOW_UNKNOWN;

  int iActiveWindow = g_windowManager.GetActiveWindow();
  if (iActiveWindow == WINDOW_PVR)
  {
    CGUIWindowPVR *pWindow = (CGUIWindowPVR *) g_windowManager.GetWindow(WINDOW_PVR);
    CGUIWindowPVRCommon *pActiveView = NULL;
    if (pWindow && (pActiveView = pWindow->GetActiveView()) != NULL)
      returnWindow = pActiveView->GetWindowId();
  }

  return returnWindow;
}
开发者ID:A600,项目名称:xbmc,代码行数:15,代码来源:GUIViewStatePVR.cpp

示例2: while

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;
}
开发者ID:,项目名称:,代码行数:44,代码来源:

示例3: ShowBusyDialog

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);
  }

}
开发者ID:,项目名称:,代码行数:61,代码来源:


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