mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Merge remote-tracking branch 'tuxbox/master'
* needs compile fixes
* needs additional tests, of course :-)
Origin commit data
------------------
Commit: 13ab1ebc8a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2016-10-22 (Sat, 22 Oct 2016)
This commit is contained in:
@@ -37,13 +37,14 @@
|
||||
#include <neutrino.h>
|
||||
|
||||
#include <driver/abstime.h>
|
||||
#include <driver/fade.h>
|
||||
#include <driver/display.h>
|
||||
#include <driver/fontrenderer.h>
|
||||
#include <driver/rcinput.h>
|
||||
#include <driver/screen_max.h>
|
||||
#include <gui/color.h>
|
||||
#include <gui/color_custom.h>
|
||||
#include <gui/widget/icons.h>
|
||||
#include <gui/customcolor.h>
|
||||
#include <daemonc/remotecontrol.h>
|
||||
#include <zapit/zapit.h>
|
||||
#include <zapit/getservices.h>
|
||||
@@ -59,7 +60,7 @@ extern cAudio * audioDecoder;
|
||||
|
||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||
|
||||
CStreamInfo2::CStreamInfo2 ()
|
||||
CStreamInfo2::CStreamInfo2() : fader(g_settings.theme.menu_Content_alpha)
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance ();
|
||||
pip = NULL;
|
||||
@@ -125,9 +126,11 @@ int CStreamInfo2::exec (CMenuTarget * parent, const std::string &)
|
||||
|
||||
frontend = CFEManager::getInstance()->getLiveFE();
|
||||
|
||||
fader.StartFadeIn();
|
||||
paint (paint_mode);
|
||||
int res = doSignalStrengthLoop ();
|
||||
hide ();
|
||||
fader.StopFade();
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -137,7 +140,9 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
#define BAR_HEIGHT 12
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
|
||||
bool fadeout = false;
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_t postmsg = 0;
|
||||
uint64_t maxb, minb, lastb, tmp_rate;
|
||||
unsigned int current_pmt_version = (unsigned int)-1;
|
||||
int cnt = 0;
|
||||
@@ -222,6 +227,27 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
/* rate limiting is done in update_rate */
|
||||
g_RCInput->getMsg_us(&msg, &data, 0);
|
||||
|
||||
if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer()))
|
||||
{
|
||||
if (fader.FadeDone())
|
||||
{
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (fadeout && msg == CRCInput::RC_timeout)
|
||||
{
|
||||
if (fader.StartFadeOut())
|
||||
{
|
||||
msg = 0;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// switch paint mode
|
||||
if (msg == CRCInput::RC_red || msg == CRCInput::RC_blue || msg == CRCInput::RC_green || msg == CRCInput::RC_yellow) {
|
||||
hide ();
|
||||
@@ -231,12 +257,12 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
}
|
||||
else if(msg == CRCInput::RC_setup) {
|
||||
res = menu_return::RETURN_EXIT_ALL;
|
||||
break;
|
||||
fadeout = true;
|
||||
}
|
||||
else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) {
|
||||
g_RCInput->postMsg (msg, 0);
|
||||
else if(CNeutrinoApp::getInstance()->listModeKey(msg)) {
|
||||
postmsg = msg;
|
||||
res = menu_return::RETURN_EXIT_ALL;
|
||||
break;
|
||||
fadeout = true;
|
||||
}
|
||||
else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
||||
CNeutrinoApp::getInstance ()->handleMsg (msg, data);
|
||||
@@ -245,7 +271,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
|
||||
// -- any key --> abort
|
||||
if (msg <= CRCInput::RC_MaxRC)
|
||||
break;
|
||||
fadeout = true;
|
||||
|
||||
// -- push other events
|
||||
if (msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout)
|
||||
@@ -254,6 +280,12 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
||||
delete signalbox;
|
||||
signalbox = NULL;
|
||||
ts_close ();
|
||||
|
||||
if (postmsg)
|
||||
{
|
||||
g_RCInput->postMsg(postmsg, 0);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user