mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- movieplayer: use members from screensaver's code
Conflicts: src/gui/movieplayer.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -259,8 +259,8 @@ void CMoviePlayerGui::Init(void)
|
|||||||
isLuaPlay = false;
|
isLuaPlay = false;
|
||||||
haveLuaInfoFunc = false;
|
haveLuaInfoFunc = false;
|
||||||
blockedFromPlugin = false;
|
blockedFromPlugin = false;
|
||||||
m_screensaver = false;
|
|
||||||
m_idletime = time(NULL);
|
CScreenSaver::getInstance()->resetIdleTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMoviePlayerGui::cutNeutrino()
|
void CMoviePlayerGui::cutNeutrino()
|
||||||
@@ -1666,26 +1666,27 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
|||||||
showSubtitle(0);
|
showSubtitle(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (msg <= CRCInput::RC_MaxRC)
|
||||||
|
CScreenSaver::getInstance()->resetIdleTime();
|
||||||
|
|
||||||
if (playstate == CMoviePlayerGui::PAUSE && (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER))
|
if (playstate == CMoviePlayerGui::PAUSE && (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER))
|
||||||
{
|
{
|
||||||
int delay = time(NULL) - m_idletime;
|
time_t delay = time(NULL) - CScreenSaver::getInstance()->getIdleTime();
|
||||||
int screensaver_delay = g_settings.screensaver_delay;
|
if (g_settings.screensaver_delay && delay > g_settings.screensaver_delay*60 && !CScreenSaver::getInstance()->isActive())
|
||||||
if (screensaver_delay != 0 && delay > screensaver_delay*60 && !m_screensaver) {
|
{
|
||||||
videoDecoder->setBlank(true);
|
videoDecoder->setBlank(true);
|
||||||
screensaver(true);
|
CScreenSaver::getInstance()->Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_idletime = time(NULL);
|
if (CScreenSaver::getInstance()->isActive())
|
||||||
if (m_screensaver)
|
|
||||||
{
|
{
|
||||||
videoDecoder->setBlank(false);
|
videoDecoder->setBlank(false);
|
||||||
screensaver(false);
|
CScreenSaver::getInstance()->Stop();
|
||||||
#if 0 //ignore first keypress stop - just quit the screensaver and call infoviewer
|
if (msg <= CRCInput::RC_MaxRC)
|
||||||
if (msg <= CRCInput::RC_MaxRC) {
|
{
|
||||||
#endif
|
//ignore first keypress - just quit the screensaver and call infoviewer
|
||||||
if (msg <= CRCInput::RC_stop) {
|
|
||||||
g_RCInput->clearRCMsg();
|
g_RCInput->clearRCMsg();
|
||||||
callInfoViewer();
|
callInfoViewer();
|
||||||
continue;
|
continue;
|
||||||
@@ -3508,18 +3509,3 @@ size_t CMoviePlayerGui::GetReadCount()
|
|||||||
last_read = this_read;
|
last_read = this_read;
|
||||||
return (size_t) res;
|
return (size_t) res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMoviePlayerGui::screensaver(bool on)
|
|
||||||
{
|
|
||||||
if (on)
|
|
||||||
{
|
|
||||||
m_screensaver = true;
|
|
||||||
CScreenSaver::getInstance()->Start();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CScreenSaver::getInstance()->Stop();
|
|
||||||
m_screensaver = false;
|
|
||||||
m_idletime = time(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -136,11 +136,6 @@ class CMoviePlayerGui : public CMenuTarget
|
|||||||
int currentapid, currentac3;
|
int currentapid, currentac3;
|
||||||
repeat_mode_enum repeat_mode;
|
repeat_mode_enum repeat_mode;
|
||||||
|
|
||||||
/* screensaver */
|
|
||||||
int m_idletime;
|
|
||||||
bool m_screensaver;
|
|
||||||
void screensaver(bool on);
|
|
||||||
|
|
||||||
// subtitle data
|
// subtitle data
|
||||||
unsigned int numpids;
|
unsigned int numpids;
|
||||||
#ifndef REC_MAX_SPIDS
|
#ifndef REC_MAX_SPIDS
|
||||||
|
Reference in New Issue
Block a user