mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
Merge branch 'ni/mp' into ni/cst-next
Conflicts:
data/icons/shutdown.jpg
data/icons/start.jpg
data/locale/Makefile.am
data/locale/deutsch.locale
data/locale/english.locale
lib/libdvbsub/dvbsub.cpp
lib/libdvbsub/dvbsubtitle.cpp
lib/libtuxtxt/tuxtxt.cpp
lib/libtuxtxt/tuxtxt.h
src/gui/dboxinfo.cpp
src/gui/movieplayer.cpp
src/gui/streaminfo2.cpp
src/gui/themes.cpp
src/neutrino.cpp
src/neutrino_menue.cpp
src/nhttpd/Makefile.am
src/system/flashtool.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 161347db29
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-26 (Fri, 26 Aug 2016)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -109,6 +109,9 @@ CInfoViewer::CInfoViewer ()
|
||||
txt_cur_start = txt_cur_event = txt_cur_event_rest = txt_next_start = txt_next_event = txt_next_in = NULL;
|
||||
timescale = NULL;
|
||||
clock = NULL;
|
||||
info_CurrentNext.current_zeit.startzeit = 0;
|
||||
info_CurrentNext.current_zeit.dauer = 0;
|
||||
info_CurrentNext.flags = 0;
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
infoViewerBB = CInfoViewerBB::getInstance();
|
||||
|
||||
@@ -826,7 +829,7 @@ void CInfoViewer::showTitle(CZapitChannel * channel, const bool calledFromNumZap
|
||||
const int channel_number_width =(g_settings.infobar_show_channellogo == 6) ? 5 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (strChanNum) : 0;
|
||||
ChannelLogoMode = showChannelLogo(current_channel_id,channel_number_width); // get logo mode, paint channel logo if adjusted
|
||||
logo_ok = ( g_settings.infobar_show_channellogo != 0 && ChannelLogoMode != 0);
|
||||
fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_settings.infobar_show_channellogo, ChannelLogoMode, logo_ok);
|
||||
//fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_settings.infobar_show_channellogo, ChannelLogoMode, logo_ok);
|
||||
|
||||
if (g_settings.infobar_sat_display) {
|
||||
std::string name = (IS_WEBTV(current_channel_id))? "WebTV" : CServiceManager::getInstance()->GetSatelliteName(satellitePosition);
|
||||
@@ -1607,6 +1610,8 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
||||
show_Data (true);
|
||||
}
|
||||
showLcdPercentOver ();
|
||||
eventname = info_CurrentNext.current_name;
|
||||
CVFD::getInstance()->setEPGTitle(eventname);
|
||||
return messages_return::handled;
|
||||
} else if (msg == NeutrinoMessages::EVT_ZAP_SUB_FAILED) {
|
||||
//chanready = 1;
|
||||
@@ -1669,43 +1674,41 @@ void CInfoViewer::sendNoEpg(const t_channel_id for_channel_id)
|
||||
}
|
||||
}
|
||||
|
||||
CSectionsdClient::CurrentNextInfo CInfoViewer::getEPG (const t_channel_id for_channel_id, CSectionsdClient::CurrentNextInfo &info)
|
||||
void CInfoViewer::getEPG(const t_channel_id for_channel_id, CSectionsdClient::CurrentNextInfo &info)
|
||||
{
|
||||
/* to clear the oldinfo for channels without epg, call getEPG() with for_channel_id = 0 */
|
||||
if (for_channel_id == 0 || IS_WEBTV(for_channel_id))
|
||||
{
|
||||
oldinfo.current_uniqueKey = 0;
|
||||
return info;
|
||||
return;
|
||||
}
|
||||
|
||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_epg_id, info);
|
||||
|
||||
//printf("CInfoViewer::getEPG: old uniqueKey %llx new %llx\n", oldinfo.current_uniqueKey, info.current_uniqueKey);
|
||||
|
||||
/* of there is no EPG, send an event so that parental lock can work */
|
||||
if (info.current_uniqueKey == 0 && info.next_uniqueKey == 0) {
|
||||
memcpy(&oldinfo, &info, sizeof(CSectionsdClient::CurrentNextInfo));
|
||||
sendNoEpg(for_channel_id);
|
||||
oldinfo = info;
|
||||
return info;
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.current_uniqueKey != oldinfo.current_uniqueKey || info.next_uniqueKey != oldinfo.next_uniqueKey) {
|
||||
if (info.flags & (CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::has_next)) {
|
||||
char *_info = new char[sizeof(CSectionsdClient::CurrentNextInfo)];
|
||||
memcpy(_info, &info, sizeof(CSectionsdClient::CurrentNextInfo));
|
||||
neutrino_msg_t msg;
|
||||
if (info.current_uniqueKey != oldinfo.current_uniqueKey || info.next_uniqueKey != oldinfo.next_uniqueKey)
|
||||
{
|
||||
char *p = new char[sizeof(t_channel_id)];
|
||||
memcpy(p, &for_channel_id, sizeof(t_channel_id));
|
||||
neutrino_msg_t msg;
|
||||
if (info.flags & (CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::has_next))
|
||||
{
|
||||
if (info.flags & CSectionsdClient::epgflags::has_current)
|
||||
msg = NeutrinoMessages::EVT_CURRENTEPG;
|
||||
else
|
||||
msg = NeutrinoMessages::EVT_NEXTEPG;
|
||||
g_RCInput->postMsg(msg, (unsigned) _info, false );
|
||||
} else {
|
||||
sendNoEpg(for_channel_id);
|
||||
}
|
||||
oldinfo = info;
|
||||
else
|
||||
msg = NeutrinoMessages::EVT_NOEPG_YET;
|
||||
g_RCInput->postMsg(msg, (const neutrino_msg_data_t)p, false); // data is pointer to allocated memory
|
||||
memcpy(&oldinfo, &info, sizeof(CSectionsdClient::CurrentNextInfo));
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
void CInfoViewer::showSNR ()
|
||||
@@ -1954,11 +1957,15 @@ void CInfoViewer::show_Data (bool calledFromEvent)
|
||||
info_CurrentNext.current_zeit.startzeit = g_RemoteControl->subChannels[g_RemoteControl->selected_subchannel].startzeit;
|
||||
info_CurrentNext.current_zeit.dauer = g_RemoteControl->subChannels[g_RemoteControl->selected_subchannel].dauer;
|
||||
} else {
|
||||
#if 0
|
||||
/* this triggers false positives on some channels.
|
||||
* TODO: test on real NVOD channels, if this was even necessary at all */
|
||||
if ((info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) && (info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) && (showButtonBar)) {
|
||||
if ((uint) info_CurrentNext.next_zeit.startzeit < (info_CurrentNext.current_zeit.startzeit + info_CurrentNext.current_zeit.dauer)) {
|
||||
is_nvod = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
time_t jetzt = time (NULL);
|
||||
@@ -2310,7 +2317,7 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id, const int c
|
||||
|
||||
bool logo_available = g_PicViewer->GetLogoName(logo_channel_id, ChannelName, strAbsIconPath, &logo_w, &logo_h);
|
||||
|
||||
fprintf(stderr, "%s: logo_available: %d file: %s\n", __FUNCTION__, logo_available, strAbsIconPath.c_str());
|
||||
//fprintf(stderr, "%s: logo_available: %d file: %s\n", __FUNCTION__, logo_available, strAbsIconPath.c_str());
|
||||
|
||||
if (! logo_available)
|
||||
return 0;
|
||||
@@ -2384,6 +2391,49 @@ int CInfoViewer::showChannelLogo(const t_channel_id logo_channel_id, const int c
|
||||
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);
|
||||
int mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if ((mode == NeutrinoMessages::mode_radio || mode == NeutrinoMessages::mode_tv))
|
||||
CVFD::getInstance()->setEPGTitle(info_CurrentNext.current_name);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void CInfoViewer::showLcdPercentOver ()
|
||||
{
|
||||
if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] != 1) {
|
||||
@@ -2402,11 +2452,12 @@ void CInfoViewer::showLcdPercentOver ()
|
||||
if (jetzt < info_CurrentNext.current_zeit.startzeit)
|
||||
runningPercent = 0;
|
||||
else
|
||||
runningPercent = MIN ((unsigned) ((float) (jetzt - info_CurrentNext.current_zeit.startzeit) / (float) info_CurrentNext.current_zeit.dauer * 100.), 100);
|
||||
runningPercent = MIN ((jetzt - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer, 100);
|
||||
}
|
||||
CVFD::getInstance ()->showPercentOver (runningPercent);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void CInfoViewer::showEpgInfo() //message on event change
|
||||
{
|
||||
|
Reference in New Issue
Block a user