Merge remote-tracking branch 'check/cst-next'

needs build- and functional fixes

Conflicts:
	configure.ac
	data/icons/shutdown.jpg
	data/icons/start.jpg
	data/locale/deutsch.locale
	data/locale/english.locale
	lib/libmd5sum/md5.c
	src/driver/scanepg.cpp
	src/driver/streamts.cpp
	src/driver/vfd.cpp
	src/driver/vfd.h
	src/driver/volume.cpp
	src/eitd/dmx.cpp
	src/eitd/xmlutil.cpp
	src/gui/Makefile.am
	src/gui/audiomute.cpp
	src/gui/channellist.cpp
	src/gui/dboxinfo.cpp
	src/gui/epgview.cpp
	src/gui/eventlist.cpp
	src/gui/filebrowser.cpp
	src/gui/hdd_menu.cpp
	src/gui/infoviewer.cpp
	src/gui/infoviewer_bb.cpp
	src/gui/infoviewer_bb.h
	src/gui/keybind_setup.cpp
	src/gui/luainstance.cpp
	src/gui/luainstance.h
	src/gui/miscsettings_menu.cpp
	src/gui/moviebrowser.cpp
	src/gui/movieplayer.cpp
	src/gui/osd_progressbar_setup.cpp
	src/gui/osd_progressbar_setup.h
	src/gui/osd_setup.cpp
	src/gui/osdlang_setup.cpp
	src/gui/personalize.cpp
	src/gui/plugins.cpp
	src/gui/plugins.h
	src/gui/scan.cpp
	src/gui/scan_setup.cpp
	src/gui/update_settings.cpp
	src/gui/user_menue.cpp
	src/gui/user_menue_setup.cpp
	src/gui/videosettings.cpp
	src/gui/widget/buttons.cpp
	src/gui/widget/menue.cpp
	src/gui/widget/menue.h
	src/gui/widget/progresswindow.cpp
	src/neutrino.cpp
	src/neutrino_menue.cpp
	src/nhttpd/yhttpd.cpp
	src/system/helpers.cpp
	src/system/locals.h
	src/system/locals_intern.h
	src/system/setting_helpers.cpp
	src/zapit/lib/zapitclient.cpp
	src/zapit/src/fastscan.cpp
	src/zapit/src/frontend.cpp
	src/zapit/src/getservices.cpp
	src/zapit/src/scan.cpp
	src/zapit/src/scannit.cpp
	src/zapit/src/scanpmt.cpp
	src/zapit/src/transponder.cpp
	src/zapit/src/zapit.cpp
This commit is contained in:
Stefan Seyfried
2014-12-25 18:03:08 +01:00
423 changed files with 23934 additions and 12351 deletions

View File

@@ -93,7 +93,7 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b)
extern bool timeset;
CInfoViewer::CInfoViewer ()
: fader(g_settings.infobar_alpha)
: fader(g_settings.theme.infobar_alpha)
{
sigscale = NULL;
snrscale = NULL;
@@ -116,7 +116,6 @@ CInfoViewer::CInfoViewer ()
time_dot_width = 0;
time_width = 0;
time_height = 0;
old_timestr[0] = 0;
lastsnr = 0;
lastsig = 0;
lasttime = 0;
@@ -124,7 +123,6 @@ CInfoViewer::CInfoViewer ()
ChanInfoX = 0;
Init();
infoViewerBB->Init();
strcpy(old_timestr, "");
oldinfo.current_uniqueKey = 0;
oldinfo.next_uniqueKey = 0;
isVolscale = false;
@@ -244,23 +242,23 @@ void CInfoViewer::changePB()
if (sigscale)
delete sigscale;
sigscale = new CProgressBar();
sigscale->setBlink();
if (snrscale)
delete snrscale;
snrscale = new CProgressBar();
snrscale->setBlink();
if (timescale)
delete timescale;
timescale = new CProgressBar();
timescale->setBlink();
timescale->setRgb(0, 100, 70);
timescale->setType(CProgressBar::PB_TIMESCALE);
}
void CInfoViewer::paintTime (bool show_dot)
{
if (! gotTime)
if (!gotTime)
gotTime = timeset;
if (!gotTime)
return;
int clock_x = BoxEndX - time_width - LEFT_OFFSET;
@@ -352,7 +350,7 @@ void CInfoViewer::showRecordIcon (const bool show)
frameBuffer->paintBoxRel(box_posX, BoxStartY + box_posY , box_len, chanH, COL_INFOBAR_PLUS_0, radius);
if (rec_mode != CRecordManager::RECMODE_TSHIFT)
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (rec_icon_posX + rec_icon_w + icon_space, BoxStartY + box_posY + chanH, box_len, records_msg, COL_INFOBAR_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (rec_icon_posX + rec_icon_w + icon_space, BoxStartY + box_posY + chanH, box_len, records_msg, COL_INFOBAR_TEXT);
if (rec_mode == CRecordManager::RECMODE_REC)
{
@@ -471,7 +469,7 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos)
if (!(info_CurrentNext.flags & (CSectionsdClient::epgflags::has_later | CSectionsdClient::epgflags::has_current | CSectionsdClient::epgflags::not_broadcast))) {
neutrino_locale_t loc;
if (! gotTime)
if (!gotTime)
loc = LOCALE_INFOVIEWER_WAITTIME;
else if (showButtonBar)
loc = LOCALE_INFOVIEWER_EPGWAIT;
@@ -485,7 +483,8 @@ void CInfoViewer::show_current_next(bool new_chan, int epgpos)
void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channel_Id, const std::string &Channel,
const std::string &g_file_epg, const std::string &g_file_epg1,
const int duration, const int curr_pos)
const int duration, const int curr_pos,
const int repeat_mode)
{
if (g_settings.volume_pos == CVolumeBar::VOLUMEBAR_POS_BOTTOM_LEFT ||
g_settings.volume_pos == CVolumeBar::VOLUMEBAR_POS_BOTTOM_RIGHT ||
@@ -536,21 +535,31 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe
if (g_settings.infobar_show_channellogo > 1)
ChannelLogoMode = showChannelLogo(channel_id, 0);
if (ChannelLogoMode == 0 || ChannelLogoMode == 3 || ChannelLogoMode == 4)
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR_TEXT, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(ChanNameX + 10 , ChanNameY + time_height,BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 ,ChannelName, COL_INFOBAR_TEXT);
// show_Data
if (CMoviePlayerGui::getInstance().file_prozent > 100)
CMoviePlayerGui::getInstance().file_prozent = 100;
char runningRest[32]; // %d can be 10 digits max...
sprintf(runningRest, "%d / %d min", (curr_pos + 30000) / 60000, (duration + 30000) / 60000);
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
char runningRest[32]; // %d can be 10 digits max...
snprintf(runningRest, sizeof(runningRest), "%d / %d %s", (curr_pos + 30000) / 60000, (duration - curr_pos + 30000) / 60000, unit_short_minute);
display_Info(g_file_epg.c_str(), g_file_epg1.c_str(), true, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest);
int speed = CMoviePlayerGui::getInstance().GetSpeed();
const char *playicon = NULL;
switch (playState) {
case CMoviePlayerGui::PLAY:
playicon = NEUTRINO_ICON_PLAY;
switch (repeat_mode) {
case CMoviePlayerGui::REPEAT_ALL:
playicon = NEUTRINO_ICON_PLAY_REPEAT_ALL;
break;
case CMoviePlayerGui::REPEAT_TRACK:
playicon = NEUTRINO_ICON_PLAY_REPEAT_TRACK;
break;
default:
playicon = NEUTRINO_ICON_PLAY;
}
speed = 0;
break;
case CMoviePlayerGui::PAUSE:
@@ -585,7 +594,7 @@ void CInfoViewer::showMovieTitle(const int playState, const t_channel_id &Channe
if (speed) {
int sh = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight();
int sy = BoxStartY + ChanHeight/2 - sh/2 + sh;
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(icon_x, sy, ChanHeight, runningRest, COL_INFOBAR_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(icon_x, sy, ChanHeight, runningRest, COL_INFOBAR_TEXT);
icon_x += speedw;
}
frameBuffer->paintIcon(playicon, icon_x, icon_y);
@@ -719,7 +728,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
int ChanNumYPos = BoxStartY + ChanHeight;
if (g_settings.infobar_sat_display) {
std::string name = CServiceManager::getInstance()->GetSatelliteName(satellitePosition);
std::string name = (IS_WEBTV(channel_id))? "WebTV" : CServiceManager::getInstance()->GetSatelliteName(satellitePosition);
int satNameWidth = g_SignalFont->getRenderWidth (name);
std::string satname_tmp = name;
if (satNameWidth > (ChanWidth - 4)) {
@@ -772,13 +781,13 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->RenderString(
ChanNameX + 10 + ChanNumWidth, ChanNameY + time_height,
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth,
ChannelName, color /*COL_INFOBAR_TEXT*/, 0, true); // UTF-8
ChannelName, color /*COL_INFOBAR_TEXT*/);
//provider name
if(g_settings.infobar_show_channeldesc && pname){
std::string prov_name = pname;
prov_name=prov_name.substr(prov_name.find_first_of("]")+1);
int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName, true);// UTF-8
int chname_width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_CHANNAME]->getRenderWidth (ChannelName);
unsigned int chann_size = ChannelName.size();
if(ChannelName.empty())
chann_size = 1;
@@ -789,7 +798,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString(
ChanNameX + 10 + ChanNumWidth + chname_width, tmpY,
BoxEndX - (ChanNameX + 20) - time_width - LEFT_OFFSET - 5 - ChanNumWidth - chname_width,
prov_name, color /*COL_INFOBAR_TEXT*/, 0, true); // UTF-8
prov_name, color /*COL_INFOBAR_TEXT*/);
}
}
@@ -797,6 +806,17 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
if (fileplay) {
show_Data ();
} else if (IS_WEBTV(new_channel_id)) {
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(new_channel_id);
if (channel) {
const char *current = channel->getDesc().c_str();
const char *next = channel->getUrl().c_str();
if (!current) {
current = next;
next = "";
}
display_Info(current, next, true, false, 0, NULL, NULL, NULL, NULL, true, true);
}
} else {
show_current_next(new_chan,epgpos);
}
@@ -833,6 +853,7 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext)
switch (mode)
{
case NeutrinoMessages::mode_tv:
case NeutrinoMessages::mode_webtv:
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + timeout_ext);
break;
case NeutrinoMessages::mode_radio:
@@ -882,8 +903,8 @@ void CInfoViewer::loop(bool show_dot)
else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info) {
g_RCInput->postMsg (NeutrinoMessages::SHOW_EPG, 0);
res = messages_return::cancel_info;
} else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetTimer())) {
if(fader.Fade())
} else if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) {
if(fader.FadeDone())
res = messages_return::cancel_info;
} else if ((msg == CRCInput::RC_ok) || (msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout)) {
if(fader.StartFadeOut())
@@ -933,7 +954,7 @@ void CInfoViewer::loop(bool show_dot)
} else {
if (msg == CRCInput::RC_standby) {
g_RCInput->killTimer (sec_timer_id);
fader.Stop();
fader.StopFade();
}
res = neutrino->handleMsg (msg, data);
if (res & messages_return::unhandled) {
@@ -981,7 +1002,7 @@ void CInfoViewer::loop(bool show_dot)
}
g_RCInput->killTimer (sec_timer_id);
fader.Stop();
fader.StopFade();
if (virtual_zap_mode) {
/* if bouquet cycle set, do virtual over current bouquet */
if (/*g_settings.zap_cycle && */ /* (bouquetList != NULL) && */ !(bouquetList->Bouquets.empty()))
@@ -1022,7 +1043,7 @@ void CInfoViewer::showSubchan ()
int dy = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); // 25;
if (g_RemoteControl->director_mode) {
int w = 20 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth (g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), true) + 20; // UTF-8
int w = 20 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth (g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE)) + 20;
int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
if (w > dx)
dx = w;
@@ -1059,15 +1080,15 @@ void CInfoViewer::showSubchan ()
lframeBuffer->paintBackgroundBoxRel (x + dx, y, borderwidth, dy);
lframeBuffer->paintBoxRel (x, y, dx, dy, COL_MENUCONTENT_PLUS_0);
//g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT_TEXT, 0, true);
//g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT_TEXT);
if (g_RemoteControl->director_mode) {
lframeBuffer->paintIcon (NEUTRINO_ICON_BUTTON_YELLOW, x + 8, y + dy - 20);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT_TEXT, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT_TEXT);
int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - h - 2, dx - 20, text, COL_MENUCONTENT_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - h - 2, dx - 20, text, COL_MENUCONTENT_TEXT);
} else
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT_TEXT);
uint64_t timeoutEnd_tmp = CRCInput::calcTimeoutEnd (2);
int res = messages_return::none;
@@ -1108,7 +1129,7 @@ void CInfoViewer::showMotorMoving (int duration)
char text[256];
snprintf(text, sizeof(text), "%s (%ds)", g_Locale->getText (LOCALE_INFOVIEWER_MOTOR_MOVING), duration);
ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text, true) + 10, duration); // UTF-8
ShowHint (LOCALE_MESSAGEBOX_INFO, text, g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth (text) + 10, duration); // UTF-8
}
void CInfoViewer::killRadiotext()
@@ -1158,7 +1179,7 @@ void CInfoViewer::showRadiotext()
// shadow
frameBuffer->paintBoxRel(rt_x+SHADOW_OFFSET, rt_y+SHADOW_OFFSET, rt_dx, rt_dy, COL_INFOBAR_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_TOP);
frameBuffer->paintBoxRel(rt_x, rt_y, rt_dx, rt_dy, COL_INFOBAR_PLUS_0, RADIUS_LARGE, CORNER_TOP);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rt_x+10, rt_y+ 30, rt_dx-20, stext[0], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rt_x+10, rt_y+ 30, rt_dx-20, stext[0], COL_INFOBAR_TEXT, 0, RTisIsUTF);
}
// yoff = 17;
ii = 1;
@@ -1195,15 +1216,15 @@ void CInfoViewer::showRadiotext()
int rts_dx = rt_dx-20;
if (g_Radiotext->S_RtOsdLoop == 1) { // latest bottom
for (int i = ind+1; i < g_Radiotext->S_RtOsdRows; i++)
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF);
for (int i = 0; i <= ind; i++)
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF);
}
else { // latest top
for (int i = ind; i >= 0; i--)
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF);
for (int i = g_Radiotext->S_RtOsdRows-1; i > ind; i--)
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString(rts_x, rts_y + (ii++)*rt_dy, rts_dx, g_Radiotext->RT_Text[i], COL_INFOBAR_TEXT, 0, RTisIsUTF);
}
}
#if 0
@@ -1288,9 +1309,9 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
//Set_CA_Status (data);
return messages_return::handled;
} else if (msg == NeutrinoMessages::EVT_TIMER) {
if (data == fader.GetTimer()) {
if (data == fader.GetFadeTimer()) {
// here, the event can only come if there is another window in the foreground!
fader.Stop();
fader.StopFade();
return messages_return::handled;
} else if (data == lcdUpdateTimer) {
//printf("CInfoViewer::handleMsg: lcdUpdateTimer\n");
@@ -1298,12 +1319,13 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
if (fileplay || CMoviePlayerGui::getInstance().timeshift)
CMoviePlayerGui::getInstance().UpdatePosition();
if (fileplay) {
char runningRest[32]; // %d can be 10 digits max...
int curr_pos = CMoviePlayerGui::getInstance().GetPosition();
int duration = CMoviePlayerGui::getInstance().GetDuration();
sprintf(runningRest, "%d / %d min", (curr_pos + 30000) / 60000, (duration + 30000) / 60000);
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
char runningRest[64]; // %d can be 10 digits max...
int curr_pos = CMoviePlayerGui::getInstance().GetPosition();
int duration = CMoviePlayerGui::getInstance().GetDuration();
snprintf(runningRest, sizeof(runningRest), "%d / %d %s", (curr_pos + 30000) / 60000, (duration - curr_pos + 30000) / 60000, unit_short_minute);
display_Info(NULL, NULL, true, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest);
} else {
} else if (!IS_WEBTV(channel_id)) {
show_Data( true );
}
}
@@ -1346,7 +1368,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
//chanready = 1;
showSNR ();
// show failure..!
CVFD::getInstance ()->showServicename ("(" + g_RemoteControl->getCurrentChannelName () + ')');
CVFD::getInstance ()->showServicename ("(" + g_RemoteControl->getCurrentChannelName () + ')', g_RemoteControl->getCurrentChannelNumber());
printf ("zap failed!\n");
showFailure ();
CVFD::getInstance ()->showPercentOver (255);
@@ -1356,7 +1378,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
showSNR ();
if ((*(t_channel_id *) data) == channel_id) {
// show failure..!
CVFD::getInstance ()->showServicename ("(" + g_RemoteControl->getCurrentChannelName () + ')');
CVFD::getInstance ()->showServicename ("(" + g_RemoteControl->getCurrentChannelName () + ')', g_RemoteControl->getCurrentChannelNumber());
printf ("zap failed!\n");
showFailure ();
CVFD::getInstance ()->showPercentOver (255);
@@ -1406,7 +1428,7 @@ void CInfoViewer::sendNoEpg(const t_channel_id for_channel_id)
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)
if (for_channel_id == 0 || IS_WEBTV(for_channel_id))
{
oldinfo.current_uniqueKey = 0;
return;
@@ -1443,11 +1465,9 @@ void CInfoViewer::showSNR ()
{
if (! is_visible)
return;
char percent[10];
uint16_t ssig, ssnr;
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
TODO: decouple this */
if (! fileplay && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) {
if (!fileplay && !IS_WEBTV(channel_id) && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) {
int chanH = g_SignalFont->getHeight();
int freqStartY = BoxStartY + 2 * chanH - 3;
if ((newfreq && chanready) || SDT_freq_update) {
@@ -1456,7 +1476,7 @@ void CInfoViewer::showSNR ()
std::string polarisation = "";
if (CFEManager::getInstance()->getLiveFE()->getType() == FE_QPSK)
if (CFrontend::isSat(CFEManager::getInstance()->getLiveFE()->getCurrentDeliverySystem()))
polarisation = transponder::pol(CFEManager::getInstance()->getLiveFE()->getPolarization());
int frequency = CFEManager::getInstance()->getLiveFE()->getFrequency();
@@ -1466,6 +1486,9 @@ void CInfoViewer::showSNR ()
g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), BoxStartY + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_TEXT:COL_INFOBAR_TEXT);
SDT_freq_update = false;
}
char percent[10];
uint16_t ssig, ssnr;
int sw, snr, sig, posx, posy;
int height;
@@ -1559,7 +1582,7 @@ void CInfoViewer::display_Info(const char *current, const char *next,
int pb_starty = ChanNameY - (pb_h + 10);
int pb_shadow = COL_INFOBAR_SHADOW_PLUS_0;
timescale->setShadowOnOff(true);
int pb_color = g_settings.progressbar_color ? COL_INFOBAR_SHADOW_PLUS_0 : COL_INFOBAR_PLUS_0;
int pb_color = (g_settings.progressbar_design == CProgressBar::PB_MONO) ? COL_INFOBAR_PLUS_0 : COL_INFOBAR_SHADOW_PLUS_0;
if(g_settings.infobar_progressbar){
pb_startx = xStart;
pb_w = BoxEndX - 10 - xStart;
@@ -1654,12 +1677,12 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (fileplay && !CMoviePlayerGui::getInstance().timeshift)
return;
char runningStart[10];
char runningRest[20];
char runningStart[32];
char runningRest[32];
char runningPercent = 0;
char nextStart[10];
char nextDuration[10];
char nextStart[32];
char nextDuration[32];
int is_nvod = false;
@@ -1681,22 +1704,24 @@ void CInfoViewer::show_Data (bool calledFromEvent)
time_t jetzt = time (NULL);
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
int seit = (abs(jetzt - info_CurrentNext.current_zeit.startzeit) + 30) / 60;
int rest = (info_CurrentNext.current_zeit.dauer / 60) - seit;
runningPercent = 0;
if (!gotTime)
snprintf(runningRest, sizeof(runningRest), "%d min", info_CurrentNext.current_zeit.dauer / 60);
snprintf(runningRest, sizeof(runningRest), "%d %s", info_CurrentNext.current_zeit.dauer / 60, unit_short_minute);
else if (jetzt < info_CurrentNext.current_zeit.startzeit)
snprintf (runningRest, sizeof(runningRest), "in %d min", seit);
snprintf(runningRest, sizeof(runningRest), "%s %d %s", g_Locale->getText(LOCALE_WORD_IN), seit, unit_short_minute);
else {
runningPercent = (jetzt - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer;
if (runningPercent > 100)
runningPercent = 100;
if (rest >= 0)
snprintf(runningRest, sizeof(runningRest), "%d / %d min", seit, rest);
snprintf(runningRest, sizeof(runningRest), "%d / %d %s", seit, rest, unit_short_minute);
else
snprintf(runningRest, sizeof(runningRest), "%d +%d min", info_CurrentNext.current_zeit.dauer / 60, -rest);
snprintf(runningRest, sizeof(runningRest), "%d +%d %s", info_CurrentNext.current_zeit.dauer / 60, -rest, unit_short_minute);
}
struct tm *pStartZeit = localtime (&info_CurrentNext.current_zeit.startzeit);
@@ -1706,7 +1731,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) {
unsigned dauer = info_CurrentNext.next_zeit.dauer / 60;
snprintf (nextDuration, sizeof(nextDuration), "%d min", dauer);
snprintf (nextDuration, sizeof(nextDuration), "%d %s", dauer, unit_short_minute);
struct tm *pStartZeit = localtime (&info_CurrentNext.next_zeit.startzeit);
snprintf (nextStart, sizeof(nextStart), "%02d:%02d", pStartZeit->tm_hour, pStartZeit->tm_min);
} else
@@ -1800,7 +1825,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
// no EPG available
ChanInfoY += height;
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (gotTime ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR_TEXT, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (BoxStartX + ChanWidth + 20, ChanInfoY + height, BoxEndX - (BoxStartX + ChanWidth + 20), g_Locale->getText (gotTime ? LOCALE_INFOVIEWER_NOEPG : LOCALE_INFOVIEWER_WAITTIME), COL_INFOBAR_TEXT);
} else {
// irgendein EPG gefunden
int duration1Width = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (runningRest);
@@ -1812,7 +1837,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if ((info_CurrentNext.flags & CSectionsdClient::epgflags::has_next) && (!(info_CurrentNext.flags & CSectionsdClient::epgflags::has_current))) {
// there are later events available - yet no current
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, BoxEndX - xStart, g_Locale->getText (LOCALE_INFOVIEWER_NOCURRENT), COL_INFOBAR_TEXT, 0, true); // UTF-8
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, BoxEndX - xStart, g_Locale->getText (LOCALE_INFOVIEWER_NOCURRENT), COL_INFOBAR_TEXT);
ChanInfoY += height;
@@ -1822,7 +1847,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (last_next_id != info_CurrentNext.next_uniqueKey) {
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR_TEXT);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR_TEXT);
last_next_id = info_CurrentNext.next_uniqueKey;
}
@@ -1830,7 +1855,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (last_curr_id != info_CurrentNext.current_uniqueKey) {
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, runningStart, COL_INFOBAR_TEXT);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration1TextPos - xStart - 5, info_CurrentNext.current_name, COL_INFOBAR_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration1TextPos - xStart - 5, info_CurrentNext.current_name, COL_INFOBAR_TEXT);
last_curr_id = info_CurrentNext.current_uniqueKey;
}
@@ -1846,7 +1871,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
if (last_next_id != info_CurrentNext.next_uniqueKey) {
frameBuffer->paintBox (ChanInfoX + 10, ChanInfoY, BoxEndX, ChanInfoY + height, COL_INFOBAR_PLUS_0);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (ChanInfoX + 10, ChanInfoY + height, 100, nextStart, COL_INFOBAR_TEXT);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT, 0, true);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (xStart, ChanInfoY + height, duration2TextPos - xStart - 5, info_CurrentNext.next_name, COL_INFOBAR_TEXT);
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (duration2TextPos, ChanInfoY + height, duration2Width, nextDuration, COL_INFOBAR_TEXT);
last_next_id = info_CurrentNext.next_uniqueKey;
}