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,96 +1177,99 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// empty line
|
if (vmode)
|
||||||
r.key = r.val = "";
|
|
||||||
r.f = g_FixedFont[font_info];
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
if (!mp)
|
|
||||||
{
|
{
|
||||||
// onid
|
// empty line
|
||||||
r.key = "ONID: ";
|
r.key = r.val = "";
|
||||||
i = channel->getOriginalNetworkId();
|
r.f = g_FixedFont[font_info];
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
|
||||||
r.val = buf;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
|
|
||||||
// tsid
|
if (!mp)
|
||||||
r.key = "TSID: ";
|
|
||||||
i = channel->getTransportStreamId();
|
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
|
||||||
r.val = buf;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
// sid
|
|
||||||
r.key = "SID: ";
|
|
||||||
i = channel->getServiceId();
|
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
|
||||||
r.val = buf;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
// pmtpid
|
|
||||||
r.key = "PMT PID: ";
|
|
||||||
i = channel->getPmtPid();
|
|
||||||
pmt_version = channel->getPmtVersion();
|
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i) [0x%02X]", i, i, pmt_version);
|
|
||||||
r.val = buf;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
//vtxtpid
|
|
||||||
if (g_RemoteControl->current_PIDs.PIDs.vtxtpid)
|
|
||||||
{
|
{
|
||||||
r.key = "VT PID: ";
|
// onid
|
||||||
i = g_RemoteControl->current_PIDs.PIDs.vtxtpid;
|
r.key = "ONID: ";
|
||||||
|
i = channel->getOriginalNetworkId();
|
||||||
|
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
||||||
|
r.val = buf;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
// tsid
|
||||||
|
r.key = "TSID: ";
|
||||||
|
i = channel->getTransportStreamId();
|
||||||
|
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
||||||
|
r.val = buf;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
// sid
|
||||||
|
r.key = "SID: ";
|
||||||
|
i = channel->getServiceId();
|
||||||
|
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
||||||
|
r.val = buf;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
// pmtpid
|
||||||
|
r.key = "PMT PID: ";
|
||||||
|
i = channel->getPmtPid();
|
||||||
|
pmt_version = channel->getPmtVersion();
|
||||||
|
snprintf(buf, sizeof(buf), "0x%04X (%i) [0x%02X]", i, i, pmt_version);
|
||||||
|
r.val = buf;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
//vtxtpid
|
||||||
|
if (g_RemoteControl->current_PIDs.PIDs.vtxtpid)
|
||||||
|
{
|
||||||
|
r.key = "VT PID: ";
|
||||||
|
i = g_RemoteControl->current_PIDs.PIDs.vtxtpid;
|
||||||
|
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
||||||
|
r.val = buf;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// video pid
|
||||||
|
if (g_RemoteControl->current_PIDs.PIDs.vpid)
|
||||||
|
{
|
||||||
|
r.key = "Video PID: ";
|
||||||
|
i = g_RemoteControl->current_PIDs.PIDs.vpid;
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
||||||
r.val = buf;
|
r.val = buf;
|
||||||
r.f = g_FixedFont[font_small];
|
r.f = g_FixedFont[font_small];
|
||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// video pid
|
// audio pid(s)
|
||||||
if (g_RemoteControl->current_PIDs.PIDs.vpid)
|
if (!g_RemoteControl->current_PIDs.APIDs.empty())
|
||||||
{
|
|
||||||
r.key = "Video PID: ";
|
|
||||||
i = g_RemoteControl->current_PIDs.PIDs.vpid;
|
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
|
||||||
r.val = buf;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
// audio pid(s)
|
|
||||||
if (!g_RemoteControl->current_PIDs.APIDs.empty())
|
|
||||||
{
|
|
||||||
for (unsigned int li = 0; li < g_RemoteControl->current_PIDs.APIDs.size(); li++)
|
|
||||||
{
|
{
|
||||||
r.key = li ? "" : "Audio PID(s): ";
|
for (unsigned int li = 0; li < g_RemoteControl->current_PIDs.APIDs.size(); li++)
|
||||||
i = g_RemoteControl->current_PIDs.APIDs[li].pid;
|
|
||||||
std::string strpid = to_string(i);
|
|
||||||
std::string details(" ");
|
|
||||||
for (std::vector<std::map<std::string, std::string> >::iterator it = streamdata.begin(); it != streamdata.end(); ++it)
|
|
||||||
{
|
{
|
||||||
if ((*it)["pid"] == strpid)
|
r.key = li ? "" : "Audio PID(s): ";
|
||||||
|
i = g_RemoteControl->current_PIDs.APIDs[li].pid;
|
||||||
|
std::string strpid = to_string(i);
|
||||||
|
std::string details(" ");
|
||||||
|
for (std::vector<std::map<std::string, std::string> >::iterator it = streamdata.begin(); it != streamdata.end(); ++it)
|
||||||
{
|
{
|
||||||
details = (*it)["language"];
|
if ((*it)["pid"] == strpid)
|
||||||
if (details != " ")
|
{
|
||||||
details += ", ";
|
details = (*it)["language"];
|
||||||
details += (*it)["codec"];
|
if (details != " ")
|
||||||
break;
|
details += ", ";
|
||||||
|
details += (*it)["codec"];
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (details == " ")
|
||||||
|
details.clear();
|
||||||
|
snprintf(buf, sizeof(buf), "0x%04X (%i)%s", i, i, details.c_str());
|
||||||
|
r.val = buf;
|
||||||
|
r.col = (li == g_RemoteControl->current_PIDs.PIDs.selected_apid) ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
}
|
}
|
||||||
if (details == " ")
|
|
||||||
details.clear();
|
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)%s", i, i, details.c_str());
|
|
||||||
r.val = buf;
|
|
||||||
r.col = (li == g_RemoteControl->current_PIDs.PIDs.selected_apid) ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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,7 +1412,8 @@ 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 += ":";
|
||||||
g_FixedFont[font_small]->RenderString(xpos, ypos, box_width, casys_locale, COL_MENUCONTENT_TEXT);
|
if (!fake)
|
||||||
|
g_FixedFont[font_small]->RenderString(xpos, ypos, box_width, casys_locale, COL_MENUCONTENT_TEXT);
|
||||||
cryptsystems = false;
|
cryptsystems = false;
|
||||||
}
|
}
|
||||||
ypos += sheight;
|
ypos += sheight;
|
||||||
@@ -1395,11 +1431,13 @@ 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;
|
||||||
}
|
}
|
||||||
g_FixedFont[font_small]->RenderString(xpos + width_txt, ypos, box_width, casys[ca_id].substr(last_pos, pos - last_pos), col);
|
if (!fake)
|
||||||
|
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
|
||||||
width_txt += g_FixedFont[font_small]->getRenderWidth(casys[ca_id].substr(last_pos, pos - last_pos)) + 10;
|
if (!fake)
|
||||||
|
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)
|
||||||
break;
|
break;
|
||||||
|
@@ -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