mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- neutrino: add screensaver to radio-mode
This commit maybe need some tests with radiotext and/or other timeouts
This commit is contained in:
@@ -1287,7 +1287,7 @@ menu.hint_screen_setup Konfigurieren Sie den Bildschirmbereich für die Menüanz
|
||||
menu.hint_screensaver_delay Legen sie die Zeit (in Minuten) fest, nach der der Bildschirmschoner starten soll
|
||||
menu.hint_screensaver_dir Wählen Sie das Verzeichnis, in dem die Bilder für Ihren Bildschirmschoner gespeichert sind
|
||||
menu.hint_screensaver_timeout Wählen Sie Die Wartezeit bis zum Bilderwechsel des Bildschirmschoners
|
||||
menu.hint_screensaver_setup Konfigurieren Sie die Optionen des Bildschirmschoners für den Audioplayer
|
||||
menu.hint_screensaver_setup Konfigurieren Sie die Optionen des Bildschirmschoners für den Audioplayer und den Radio-Modus
|
||||
menu.hint_screenshot_count Wählen Sie, wie viele Screenshots erstellt werden sollen
|
||||
menu.hint_screenshot_cover Während der Wiedergabe von Aufnahmen kann ein Screenshot für die Vorschau im Moviebrowser erstellt werden
|
||||
menu.hint_screenshot_dir Wählen Sie das Verzeichnis zum Speichern der Screenshots
|
||||
|
@@ -1291,7 +1291,7 @@ menu.hint_screen_setup Configure screen margins
|
||||
menu.hint_screensaver_delay Set the time (in minutes) after which the screensaver has to start
|
||||
menu.hint_screensaver_dir Select directory in which the screensaver has to start
|
||||
menu.hint_screensaver_timeout Select the timeout to change pictures in screensavers
|
||||
menu.hint_screensaver_setup Configure screensaver options for audioplayer
|
||||
menu.hint_screensaver_setup Configure screensaver options for audioplayer and radio mode
|
||||
menu.hint_screenshot_count When no GUI on screen, you can save 1-5\nscreenshot serie
|
||||
menu.hint_screenshot_cover ON: When playing record, overwrite single\nscreenshot to show inside MovieBrowser
|
||||
menu.hint_screenshot_dir Select directory to save screenshots
|
||||
|
@@ -82,6 +82,7 @@
|
||||
#include "gui/plugins.h"
|
||||
#include "gui/rc_lock.h"
|
||||
#include "gui/scan_setup.h"
|
||||
#include "gui/screensaver.h"
|
||||
#include "gui/sleeptimer.h"
|
||||
#include "gui/start_wizard.h"
|
||||
#include "gui/update_ext.h"
|
||||
@@ -2135,6 +2136,21 @@ void CNeutrinoApp::showInfo()
|
||||
StartSubtitles();
|
||||
}
|
||||
|
||||
void CNeutrinoApp::screensaver(bool on)
|
||||
{
|
||||
if (on)
|
||||
{
|
||||
m_screensaver = true;
|
||||
CScreenSaver::getInstance()->Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
CScreenSaver::getInstance()->Stop();
|
||||
m_screensaver = false;
|
||||
m_idletime = time(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
||||
{
|
||||
neutrino_msg_t msg;
|
||||
@@ -2159,12 +2175,42 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
||||
|
||||
CLuaServer *luaServer = CLuaServer::getInstance();
|
||||
|
||||
m_idletime = time(NULL);
|
||||
m_screensaver = false;
|
||||
|
||||
while( true ) {
|
||||
luaServer->UnBlock();
|
||||
g_RCInput->getMsg(&msg, &data, 100, ((g_settings.mode_left_right_key_tv == SNeutrinoSettings::VOLUME) && (g_RemoteControl->subChannels.size() < 1)) ? true : false); // 10 secs..
|
||||
if (luaServer->Block(msg, data))
|
||||
continue;
|
||||
|
||||
if (mode == mode_radio) {
|
||||
if ( 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)
|
||||
screensaver(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_idletime = time(NULL);
|
||||
if (m_screensaver)
|
||||
{
|
||||
screensaver(false);
|
||||
|
||||
videoDecoder->StopPicture();
|
||||
videoDecoder->ShowPicture(DATADIR "/neutrino/icons/radiomode.jpg");
|
||||
|
||||
if (msg <= CRCInput::RC_MaxRC) {
|
||||
// ignore first keypress - just quit the screensaver
|
||||
g_RCInput->clearRCMsg();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( ( mode == mode_tv ) || ( mode == mode_radio ) || ( mode == mode_webtv ) ) {
|
||||
if( (msg == NeutrinoMessages::SHOW_EPG) /* || (msg == CRCInput::RC_info) */ ) {
|
||||
InfoClock->enableInfoClock(false);
|
||||
|
@@ -83,6 +83,9 @@ private:
|
||||
int network_dhcp;
|
||||
int network_automatic_start;
|
||||
|
||||
int m_idletime;
|
||||
bool m_screensaver;
|
||||
|
||||
int mode;
|
||||
int lastMode;
|
||||
bool softupdate;
|
||||
@@ -227,6 +230,7 @@ public:
|
||||
void lockPlayBack(bool blank = true);
|
||||
void stopPlayBack(bool lock = false);
|
||||
bool adjustToChannelID(const t_channel_id channel_id);
|
||||
void screensaver(bool);
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user