XInitThreads();
#endif
- // we start in frontend
- m_bInBackground = false;
/* for now always keep this around */
#ifdef HAS_KARAOKE
CLog::Log(LOGNOTICE, "start dvd mediatype detection");
m_DetectDVDType.Create(false, THREAD_MINSTACKSIZE);
#endif
-
- CLog::Log(LOGNOTICE, "initializing playlistplayer");
- g_playlistPlayer.SetRepeat(PLAYLIST_MUSIC, CMediaSettings::Get().DoesMusicPlaylistRepeat() ? PLAYLIST::REPEAT_ALL : PLAYLIST::REPEAT_NONE);
- g_playlistPlayer.SetShuffle(PLAYLIST_MUSIC, CMediaSettings::Get().IsMusicPlaylistShuffled());
- g_playlistPlayer.SetRepeat(PLAYLIST_VIDEO, CMediaSettings::Get().DoesVideoPlaylistRepeat() ? PLAYLIST::REPEAT_ALL : PLAYLIST::REPEAT_NONE);
- g_playlistPlayer.SetShuffle(PLAYLIST_VIDEO, CMediaSettings::Get().IsVideoPlaylistShuffled());
- CLog::Log(LOGNOTICE, "DONE initializing playlistplayer");
}
void CApplication::StopServices()
void CApplication::Render()
{
// do not render if we are stopped or in background
- if (m_bStop || m_bInBackground)
+ if (m_bStop)
return;
MEASURE_FUNCTION;
{
if (m_pPlayer->OnAction(action))
return true;
+ // Player ignored action; popup the OSD
+ if ((action.GetID() == ACTION_MOUSE_MOVE && (action.GetAmount(2) || action.GetAmount(3))) // filter "false" mouse move from touch
+ || action.GetID() == ACTION_MOUSE_LEFT_CLICK)
+ CApplicationMessenger::Get().SendAction(CAction(ACTION_TRIGGER_OSD), WINDOW_INVALID, false);
}
// stop : stops playing current audio song
CLog::Log(LOGNOTICE, "stop player");
m_pPlayer->ClosePlayer();
+ CAnnouncementManager::Deinitialize();
+
StopPVRManager();
StopServices();
//Sleep(5000);
if (dbs.Open())
{
CBookmark bookmark;
- if (dbs.GetResumeBookMark(item.GetPath(), bookmark))
+ CStdString path = item.GetPath();
+ if (item.HasProperty("original_listitem_url") && URIUtils::IsPlugin(item.GetProperty("original_listitem_url").asString()))
+ path = item.GetProperty("original_listitem_url").asString();
+ if( dbs.GetResumeBookMark(path, bookmark) )
{
startoffset = (int)(bookmark.timeInSeconds*75);
selectedFile = bookmark.partNumber;
{
// can only resume seek here, not dvdstate
CBookmark bookmark;
- if( dbs.GetResumeBookMark(item.GetPath(), bookmark) )
+ CStdString path = item.GetPath();
+ if (item.HasProperty("original_listitem_url") && URIUtils::IsPlugin(item.GetProperty("original_listitem_url").asString()))
+ path = item.GetProperty("original_listitem_url").asString();
+ if( dbs.GetResumeBookMark(path, bookmark) )
seconds = bookmark.timeInSeconds;
else
seconds = 0.0f;
should the playerState be required, it is fetched from the database.
See the note in CGUIWindowVideoBase::ShowResumeMenu.
*/
- if (item.HasVideoInfoTag() && item.GetVideoInfoTag()->m_resumePoint.IsSet())
- options.starttime = item.GetVideoInfoTag()->m_resumePoint.timeInSeconds;
+ if (item.IsResumePointSet())
+ options.starttime = item.GetCurrentResumeTime();
}
else if (item.HasVideoInfoTag())
{
// this really aught to be inside !bRestart, but since PlayStack
// uses that to init playback, we have to keep it outside
int playlist = g_playlistPlayer.GetCurrentPlaylist();
- if (item.IsVideo() && g_playlistPlayer.GetPlaylist(playlist).size() > 1)
+ if (item.IsVideo() && playlist == PLAYLIST_VIDEO && g_playlistPlayer.GetPlaylist(playlist).size() > 1)
{ // playing from a playlist by the looks
// don't switch to fullscreen if we are not playing the first item...
options.fullscreen = !g_playlistPlayer.HasPlayedFirstFile() && g_advancedSettings.m_fullScreenOnMovieStart && !CMediaSettings::Get().DoesVideoStartWindowed();
void CApplication::CheckScreenSaverAndDPMS()
{
- if (m_bInBackground)
- return;
if (!m_dpmsIsActive)
g_Windowing.ResetOSScreensaver();
g_windowManager.ActivateWindow(WINDOW_SCREENSAVER);
}
-void CApplication::SetInBackground(bool background)
-{
- if (!background)
- {
- ResetScreenSaverTimer();
- }
- m_bInBackground = background;
-}
-
void CApplication::CheckShutdown()
{
// first check if we should reset the timer
CAEFactory::GarbageCollect();
+ // if we don't render the gui there's no reason to start the screensaver.
+ // that way the screensaver won't kick in if we maximize the XBMC window
+ // after the screensaver start time.
+ if(!m_renderGUI)
+ ResetScreenSaverTimer();
}
// Global Idle Time in Seconds