mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 01:41:23 +02:00
- streaminfo2: re-organize order (partly as suggested by Janus)
Conflicts: src/gui/streaminfo2.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -950,23 +950,12 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
r.key = g_Locale->getText(LOCALE_SCANTS_FREQDATA);
|
r.key = g_Locale->getText(LOCALE_SCANTS_FREQDATA);
|
||||||
r.val = t.description();
|
r.val = t.description();
|
||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
|
|
||||||
// empty line
|
|
||||||
r.key = r.val = "";
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
// video pid
|
|
||||||
if (g_RemoteControl->current_PIDs.PIDs.vpid)
|
|
||||||
{
|
|
||||||
r.key = "Vpid: ";
|
|
||||||
i = g_RemoteControl->current_PIDs.PIDs.vpid;
|
|
||||||
snprintf(buf, sizeof(buf), "0x%04X (%i)", i, i);
|
|
||||||
r.val = buf;
|
|
||||||
v.push_back(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// empty line
|
||||||
|
r.key = r.val = "";
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
if (channel)
|
if (channel)
|
||||||
{
|
{
|
||||||
has_vpid = channel->getVideoPid();
|
has_vpid = channel->getVideoPid();
|
||||||
@@ -1005,13 +994,6 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// osd resolution
|
|
||||||
r.key = g_Locale->getText(LOCALE_STREAMINFO_OSD_RESOLUTION);
|
|
||||||
r.key += ": ";
|
|
||||||
snprintf(buf, sizeof(buf), "%dx%d", frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
|
|
||||||
r.val = buf;
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
// aspect ratio
|
// aspect ratio
|
||||||
r.key = g_Locale->getText(LOCALE_STREAMINFO_ARATIO);
|
r.key = g_Locale->getText(LOCALE_STREAMINFO_ARATIO);
|
||||||
r.key += ": ";
|
r.key += ": ";
|
||||||
@@ -1100,64 +1082,37 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// empty line
|
|
||||||
r.key = r.val = "";
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
// channellogo
|
|
||||||
if (CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webtv || CNeutrinoApp::getInstance()->getMode() == NeutrinoModes::mode_webradio)
|
|
||||||
{
|
|
||||||
r.key = "Logo";
|
|
||||||
r.key += ": ";
|
|
||||||
snprintf(buf, sizeof(buf), "%llx.png", channel->getChannelID() & 0xFFFFFFFFFFFFULL);
|
|
||||||
r.val = buf;
|
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// empty line
|
||||||
|
r.key = r.val = "";
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
// osd resolution
|
||||||
|
r.key = g_Locale->getText(LOCALE_STREAMINFO_OSD_RESOLUTION);
|
||||||
|
r.key += ": ";
|
||||||
|
snprintf(buf, sizeof(buf), "%dx%d", frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
|
||||||
|
r.val = buf;
|
||||||
|
r.f = g_FixedFont[font_small];
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
// channellogo
|
||||||
|
if (CNeutrinoApp::getInstance()->getMode() != NeutrinoModes::mode_ts)
|
||||||
{
|
{
|
||||||
// audio pids
|
|
||||||
if (!g_RemoteControl->current_PIDs.APIDs.empty())
|
|
||||||
{
|
|
||||||
for (unsigned int li = 0; li < g_RemoteControl->current_PIDs.APIDs.size(); li++)
|
|
||||||
{
|
|
||||||
r.key = li ? "" : "Apid(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)
|
|
||||||
{
|
|
||||||
if ((*it)["pid"] == strpid)
|
|
||||||
{
|
|
||||||
details = (*it)["language"];
|
|
||||||
if (details != " ")
|
|
||||||
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;
|
|
||||||
v.push_back(r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// empty line
|
|
||||||
r.key = r.val = "";
|
|
||||||
v.push_back(r);
|
|
||||||
|
|
||||||
// channellogo
|
|
||||||
r.key = "Logo";
|
r.key = "Logo";
|
||||||
r.key += ": ";
|
r.key += ": ";
|
||||||
snprintf(buf, sizeof(buf), "%llx.png", channel->getChannelID() & 0xFFFFFFFFFFFFULL);
|
snprintf(buf, sizeof(buf), "%llx.png", channel->getChannelID() & 0xFFFFFFFFFFFFULL);
|
||||||
r.val = buf;
|
r.val = buf;
|
||||||
r.f = g_FixedFont[font_small];
|
|
||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
|
}
|
||||||
|
|
||||||
|
// empty line
|
||||||
|
r.key = r.val = "";
|
||||||
|
r.f = g_FixedFont[font_info];
|
||||||
|
v.push_back(r);
|
||||||
|
|
||||||
|
if (!mp)
|
||||||
|
{
|
||||||
// onid
|
// onid
|
||||||
r.key = "ONid: ";
|
r.key = "ONid: ";
|
||||||
i = channel->getOriginalNetworkId();
|
i = channel->getOriginalNetworkId();
|
||||||
@@ -1166,17 +1121,17 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
r.f = g_FixedFont[font_small];
|
r.f = g_FixedFont[font_small];
|
||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
|
|
||||||
// sid
|
// tsid
|
||||||
r.key = "Sid: ";
|
r.key = "TSid: ";
|
||||||
i = channel->getServiceId();
|
i = channel->getTransportStreamId();
|
||||||
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);
|
||||||
|
|
||||||
// tsid
|
// sid
|
||||||
r.key = "TSid: ";
|
r.key = "Sid: ";
|
||||||
i = channel->getTransportStreamId();
|
i = channel->getServiceId();
|
||||||
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];
|
||||||
@@ -1202,10 +1157,51 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
v.push_back(r);
|
v.push_back(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// video pid
|
||||||
|
if (g_RemoteControl->current_PIDs.PIDs.vpid)
|
||||||
|
{
|
||||||
|
r.key = "Vpid: ";
|
||||||
|
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 ? "" : "Apid(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)
|
||||||
|
{
|
||||||
|
if ((*it)["pid"] == strpid)
|
||||||
|
{
|
||||||
|
details = (*it)["language"];
|
||||||
|
if (details != " ")
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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)
|
||||||
spaceoffset = std::max(spaceoffset, it->f->getRenderWidth(it->key));
|
spaceoffset = std::max(spaceoffset, it->f->getRenderWidth(it->key));
|
||||||
|
|
||||||
spaceoffset = std::max(spaceoffset, g_FixedFont[font_info]->getRenderWidth(std::string(g_Locale->getText(LOCALE_STREAMINFO_BITRATE)) + ": "));
|
spaceoffset = std::max(spaceoffset, g_FixedFont[font_info]->getRenderWidth(std::string(g_Locale->getText(LOCALE_STREAMINFO_BITRATE)) + ": "));
|
||||||
|
|
||||||
for (std::vector<row>::iterator it = v.begin(); it != v.end(); ++it)
|
for (std::vector<row>::iterator it = v.begin(); it != v.end(); ++it)
|
||||||
@@ -1221,6 +1217,7 @@ 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 (!mp)
|
if (!mp)
|
||||||
paintCASystem(xpos, ypos);
|
paintCASystem(xpos, ypos);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user