mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
caids at tech info hidden, if audio/video info lines too long, e.g. auto motor sport hd. use info/help key to show caids.
This commit is contained in:
@@ -69,6 +69,9 @@ extern cAudio *audioDecoder;
|
|||||||
|
|
||||||
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */
|
||||||
|
|
||||||
|
bool vmode;
|
||||||
|
int fypos;
|
||||||
|
|
||||||
CStreamInfo2::CStreamInfo2() : fader(g_settings.theme.menu_Content_alpha)
|
CStreamInfo2::CStreamInfo2() : fader(g_settings.theme.menu_Content_alpha)
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
@@ -114,6 +117,10 @@ CStreamInfo2::CStreamInfo2() : fader(g_settings.theme.menu_Content_alpha)
|
|||||||
dmxbuf = NULL;
|
dmxbuf = NULL;
|
||||||
probebuf = NULL;
|
probebuf = NULL;
|
||||||
probe_thread = 0;
|
probe_thread = 0;
|
||||||
|
|
||||||
|
paintCASystem(0, 0, true);
|
||||||
|
vmode = true;
|
||||||
|
fypos = -8192;
|
||||||
}
|
}
|
||||||
|
|
||||||
CStreamInfo2::~CStreamInfo2()
|
CStreamInfo2::~CStreamInfo2()
|
||||||
@@ -579,6 +586,15 @@ int CStreamInfo2::doSignalStrengthLoop()
|
|||||||
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if ((msg == CRCInput::RC_info || msg == CRCInput::RC_help) && ((unsigned int) fypos + box_h2 > frameBuffer->getScreenHeight()))
|
||||||
|
{
|
||||||
|
vmode = !vmode;
|
||||||
|
delete signalbox;
|
||||||
|
signalbox = NULL;
|
||||||
|
paint(paint_mode);
|
||||||
|
repaint_bitrate = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// -- any key --> abort
|
// -- any key --> abort
|
||||||
if (msg <= CRCInput::RC_MaxRC)
|
if (msg <= CRCInput::RC_MaxRC)
|
||||||
@@ -1035,6 +1051,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
r.key = r.val = "";
|
r.key = r.val = "";
|
||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
|
|
||||||
|
// video
|
||||||
if (mp)
|
if (mp)
|
||||||
{
|
{
|
||||||
std::string details(" ");
|
std::string details(" ");
|
||||||
@@ -1160,6 +1177,8 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vmode)
|
||||||
|
{
|
||||||
// empty line
|
// empty line
|
||||||
r.key = r.val = "";
|
r.key = r.val = "";
|
||||||
r.f = g_FixedFont[font_info];
|
r.f = g_FixedFont[font_info];
|
||||||
@@ -1252,6 +1271,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
spaceoffset = 0;
|
spaceoffset = 0;
|
||||||
for (std::vector<row>::iterator it = v.begin(); it != v.end(); ++it)
|
for (std::vector<row>::iterator it = v.begin(); it != v.end(); ++it)
|
||||||
@@ -1271,17 +1291,32 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
if (box_h == 0)
|
if (box_h == 0)
|
||||||
box_h = ypos - ypos1;
|
box_h = ypos - ypos1;
|
||||||
yypos = ypos;
|
yypos = ypos;
|
||||||
|
if (fypos == -8192)
|
||||||
|
fypos = yypos;
|
||||||
|
|
||||||
if (!mp)
|
if (!mp && ((unsigned int) ypos + box_h2 <= frameBuffer->getScreenHeight() || !vmode))
|
||||||
paintCASystem(xpos, ypos);
|
paintCASystem(xpos, ypos);
|
||||||
|
|
||||||
|
if ((unsigned int) fypos + box_h2 > frameBuffer->getScreenHeight()) {
|
||||||
|
int icon_w = 0;
|
||||||
|
int icon_h = 0;
|
||||||
|
char btndesc[128];
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_FILE, &icon_w, &icon_h);
|
||||||
|
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_INFO, xpos, frameBuffer->getScreenHeight() - icon_h * 2);
|
||||||
|
if (vmode)
|
||||||
|
sprintf(btndesc, "%s", g_Locale->getText(LOCALE_STREAMINFO_CASYSTEMS));
|
||||||
|
else
|
||||||
|
sprintf(btndesc, "%s/%s", g_Locale->getText(LOCALE_MAINSETTINGS_VIDEO), g_Locale->getText(LOCALE_TIMERLIST_APIDS));
|
||||||
|
g_FixedFont[font_small]->RenderString(xpos + icon_w * 2, frameBuffer->getScreenHeight() - icon_h / 1.25, box_width - spaceoffset, btndesc, COL_MENUCONTENT_TEXT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NUM_CAIDS 13
|
#define NUM_CAIDS 13
|
||||||
void CStreamInfo2::paintCASystem(int xpos, int ypos)
|
void CStreamInfo2::paintCASystem(int xpos, int ypos, bool fake)
|
||||||
{
|
{
|
||||||
int ypos1 = ypos;
|
int ypos1 = ypos;
|
||||||
|
|
||||||
if (box_h2 > 0)
|
if (box_h2 > 0 && !fake)
|
||||||
frameBuffer->paintBoxRel(0, ypos, box_width, box_h2, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(0, ypos, box_width, box_h2, COL_MENUCONTENT_PLUS_0);
|
||||||
|
|
||||||
std::string casys[NUM_CAIDS] = {"Irdeto:", "Betacrypt:", "Seca:", "Viaccess:", "Nagra:", "Conax: ", "Cryptoworks:", "Videoguard:", "Biss:", "DreCrypt:", "PowerVU:", "Tandberg:","Verimatrix:"};
|
std::string casys[NUM_CAIDS] = {"Irdeto:", "Betacrypt:", "Seca:", "Viaccess:", "Nagra:", "Conax: ", "Cryptoworks:", "Videoguard:", "Biss:", "DreCrypt:", "PowerVU:", "Tandberg:","Verimatrix:"};
|
||||||
@@ -1377,6 +1412,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos)
|
|||||||
ypos += sheight;
|
ypos += sheight;
|
||||||
std::string casys_locale(g_Locale->getText(LOCALE_STREAMINFO_CASYSTEMS));
|
std::string casys_locale(g_Locale->getText(LOCALE_STREAMINFO_CASYSTEMS));
|
||||||
casys_locale += ":";
|
casys_locale += ":";
|
||||||
|
if (!fake)
|
||||||
g_FixedFont[font_small]->RenderString(xpos, ypos, box_width, casys_locale, COL_MENUCONTENT_TEXT);
|
g_FixedFont[font_small]->RenderString(xpos, ypos, box_width, casys_locale, COL_MENUCONTENT_TEXT);
|
||||||
cryptsystems = false;
|
cryptsystems = false;
|
||||||
}
|
}
|
||||||
@@ -1395,10 +1431,12 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos)
|
|||||||
if (1 == sscanf(casys[ca_id].substr(last_pos, pos - last_pos).c_str(), "%X", &id) && acaid == id)
|
if (1 == sscanf(casys[ca_id].substr(last_pos, pos - last_pos).c_str(), "%X", &id) && acaid == id)
|
||||||
col = COL_MENUCONTENT_TEXT;
|
col = COL_MENUCONTENT_TEXT;
|
||||||
}
|
}
|
||||||
|
if (!fake)
|
||||||
g_FixedFont[font_small]->RenderString(xpos + width_txt, ypos, box_width, casys[ca_id].substr(last_pos, pos - last_pos), col);
|
g_FixedFont[font_small]->RenderString(xpos + width_txt, ypos, box_width, casys[ca_id].substr(last_pos, pos - last_pos), col);
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
width_txt = spaceoffset;
|
width_txt = spaceoffset;
|
||||||
else
|
else
|
||||||
|
if (!fake)
|
||||||
width_txt += g_FixedFont[font_small]->getRenderWidth(casys[ca_id].substr(last_pos, pos - last_pos)) + 10;
|
width_txt += g_FixedFont[font_small]->getRenderWidth(casys[ca_id].substr(last_pos, pos - last_pos)) + 10;
|
||||||
index++;
|
index++;
|
||||||
if (index > 5)
|
if (index > 5)
|
||||||
|
@@ -118,7 +118,7 @@ class CStreamInfo2 : public CMenuTarget
|
|||||||
|
|
||||||
void paint(int mode);
|
void paint(int mode);
|
||||||
void paint_techinfo(int x, int y);
|
void paint_techinfo(int x, int y);
|
||||||
void paintCASystem(int xpos, int ypos);
|
void paintCASystem(int xpos, int ypos, bool fake = false);
|
||||||
void paint_signal_fe_box(int x, int y, int w, int h);
|
void paint_signal_fe_box(int x, int y, int w, int h);
|
||||||
void paint_signal_fe(struct bitrate rate, struct feSignal s);
|
void paint_signal_fe(struct bitrate rate, struct feSignal s);
|
||||||
int y_signal_fe(unsigned long value, unsigned long max_range, int max_y);
|
int y_signal_fe(unsigned long value, unsigned long max_range, int max_y);
|
||||||
@@ -139,4 +139,3 @@ class CStreamInfo2 : public CMenuTarget
|
|||||||
int readPacket(uint8_t *buf, int buf_size);
|
int readPacket(uint8_t *buf, int buf_size);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user