本文整理汇总了C++中CGUIWindowSlideShow::IsPaused方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIWindowSlideShow::IsPaused方法的具体用法?C++ CGUIWindowSlideShow::IsPaused怎么用?C++ CGUIWindowSlideShow::IsPaused使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIWindowSlideShow
的用法示例。
在下文中一共展示了CGUIWindowSlideShow::IsPaused方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPropertyValue
JSON_STATUS CPlayerOperations::GetPropertyValue(PlayerType player, const CStdString &property, CVariant &result)
{
if (player == None)
return FailedToExecute;
int playlist = GetPlaylist(player);
if (property.Equals("type"))
{
switch (player)
{
case Video:
result = "video";
break;
case Audio:
result = "audio";
break;
case Picture:
result = "picture";
break;
default:
return FailedToExecute;
}
}
else if (property.Equals("partymode"))
{
switch (player)
{
case Video:
case Audio:
result = g_partyModeManager.IsEnabled();
break;
case Picture:
result = false;
break;
default:
return FailedToExecute;
}
}
else if (property.Equals("speed"))
{
CGUIWindowSlideShow *slideshow = NULL;
switch (player)
{
case Video:
case Audio:
result = g_application.IsPaused() ? 0 : g_application.GetPlaySpeed();
break;
case Picture:
slideshow = (CGUIWindowSlideShow*)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (slideshow && slideshow->IsPlaying() && !slideshow->IsPaused())
result = slideshow->GetDirection();
else
result = 0;
break;
default:
return FailedToExecute;
}
}
else if (property.Equals("time"))
{
switch (player)
{
case Video:
case Audio:
MillisecondsToTimeObject((int)(g_application.GetTime() * 1000.0), result);
break;
case Picture:
MillisecondsToTimeObject(0, result);
break;
default:
return FailedToExecute;
}
}
else if (property.Equals("percentage"))
{
CGUIWindowSlideShow *slideshow = NULL;
switch (player)
{
case Video:
case Audio:
result = g_application.GetPercentage();
break;
case Picture:
slideshow = (CGUIWindowSlideShow*)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (slideshow && slideshow->NumSlides() > 0)
result = (double)slideshow->CurrentSlide() / slideshow->NumSlides();
else
result = 0.0;
break;
//.........这里部分代码省略.........
示例2: GetPropertyValue
JSONRPC_STATUS CPlayerOperations::GetPropertyValue(PlayerType player, const std::string &property, CVariant &result)
{
if (player == None)
return FailedToExecute;
int playlist = GetPlaylist(player);
if (property == "type")
{
switch (player)
{
case Video:
result = "video";
break;
case Audio:
result = "audio";
break;
case Picture:
result = "picture";
break;
default:
return FailedToExecute;
}
}
else if (property == "partymode")
{
switch (player)
{
case Video:
case Audio:
if (IsPVRChannel())
{
result = false;
break;
}
result = g_partyModeManager.IsEnabled();
break;
case Picture:
result = false;
break;
default:
return FailedToExecute;
}
}
else if (property == "speed")
{
CGUIWindowSlideShow *slideshow = NULL;
switch (player)
{
case Video:
case Audio:
result = g_application.m_pPlayer->IsPausedPlayback() ? 0 : g_application.m_pPlayer->GetPlaySpeed();
break;
case Picture:
slideshow = (CGUIWindowSlideShow*)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (slideshow && slideshow->IsPlaying() && !slideshow->IsPaused())
result = slideshow->GetDirection();
else
result = 0;
break;
default:
return FailedToExecute;
}
}
else if (property == "time")
{
switch (player)
{
case Video:
case Audio:
{
int ms = 0;
if (!IsPVRChannel())
ms = (int)(g_application.GetTime() * 1000.0);
else
{
EPG::CEpgInfoTagPtr epg(GetCurrentEpg());
if (epg)
ms = epg->Progress() * 1000;
}
MillisecondsToTimeObject(ms, result);
break;
}
case Picture:
MillisecondsToTimeObject(0, result);
break;
default:
return FailedToExecute;
}
//.........这里部分代码省略.........