mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
Merge branch 'cst-next' of git://coolstreamtech.de/cst-public-gui-neutrino into ni/cst-next
Origin commit data
------------------
Commit: 0e5aceecbe
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-09-30 (Fri, 30 Sep 2016)
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
#include <driver/fade.h>
|
#include <driver/fade.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#ifdef HAVE_COOL_HARDWARE
|
#if HAVE_COOL_HARDWARE
|
||||||
#include <cnxtfb.h>
|
#include <cnxtfb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -61,6 +61,9 @@ void COSDFader::StartFadeIn()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
frameBuffer->setBlendLevel(fadeValue);
|
frameBuffer->setBlendLevel(fadeValue);
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO))
|
||||||
|
usleep(60000);
|
||||||
|
#endif
|
||||||
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
|
fadeTimer = g_RCInput->addTimer( FADE_TIME, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,10 +93,12 @@ void COSDFader::StopFade()
|
|||||||
if ( fadeIn || fadeOut ) {
|
if ( fadeIn || fadeOut ) {
|
||||||
g_RCInput->killTimer(fadeTimer);
|
g_RCInput->killTimer(fadeTimer);
|
||||||
#ifdef BOXMODEL_APOLLO
|
#ifdef BOXMODEL_APOLLO
|
||||||
usleep(40000);
|
|
||||||
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
||||||
#else
|
#else
|
||||||
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO))
|
||||||
|
usleep(60000);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
fadeIn = fadeOut = false;
|
fadeIn = fadeOut = false;
|
||||||
}
|
}
|
||||||
@@ -122,6 +127,9 @@ bool COSDFader::FadeDone()
|
|||||||
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(CNXTFB_BLEND_MODE_PER_PIXEL); // Global alpha multiplied with pixel alpha
|
||||||
#else
|
#else
|
||||||
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
frameBuffer->setBlendMode(1); // Global alpha multiplied with pixel alpha
|
||||||
|
#if HAVE_SPARK_HARDWARE || HAVE_DUCKBOX_HARDWARE || (HAVE_COOL_HARDWARE && defined(BOXMODEL_APOLLO))
|
||||||
|
usleep(60000);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
} else
|
} else
|
||||||
frameBuffer->setBlendLevel(fadeValue);
|
frameBuffer->setBlendLevel(fadeValue);
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
|
|
||||||
|
#include <driver/fade.h>
|
||||||
#include <driver/display.h>
|
#include <driver/display.h>
|
||||||
#include <driver/fontrenderer.h>
|
#include <driver/fontrenderer.h>
|
||||||
#include <driver/rcinput.h>
|
#include <driver/rcinput.h>
|
||||||
@@ -55,7 +56,7 @@ extern cAudio * audioDecoder;
|
|||||||
|
|
||||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||||
|
|
||||||
CStreamInfo2::CStreamInfo2 ()
|
CStreamInfo2::CStreamInfo2() : fader(g_settings.theme.menu_Content_alpha)
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance ();
|
frameBuffer = CFrameBuffer::getInstance ();
|
||||||
pip = NULL;
|
pip = NULL;
|
||||||
@@ -121,9 +122,11 @@ int CStreamInfo2::exec (CMenuTarget * parent, const std::string &)
|
|||||||
|
|
||||||
frontend = CFEManager::getInstance()->getLiveFE();
|
frontend = CFEManager::getInstance()->getLiveFE();
|
||||||
|
|
||||||
|
fader.StartFadeIn();
|
||||||
paint (paint_mode);
|
paint (paint_mode);
|
||||||
int res = doSignalStrengthLoop ();
|
int res = doSignalStrengthLoop ();
|
||||||
hide ();
|
hide ();
|
||||||
|
fader.StopFade();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +136,9 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
#define BAR_HEIGHT 12
|
#define BAR_HEIGHT 12
|
||||||
int res = menu_return::RETURN_REPAINT;
|
int res = menu_return::RETURN_REPAINT;
|
||||||
|
|
||||||
|
bool fadeout = false;
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
|
neutrino_msg_t postmsg = 0;
|
||||||
uint64_t maxb, minb, lastb, tmp_rate;
|
uint64_t maxb, minb, lastb, tmp_rate;
|
||||||
unsigned int current_pmt_version= pmt_version;
|
unsigned int current_pmt_version= pmt_version;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
@@ -151,6 +156,27 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS (100);
|
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd_MS (100);
|
||||||
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!mp) {
|
if (!mp) {
|
||||||
signal.sig = frontend->getSignalStrength() & 0xFFFF;
|
signal.sig = frontend->getSignalStrength() & 0xFFFF;
|
||||||
signal.snr = frontend->getSignalNoiseRatio() & 0xFFFF;
|
signal.snr = frontend->getSignalNoiseRatio() & 0xFFFF;
|
||||||
@@ -237,12 +263,12 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
}
|
}
|
||||||
else if(msg == CRCInput::RC_setup) {
|
else if(msg == CRCInput::RC_setup) {
|
||||||
res = menu_return::RETURN_EXIT_ALL;
|
res = menu_return::RETURN_EXIT_ALL;
|
||||||
break;
|
fadeout = true;
|
||||||
}
|
}
|
||||||
else if(CNeutrinoApp::getInstance()->listModeKey(msg)) {
|
else if(CNeutrinoApp::getInstance()->listModeKey(msg)) {
|
||||||
g_RCInput->postMsg (msg, 0);
|
postmsg = msg;
|
||||||
res = menu_return::RETURN_EXIT_ALL;
|
res = menu_return::RETURN_EXIT_ALL;
|
||||||
break;
|
fadeout = true;
|
||||||
}
|
}
|
||||||
else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
else if (msg == (neutrino_msg_t) g_settings.key_screenshot) {
|
||||||
CNeutrinoApp::getInstance ()->handleMsg (msg, data);
|
CNeutrinoApp::getInstance ()->handleMsg (msg, data);
|
||||||
@@ -251,7 +277,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
|
|
||||||
// -- any key --> abort
|
// -- any key --> abort
|
||||||
if (msg <= CRCInput::RC_MaxRC)
|
if (msg <= CRCInput::RC_MaxRC)
|
||||||
break;
|
fadeout = true;
|
||||||
|
|
||||||
// -- push other events
|
// -- push other events
|
||||||
if (msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout)
|
if (msg > CRCInput::RC_MaxRC && msg != CRCInput::RC_timeout)
|
||||||
@@ -260,6 +286,12 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
delete signalbox;
|
delete signalbox;
|
||||||
signalbox = NULL;
|
signalbox = NULL;
|
||||||
ts_close ();
|
ts_close ();
|
||||||
|
|
||||||
|
if (postmsg)
|
||||||
|
{
|
||||||
|
g_RCInput->postMsg(postmsg, 0);
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include <zapit/femanager.h>
|
#include <zapit/femanager.h>
|
||||||
|
|
||||||
|
|
||||||
|
class COSDFader;
|
||||||
class CStreamInfo2 : public CMenuTarget
|
class CStreamInfo2 : public CMenuTarget
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -39,6 +40,7 @@ class CStreamInfo2 : public CMenuTarget
|
|||||||
CFrontend *frontend;
|
CFrontend *frontend;
|
||||||
CComponentsPIP * pip;
|
CComponentsPIP * pip;
|
||||||
CMoviePlayerGui *mp;
|
CMoviePlayerGui *mp;
|
||||||
|
COSDFader fader;
|
||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
int width;
|
int width;
|
||||||
|
Reference in New Issue
Block a user