mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
neutrino: port "EPG title in LCD" from tuxbox
This commit is contained in:
@@ -203,7 +203,7 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data
|
|||||||
{
|
{
|
||||||
//printf("[neutrino] channel match\n");
|
//printf("[neutrino] channel match\n");
|
||||||
//CURRENT-EPG f<>r den aktuellen Kanal bekommen!;
|
//CURRENT-EPG f<>r den aktuellen Kanal bekommen!;
|
||||||
|
CVFD::getInstance()->setEPGTitle(info_CN->current_name);
|
||||||
if ( info_CN->current_uniqueKey != current_EPGid )
|
if ( info_CN->current_uniqueKey != current_EPGid )
|
||||||
{
|
{
|
||||||
//printf("[neutrino] info_CN->current_uniqueKey != current_EPGid\n");
|
//printf("[neutrino] info_CN->current_uniqueKey != current_EPGid\n");
|
||||||
|
@@ -110,6 +110,7 @@ class CVFD
|
|||||||
void setMode(const MODES m, const char * const title = "");
|
void setMode(const MODES m, const char * const title = "");
|
||||||
|
|
||||||
void showServicename(const std::string & name); // UTF-8
|
void showServicename(const std::string & name); // UTF-8
|
||||||
|
void setEPGTitle(const std::string) { return; };
|
||||||
void showTime(bool force = false);
|
void showTime(bool force = false);
|
||||||
/** blocks for duration seconds */
|
/** blocks for duration seconds */
|
||||||
void showRCLock(int duration = 2);
|
void showRCLock(int duration = 2);
|
||||||
|
@@ -1189,6 +1189,8 @@ void CChannelList::zapTo(int pos, bool /* forceStoreToLastChannels */)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tuned = pos;
|
tuned = pos;
|
||||||
|
CVFD::getInstance()->setEPGTitle("");
|
||||||
|
CVFD::getInstance()->showServicename(chan->name);
|
||||||
g_RemoteControl->zapTo_ChannelID(chan->channel_id, chan->name, !chan->bAlwaysLocked); // UTF-8
|
g_RemoteControl->zapTo_ChannelID(chan->channel_id, chan->name, !chan->bAlwaysLocked); // UTF-8
|
||||||
// TODO check is it possible bouquetList is NULL ?
|
// TODO check is it possible bouquetList is NULL ?
|
||||||
if (bouquetList != NULL) {
|
if (bouquetList != NULL) {
|
||||||
@@ -1226,6 +1228,8 @@ void CChannelList::NewZap(t_channel_id channel_id)
|
|||||||
printf("**************************** CChannelList::NewZap me %p %s tuned %d new %s -> %llx\n", this, name.c_str(), tuned, chan->name.c_str(), chan->channel_id);
|
printf("**************************** CChannelList::NewZap me %p %s tuned %d new %s -> %llx\n", this, name.c_str(), tuned, chan->name.c_str(), chan->channel_id);
|
||||||
|
|
||||||
if(selected_chid != chan->getChannelID()) {
|
if(selected_chid != chan->getChannelID()) {
|
||||||
|
CVFD::getInstance()->setEPGTitle("");
|
||||||
|
CVFD::getInstance()->showServicename(chan->name);
|
||||||
selected_chid = chan->getChannelID();
|
selected_chid = chan->getChannelID();
|
||||||
g_RemoteControl->zapTo_ChannelID(chan->getChannelID(), chan->name, !chan->bAlwaysLocked);
|
g_RemoteControl->zapTo_ChannelID(chan->getChannelID(), chan->name, !chan->bAlwaysLocked);
|
||||||
/* remove recordModeActive from infobar */
|
/* remove recordModeActive from infobar */
|
||||||
|
@@ -1425,6 +1425,8 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
show_Data (true);
|
show_Data (true);
|
||||||
}
|
}
|
||||||
showLcdPercentOver ();
|
showLcdPercentOver ();
|
||||||
|
eventname = info_CurrentNext.current_name;
|
||||||
|
CVFD::getInstance()->setEPGTitle(eventname);
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
} else if (msg == NeutrinoMessages::EVT_ZAP_SUB_FAILED) {
|
} else if (msg == NeutrinoMessages::EVT_ZAP_SUB_FAILED) {
|
||||||
chanready = 1;
|
chanready = 1;
|
||||||
@@ -2133,6 +2135,46 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id, const int c
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAVE_TRIPLEDRAGON
|
||||||
|
/* the cheap COOLSTREAM display cannot do this, so keep the routines separate */
|
||||||
|
void CInfoViewer::showLcdPercentOver()
|
||||||
|
{
|
||||||
|
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1)
|
||||||
|
{
|
||||||
|
if (fileplay || NeutrinoMessages::mode_ts == CNeutrinoApp::getInstance()->getMode()) {
|
||||||
|
CVFD::getInstance()->showPercentOver(CMoviePlayerGui::getInstance().file_prozent);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
static long long old_interval = 0;
|
||||||
|
int runningPercent = -1;
|
||||||
|
time_t jetzt = time(NULL);
|
||||||
|
long long interval = 60000000; /* 60 seconds default update time */
|
||||||
|
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
||||||
|
if (jetzt < info_CurrentNext.current_zeit.startzeit)
|
||||||
|
runningPercent = 0;
|
||||||
|
else if (jetzt > (int)(info_CurrentNext.current_zeit.startzeit +
|
||||||
|
info_CurrentNext.current_zeit.dauer))
|
||||||
|
runningPercent = -2; /* overtime */
|
||||||
|
else {
|
||||||
|
runningPercent = MIN((jetzt-info_CurrentNext.current_zeit.startzeit) * 100 /
|
||||||
|
info_CurrentNext.current_zeit.dauer, 100);
|
||||||
|
interval = info_CurrentNext.current_zeit.dauer * 1000LL * (1000/100); // update every percent
|
||||||
|
if (is_visible && interval > 60000000) // if infobar visible, update at
|
||||||
|
interval = 60000000; // least once per minute (radio mode)
|
||||||
|
if (interval < 5000000)
|
||||||
|
interval = 5000000; // but update only every 5 seconds
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (interval != old_interval) {
|
||||||
|
g_RCInput->killTimer(lcdUpdateTimer);
|
||||||
|
lcdUpdateTimer = g_RCInput->addTimer(interval, false);
|
||||||
|
//printf("lcdUpdateTimer: interval %lld old %lld\n",interval/1000000,old_interval/1000000);
|
||||||
|
old_interval = interval;
|
||||||
|
}
|
||||||
|
CLCD::getInstance()->showPercentOver(runningPercent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
void CInfoViewer::showLcdPercentOver ()
|
void CInfoViewer::showLcdPercentOver ()
|
||||||
{
|
{
|
||||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) {
|
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) {
|
||||||
@@ -2156,6 +2198,7 @@ void CInfoViewer::showLcdPercentOver ()
|
|||||||
CVFD::getInstance ()->showPercentOver (runningPercent);
|
CVFD::getInstance ()->showPercentOver (runningPercent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CInfoViewer::showEpgInfo() //message on event change
|
void CInfoViewer::showEpgInfo() //message on event change
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user