mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
infoviewer: extension infobar timeout for motor rotation
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2133 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -815,31 +815,33 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
|
|||||||
aspectRatio = 0;
|
aspectRatio = 0;
|
||||||
fileplay = 0;
|
fileplay = 0;
|
||||||
}
|
}
|
||||||
|
void CInfoViewer::setInfobarTimeout(int timeout_ext)
|
||||||
|
{
|
||||||
|
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||||
|
//define timeouts
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
|
case NeutrinoMessages::mode_tv:
|
||||||
|
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + timeout_ext);
|
||||||
|
break;
|
||||||
|
case NeutrinoMessages::mode_radio:
|
||||||
|
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] + timeout_ext);
|
||||||
|
break;
|
||||||
|
case NeutrinoMessages::mode_ts:
|
||||||
|
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE] + timeout_ext);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
timeoutEnd = CRCInput::calcTimeoutEnd(6 + timeout_ext);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
void CInfoViewer::loop(bool show_dot)
|
void CInfoViewer::loop(bool show_dot)
|
||||||
{
|
{
|
||||||
bool hideIt = true;
|
bool hideIt = true;
|
||||||
virtual_zap_mode = false;
|
virtual_zap_mode = false;
|
||||||
//bool fadeOut = false;
|
//bool fadeOut = false;
|
||||||
uint64_t timeoutEnd;
|
timeoutEnd=0;;
|
||||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
setInfobarTimeout();
|
||||||
|
|
||||||
//define timeouts
|
|
||||||
switch (mode)
|
|
||||||
{
|
|
||||||
case NeutrinoMessages::mode_tv:
|
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR]);
|
|
||||||
break;
|
|
||||||
case NeutrinoMessages::mode_radio:
|
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_RADIO]);
|
|
||||||
break;
|
|
||||||
case NeutrinoMessages::mode_ts:
|
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR_MOVIE]);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(6);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
int res = messages_return::none;
|
int res = messages_return::none;
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
@@ -1033,14 +1035,14 @@ void CInfoViewer::showSubchan ()
|
|||||||
} else
|
} else
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT, 0, true);
|
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||||
|
|
||||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (2);
|
uint64_t timeoutEnd_tmp = CRCInput::calcTimeoutEnd (2);
|
||||||
int res = messages_return::none;
|
int res = messages_return::none;
|
||||||
|
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
neutrino_msg_data_t data;
|
neutrino_msg_data_t data;
|
||||||
|
|
||||||
while (!(res & (messages_return::cancel_info | messages_return::cancel_all))) {
|
while (!(res & (messages_return::cancel_info | messages_return::cancel_all))) {
|
||||||
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd_tmp);
|
||||||
|
|
||||||
if (msg == CRCInput::RC_timeout) {
|
if (msg == CRCInput::RC_timeout) {
|
||||||
res = messages_return::cancel_info;
|
res = messages_return::cancel_info;
|
||||||
@@ -1204,6 +1206,8 @@ void CInfoViewer::showFailure ()
|
|||||||
|
|
||||||
void CInfoViewer::showMotorMoving (int duration)
|
void CInfoViewer::showMotorMoving (int duration)
|
||||||
{
|
{
|
||||||
|
setInfobarTimeout(duration + 1);
|
||||||
|
|
||||||
char text[256];
|
char text[256];
|
||||||
snprintf(text, sizeof(text), "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration);
|
snprintf(text, sizeof(text), "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration);
|
||||||
ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8
|
ShowHintUTF (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8
|
||||||
|
@@ -111,6 +111,8 @@ class CInfoViewer
|
|||||||
char old_timestr[10];
|
char old_timestr[10];
|
||||||
static const short bar_width = 72;
|
static const short bar_width = 72;
|
||||||
static event_id_t last_curr_id, last_next_id;
|
static event_id_t last_curr_id, last_next_id;
|
||||||
|
uint64_t timeoutEnd;
|
||||||
|
void setInfobarTimeout(int timeout_ext = 0);
|
||||||
|
|
||||||
CChannelEventList evtlist;
|
CChannelEventList evtlist;
|
||||||
CChannelEventList::iterator eli;
|
CChannelEventList::iterator eli;
|
||||||
|
Reference in New Issue
Block a user