mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
Merge remote-tracking branch 'cst-next'
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <gui/plugins.h>
|
||||
#include <gui/videosettings.h>
|
||||
#include <gui/streaminfo2.h>
|
||||
#include <gui/screensaver.h>
|
||||
#include <driver/screenshot.h>
|
||||
#include <driver/volume.h>
|
||||
#include <driver/display.h>
|
||||
@@ -206,6 +207,8 @@ void CMoviePlayerGui::Init(void)
|
||||
keyPressed = CMoviePlayerGui::PLUGIN_PLAYSTATE_NORMAL;
|
||||
isLuaPlay = false;
|
||||
blockedFromPlugin = false;
|
||||
m_screensaver = false;
|
||||
m_idletime = time(NULL);
|
||||
}
|
||||
|
||||
void CMoviePlayerGui::cutNeutrino()
|
||||
@@ -980,6 +983,32 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
}
|
||||
showSubtitle(0);
|
||||
|
||||
if (playstate == CMoviePlayerGui::PAUSE && (msg == CRCInput::RC_timeout || msg == NeutrinoMessages::EVT_TIMER))
|
||||
{
|
||||
int delay = time(NULL) - m_idletime;
|
||||
int screensaver_delay = g_settings.screensaver_delay;
|
||||
if (screensaver_delay != 0 && delay > screensaver_delay*60 && !m_screensaver) {
|
||||
videoDecoder->setBlank(true);
|
||||
screensaver(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_idletime = time(NULL);
|
||||
if (m_screensaver)
|
||||
{
|
||||
videoDecoder->setBlank(false);
|
||||
screensaver(false);
|
||||
//ignore first keypress stop - just quit the screensaver and call infoviewer
|
||||
if (msg == CRCInput::RC_stop) {
|
||||
g_RCInput->clearRCMsg();
|
||||
callInfoViewer();
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (msg == (neutrino_msg_t) g_settings.mpkey_plugin) {
|
||||
g_PluginList->startPlugin_by_name(g_settings.movieplayer_plugin.c_str ());
|
||||
} else if (msg == (neutrino_msg_t) g_settings.mpkey_stop) {
|
||||
@@ -1015,8 +1044,6 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
repeat_mode = REPEAT_OFF;
|
||||
g_settings.movieplayer_repeat_on = repeat_mode;
|
||||
callInfoViewer();
|
||||
} else if (msg == (neutrino_msg_t) CRCInput::RC_setup) {
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0);
|
||||
} else if (msg == (neutrino_msg_t) g_settings.mpkey_play) {
|
||||
if (time_forced) {
|
||||
time_forced = false;
|
||||
@@ -1209,6 +1236,8 @@ void CMoviePlayerGui::PlayFileLoop(void)
|
||||
makeScreenShot(false, true);
|
||||
} else if (msg == CRCInput::RC_sat) {
|
||||
//FIXME do nothing ?
|
||||
} else if (msg == (neutrino_msg_t) CRCInput::RC_setup) {
|
||||
CNeutrinoApp::getInstance()->handleMsg(NeutrinoMessages::SHOW_MAINMENU, 0);
|
||||
} else if (msg == CRCInput::RC_red || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow || msg == CRCInput::RC_blue ) {
|
||||
//maybe move FileTime.kill to Usermenu to simplify this call
|
||||
bool restore = FileTime.IsVisible();
|
||||
@@ -2269,3 +2298,18 @@ size_t CMoviePlayerGui::GetReadCount()
|
||||
//printf("GetReadCount: %lld\n", 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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user