mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
Merge remote-tracking branch 'uncool/cst-next'
This need buildfixes and some functional updates...
Origin commit data
------------------
Branch: ni/coolstream
Commit: eeee5bacab
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-12-13 (Sun, 13 Dec 2015)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -88,8 +88,6 @@ CInfoViewerBB::CInfoViewerBB()
|
||||
bbIconInfo[0].h = 0;
|
||||
BBarY = 0;
|
||||
BBarFontY = 0;
|
||||
hddscale = NULL;
|
||||
sysscale = NULL;
|
||||
|
||||
Init();
|
||||
}
|
||||
@@ -186,7 +184,7 @@ void CInfoViewerBB::getBBIconInfo()
|
||||
iconView = checkBBIcon(NEUTRINO_ICON_SCRAMBLED2, &w, &h);
|
||||
break;
|
||||
case CInfoViewerBB::ICON_TUNER:
|
||||
if (CFEManager::getInstance()->getEnabledCount() > 1 && g_settings.infobar_show_tuner == 1)
|
||||
if (CFEManager::getInstance()->getEnabledCount() > 1 && g_settings.infobar_show_tuner == 1 && !IS_WEBTV(g_InfoViewer->get_current_channel_id()))
|
||||
iconView = checkBBIcon(NEUTRINO_ICON_TUNER_1, &w, &h);
|
||||
break;
|
||||
default:
|
||||
@@ -222,12 +220,17 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
case CInfoViewerBB::BUTTON_EPG:
|
||||
icon = NEUTRINO_ICON_BUTTON_RED;
|
||||
frameBuffer->getIconSize(icon.c_str(), &w, &h);
|
||||
text = CUserMenu::getUserMenuButtonName(0, active);
|
||||
if (!text.empty())
|
||||
break;
|
||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title;
|
||||
if (text.empty())
|
||||
text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST);
|
||||
mode = CNeutrinoApp::getInstance()->getMode();
|
||||
if (mode == NeutrinoMessages::mode_ts) {
|
||||
text = g_Locale->getText(LOCALE_EPGMENU_STREAMINFO);
|
||||
} else {
|
||||
text = CUserMenu::getUserMenuButtonName(0, active);
|
||||
if (!text.empty())
|
||||
break;
|
||||
text = g_settings.usermenu[SNeutrinoSettings::BUTTON_RED]->title;
|
||||
if (text.empty())
|
||||
text = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST);
|
||||
}
|
||||
break;
|
||||
case CInfoViewerBB::BUTTON_AUDIO:
|
||||
icon = NEUTRINO_ICON_BUTTON_GREEN;
|
||||
@@ -240,7 +243,7 @@ void CInfoViewerBB::getBBButtonInfo()
|
||||
if (text == g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD))
|
||||
text = "";
|
||||
if ((mode == NeutrinoMessages::mode_ts || mode == NeutrinoMessages::mode_webtv || mode == NeutrinoMessages::mode_audio) && !CMoviePlayerGui::getInstance().timeshift) {
|
||||
text = CMoviePlayerGui::getInstance().CurrentAudioName();
|
||||
text = CMoviePlayerGui::getInstance(mode == NeutrinoMessages::mode_webtv).CurrentAudioName();
|
||||
} else if (!g_RemoteControl->current_PIDs.APIDs.empty()) {
|
||||
int selected = g_RemoteControl->current_PIDs.PIDs.selected_apid;
|
||||
if (text.empty()){
|
||||
@@ -374,8 +377,8 @@ void CInfoViewerBB::showBBButtons(const int modus)
|
||||
}
|
||||
|
||||
if (paint) {
|
||||
paintFoot(minX - g_InfoViewer->ChanInfoX);
|
||||
int last_x = minX;
|
||||
frameBuffer->paintBoxRel(g_InfoViewer->ChanInfoX, BBarY, minX - g_InfoViewer->ChanInfoX, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
for (i = BUTTON_MAX; i > 0;) {
|
||||
--i;
|
||||
if ((bbButtonInfo[i].x <= g_InfoViewer->ChanInfoX) || (bbButtonInfo[i].x >= g_InfoViewer->BoxEndX) || (!bbButtonInfo[i].paint))
|
||||
@@ -415,7 +418,7 @@ void CInfoViewerBB::showBBIcons(const int modus, const std::string & icon)
|
||||
return;
|
||||
if ((modus >= CInfoViewerBB::ICON_SUBT) && (modus < CInfoViewerBB::ICON_MAX) && (bbIconInfo[modus].x != -1) && (is_visible)) {
|
||||
frameBuffer->paintIcon(icon, bbIconInfo[modus].x, BBarY,
|
||||
InfoHeightY_Info, 1, true, true, COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
InfoHeightY_Info, 1, true, !g_settings.theme.infobar_gradient_bottom, COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +435,7 @@ void CInfoViewerBB::paintshowButtonBar()
|
||||
if (g_settings.casystem_display < 2)
|
||||
paintCA_bar(0,0);
|
||||
|
||||
frameBuffer->paintBoxRel(g_InfoViewer->ChanInfoX, BBarY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_LARGE, CORNER_BOTTOM); //round
|
||||
paintFoot();
|
||||
|
||||
g_InfoViewer->showSNR();
|
||||
|
||||
@@ -453,6 +456,21 @@ void CInfoViewerBB::paintshowButtonBar()
|
||||
showSysfsHdd();
|
||||
}
|
||||
|
||||
void CInfoViewerBB::paintFoot(int w)
|
||||
{
|
||||
int width = (w == 0) ? g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX : w;
|
||||
|
||||
CComponentsShapeSquare foot(g_InfoViewer->ChanInfoX, BBarY, width, InfoHeightY_Info);
|
||||
|
||||
foot.setColorBody(COL_INFOBAR_BUTTONS_BACKGROUND);
|
||||
foot.enableColBodyGradient(g_settings.theme.infobar_gradient_bottom);
|
||||
foot.setColBodyGradient(CColorGradient::gradientDark2Light, CFrameBuffer::gradientVertical);
|
||||
foot.setCorner(RADIUS_LARGE, CORNER_BOTTOM);
|
||||
foot.set2ndColor(COL_INFOBAR_PLUS_0);
|
||||
|
||||
foot.paint(CC_SAVE_SCREEN_NO);
|
||||
}
|
||||
|
||||
void CInfoViewerBB::showIcon_SubT()
|
||||
{
|
||||
if (!is_visible)
|
||||
@@ -504,10 +522,11 @@ void CInfoViewerBB::showIcon_16_9()
|
||||
{
|
||||
if (!is_visible)
|
||||
return;
|
||||
|
||||
if ((g_InfoViewer->aspectRatio == 0) || ( g_RemoteControl->current_PIDs.PIDs.vpid == 0 ) || (g_InfoViewer->aspectRatio != videoDecoder->getAspectRatio())) {
|
||||
if (g_InfoViewer->chanready && g_RemoteControl->current_PIDs.PIDs.vpid > 0 ) {
|
||||
if (g_InfoViewer->chanready &&
|
||||
(g_RemoteControl->current_PIDs.PIDs.vpid > 0 || IS_WEBTV(g_InfoViewer->get_current_channel_id())))
|
||||
g_InfoViewer->aspectRatio = videoDecoder->getAspectRatio();
|
||||
}
|
||||
else
|
||||
g_InfoViewer->aspectRatio = 0;
|
||||
|
||||
@@ -676,8 +695,8 @@ void CInfoViewerBB::showBarHdd(int percent)
|
||||
void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_offset)
|
||||
{
|
||||
char buf[20];
|
||||
int endx = g_InfoViewer->BoxEndX - 10;
|
||||
int py = g_InfoViewer->BoxEndY + 2; /* hand-crafted, should be automatic */
|
||||
int endx = g_InfoViewer->BoxEndX - (g_settings.casystem_frame ? 20 : 10);
|
||||
int py = g_InfoViewer->BoxEndY + (g_settings.casystem_frame ? 4 : 2); /* hand-crafted, should be automatic */
|
||||
int px = 0;
|
||||
static map<int, std::pair<int,const char*> > icon_map;
|
||||
const int icon_space = 10, icon_number = 10;
|
||||
@@ -803,21 +822,40 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
|
||||
|
||||
void CInfoViewerBB::paintCA_bar(int left, int right)
|
||||
{
|
||||
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX) / 4;
|
||||
int ycnt = bottom_bar_offset / 4;
|
||||
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.casystem_frame ? 24 : 0)) / 4;
|
||||
int ycnt = (bottom_bar_offset - (g_settings.casystem_frame ? 14 : 0)) / 4;
|
||||
|
||||
if (right)
|
||||
right = xcnt - ((right/4)+1);
|
||||
if (left)
|
||||
left = xcnt - ((left/4)-1);
|
||||
|
||||
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_BLACK);
|
||||
if (g_settings.casystem_frame) { // with highlighted frame
|
||||
if (!right || !left) { // paint full bar
|
||||
// background
|
||||
frameBuffer->paintBox(g_InfoViewer->ChanInfoX , g_InfoViewer->BoxEndY , g_InfoViewer->BoxEndX , g_InfoViewer->BoxEndY + bottom_bar_offset , COL_INFOBAR_PLUS_0);
|
||||
// shadow
|
||||
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 14, g_InfoViewer->BoxEndY + 4, g_InfoViewer->BoxEndX - 6 , g_InfoViewer->BoxEndY + bottom_bar_offset - 6 , COL_INFOBAR_SHADOW_PLUS_0 , RADIUS_SMALL, CORNER_ALL);
|
||||
// ca bar
|
||||
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 11, g_InfoViewer->BoxEndY + 1, g_InfoViewer->BoxEndX - 11, g_InfoViewer->BoxEndY + bottom_bar_offset - 11, COL_INFOBAR_CASYSTEM_PLUS_0, RADIUS_SMALL, CORNER_ALL);
|
||||
// highlighed frame
|
||||
frameBuffer->paintBoxFrame(g_InfoViewer->ChanInfoX + 10, g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - 2*10, bottom_bar_offset - 10, 1, COL_INFOBAR_CASYSTEM_PLUS_2, RADIUS_SMALL, CORNER_ALL);
|
||||
}
|
||||
else
|
||||
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + 12 + (right*4), g_InfoViewer->BoxEndY + 2, g_InfoViewer->BoxEndX - 12 - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset - 12, COL_INFOBAR_CASYSTEM_PLUS_0);
|
||||
}
|
||||
else
|
||||
frameBuffer->paintBox(g_InfoViewer->ChanInfoX + (right*4), g_InfoViewer->BoxEndY, g_InfoViewer->BoxEndX - (left*4), g_InfoViewer->BoxEndY + bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0);
|
||||
|
||||
if (!g_settings.casystem_dotmatrix) //don't show dotmatrix
|
||||
return;
|
||||
|
||||
if (left)
|
||||
left -= 1;
|
||||
|
||||
for (int i = 0 + right; i < xcnt - left; i++) {
|
||||
for (int j = 0; j < ycnt; j++) {
|
||||
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + 2) + i*4, g_InfoViewer->BoxEndY + 2 + j*4, 2, 2, COL_INFOBAR_PLUS_1);
|
||||
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -845,7 +883,7 @@ void CInfoViewerBB::reset_allScala()
|
||||
|
||||
void CInfoViewerBB::setBBOffset()
|
||||
{
|
||||
bottom_bar_offset = (g_settings.casystem_display < 2) ? 22 : 0;
|
||||
bottom_bar_offset = (g_settings.casystem_display < 2) ? (g_settings.casystem_frame ? 36 : 22) : 0;
|
||||
}
|
||||
|
||||
void* CInfoViewerBB::scrambledThread(void *arg)
|
||||
|
Reference in New Issue
Block a user