mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
add resolution icon to infoviewer
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@694 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: eed43dde92
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-07-31 (Sat, 31 Jul 2010)
Origin message was:
------------------
-add resolution icon to infoviewer
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@694 e54a6e83-5905-42d5-8d5c-058d10e6a962
------------------
This commit was generated by Migit
This commit is contained in:
@@ -465,7 +465,8 @@ int CChannelList::show()
|
|||||||
new_mode_active = 0;
|
new_mode_active = 0;
|
||||||
pipzap = 0;
|
pipzap = 0;
|
||||||
|
|
||||||
width = w_max (((g_settings.channellist_extended)?(frameBuffer->getScreenWidth() / 20 * 15):(frameBuffer->getScreenWidth() / 20 * 14)), 0);
|
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth();
|
||||||
|
width = w_max (((g_settings.channellist_extended)?(frameBuffer->getScreenWidth() / 20 * (fw+6)):(frameBuffer->getScreenWidth() / 20 * (fw+5))), 0);
|
||||||
height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2));
|
height = h_max ((frameBuffer->getScreenHeight() / 20 * 16), (frameBuffer->getScreenHeight() / 20 * 2));
|
||||||
|
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, name.c_str());
|
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, name.c_str());
|
||||||
|
@@ -121,9 +121,6 @@ CEpgData::CEpgData()
|
|||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAX_W 540
|
|
||||||
#define MAX_H 320
|
|
||||||
|
|
||||||
void CEpgData::start()
|
void CEpgData::start()
|
||||||
{
|
{
|
||||||
/* if you want usably sized epg windows, compile with "-DUSE_SPACE_EFFICIENTLY" */
|
/* if you want usably sized epg windows, compile with "-DUSE_SPACE_EFFICIENTLY" */
|
||||||
|
@@ -172,6 +172,13 @@ void CInfoViewer::Init()
|
|||||||
if(icon_small_width == 0)
|
if(icon_small_width == 0)
|
||||||
icon_small_width = 16;
|
icon_small_width = 16;
|
||||||
|
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_RESOLUTION_000, &icon_xres_width, &dummy_h);
|
||||||
|
if(icon_xres_width == 0)
|
||||||
|
icon_xres_width = 28;
|
||||||
|
|
||||||
|
frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED2_GREY, &icon_crypt_width, &dummy_h);
|
||||||
|
if(icon_crypt_width == 0)
|
||||||
|
icon_crypt_width = 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -272,6 +279,8 @@ void CInfoViewer::paintTime (bool show_dot, bool firstPaint)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// int ChanNameY = BoxStartY + (ChanHeight >> 1) + 5; //oberkante schatten?
|
// int ChanNameY = BoxStartY + (ChanHeight >> 1) + 5; //oberkante schatten?
|
||||||
|
if (is_visible && showButtonBar)
|
||||||
|
showIcon_Resolution();
|
||||||
|
|
||||||
char timestr[10];
|
char timestr[10];
|
||||||
struct timeb tm;
|
struct timeb tm;
|
||||||
@@ -586,6 +595,7 @@ fprintf(stderr, "after showchannellogo, mode = %d ret = %d logo_ok = %d\n",g_set
|
|||||||
showIcon_16_9 ();
|
showIcon_16_9 ();
|
||||||
showIcon_VTXT ();
|
showIcon_VTXT ();
|
||||||
showIcon_SubT();
|
showIcon_SubT();
|
||||||
|
showIcon_Resolution();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileplay) {
|
if (fileplay) {
|
||||||
@@ -904,8 +914,13 @@ void CInfoViewer::showSubchan ()
|
|||||||
|
|
||||||
void CInfoViewer::showIcon_16_9 ()
|
void CInfoViewer::showIcon_16_9 ()
|
||||||
{
|
{
|
||||||
if ((aspectRatio == 0) || (aspectRatio != videoDecoder->getAspectRatio())) {
|
if ((aspectRatio == 0) || ( g_RemoteControl->current_PIDs.PIDs.vpid == 0 ) || (aspectRatio != videoDecoder->getAspectRatio())) {
|
||||||
|
if ( g_RemoteControl->current_PIDs.PIDs.vpid > 0 ){
|
||||||
aspectRatio = videoDecoder->getAspectRatio();
|
aspectRatio = videoDecoder->getAspectRatio();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
aspectRatio = 0;
|
||||||
|
}
|
||||||
frameBuffer->paintIcon((aspectRatio > 2) ? NEUTRINO_ICON_16_9 : NEUTRINO_ICON_16_9_GREY,
|
frameBuffer->paintIcon((aspectRatio > 2) ? NEUTRINO_ICON_16_9 : NEUTRINO_ICON_16_9_GREY,
|
||||||
BoxEndX - (2*icon_large_width + 2*icon_small_width + 4*2), BBarY,
|
BoxEndX - (2*icon_large_width + 2*icon_small_width + 4*2), BBarY,
|
||||||
InfoHeightY_Info);
|
InfoHeightY_Info);
|
||||||
@@ -918,6 +933,55 @@ void CInfoViewer::showIcon_VTXT () const
|
|||||||
BoxEndX - (2*icon_small_width + 2*2), BBarY, InfoHeightY_Info);
|
BoxEndX - (2*icon_small_width + 2*2), BBarY, InfoHeightY_Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CInfoViewer::showIcon_Resolution() const
|
||||||
|
{
|
||||||
|
int xres, yres, framerate;
|
||||||
|
const char *icon_name = NULL;
|
||||||
|
if(videoDecoder->getBlank()){
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_000;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
videoDecoder->getPictureInfo(xres, yres, framerate);
|
||||||
|
switch(xres){
|
||||||
|
case 1920:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_1920;
|
||||||
|
break;
|
||||||
|
case 1440:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_1440;
|
||||||
|
break;
|
||||||
|
case 1280:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_1280;
|
||||||
|
break;
|
||||||
|
case 720:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_720;
|
||||||
|
break;
|
||||||
|
case 704:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_704;
|
||||||
|
break;
|
||||||
|
case 544:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_544;
|
||||||
|
break;
|
||||||
|
case 528:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_528;
|
||||||
|
break;
|
||||||
|
case 480:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_480;
|
||||||
|
break;
|
||||||
|
case 382:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_382;
|
||||||
|
break;
|
||||||
|
case 352:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_352;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
icon_name = NEUTRINO_ICON_RESOLUTION_000;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
frameBuffer->paintBoxRel(BoxEndX - (icon_xres_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, icon_large_width, InfoHeightY_Info, COL_INFOBAR_BUTTONS_BACKGROUND, RADIUS_SMALL, CORNER_BOTTOM);
|
||||||
|
frameBuffer->paintIcon(icon_name, BoxEndX - (icon_xres_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY, InfoHeightY_Info);
|
||||||
|
}
|
||||||
void CInfoViewer::showIcon_SubT() const
|
void CInfoViewer::showIcon_SubT() const
|
||||||
{
|
{
|
||||||
bool have_sub = false;
|
bool have_sub = false;
|
||||||
@@ -966,6 +1030,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
|
|||||||
showIcon_VTXT ();
|
showIcon_VTXT ();
|
||||||
showIcon_SubT();
|
showIcon_SubT();
|
||||||
showIcon_CA_Status (0);
|
showIcon_CA_Status (0);
|
||||||
|
showIcon_Resolution();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return messages_return::handled;
|
return messages_return::handled;
|
||||||
@@ -1186,7 +1251,7 @@ void CInfoViewer::showSNR ()
|
|||||||
/* center the scales in the button bar. BBarY + InfoHeightY_Info / 2 is middle,
|
/* center the scales in the button bar. BBarY + InfoHeightY_Info / 2 is middle,
|
||||||
scales are 6 pixels high, icons are 16 pixels, so keep 4 pixels free between
|
scales are 6 pixels high, icons are 16 pixels, so keep 4 pixels free between
|
||||||
the scales */
|
the scales */
|
||||||
varscale->paintProgressBar(BoxEndX - (((g_settings.casystem_display !=2) ? 2:3)*icon_large_width + 2*icon_small_width + ((g_settings.casystem_display !=2) ?4:5)*2) - 102,
|
varscale->paintProgressBar(BoxEndX - (((g_settings.casystem_display !=2) ? 0:icon_crypt_width )+ icon_xres_width + 2*icon_large_width + 2*icon_small_width + ((g_settings.casystem_display !=2) ?5:6)*2) - 102,
|
||||||
BBarY + InfoHeightY_Info / 2 - 2 - 6, 100, 6, per, 100);
|
BBarY + InfoHeightY_Info / 2 - 2 - 6, 100, 6, per, 100);
|
||||||
per = 0;
|
per = 0;
|
||||||
//HD info
|
//HD info
|
||||||
@@ -1209,7 +1274,7 @@ void CInfoViewer::showSNR ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hddscale->paintProgressBar(BoxEndX - (((g_settings.casystem_display !=2) ? 2:3)*icon_large_width + 2*icon_small_width + ((g_settings.casystem_display !=2) ?4:5)*2) - 102,
|
hddscale->paintProgressBar(BoxEndX - (((g_settings.casystem_display !=2) ? 0:icon_crypt_width )+ icon_xres_width + 2*icon_large_width + 2*icon_small_width + ((g_settings.casystem_display !=2) ?5:6)*2) - 102,
|
||||||
BBarY + InfoHeightY_Info / 2 + 2, 100, 6, per, 100);
|
BBarY + InfoHeightY_Info / 2 + 2, 100, 6, per, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1867,7 +1932,7 @@ void CInfoViewer::paint_ca_icons(int caid, char * icon, int &icon_space_offset)
|
|||||||
|
|
||||||
void CInfoViewer::showOne_CAIcon(bool fta)
|
void CInfoViewer::showOne_CAIcon(bool fta)
|
||||||
{
|
{
|
||||||
frameBuffer->paintIcon(fta ? NEUTRINO_ICON_SCRAMBLED2_GREY : NEUTRINO_ICON_SCRAMBLED2, BoxEndX - (3*icon_large_width + 2*icon_small_width + 5*2), BBarY,
|
frameBuffer->paintIcon(fta ? NEUTRINO_ICON_SCRAMBLED2_GREY : NEUTRINO_ICON_SCRAMBLED2, BoxEndX - (icon_xres_width + icon_crypt_width + 2*icon_large_width + 2*icon_small_width + 6*2), BBarY,
|
||||||
InfoHeightY_Info);
|
InfoHeightY_Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ class CInfoViewer
|
|||||||
|
|
||||||
int asize;
|
int asize;
|
||||||
int icol_w, icol_h;
|
int icol_w, icol_h;
|
||||||
int icon_large_width, icon_small_width;
|
int icon_large_width, icon_small_width, icon_xres_width, icon_crypt_width;
|
||||||
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
CSectionsdClient::CurrentNextInfo info_CurrentNext;
|
||||||
t_channel_id channel_id;
|
t_channel_id channel_id;
|
||||||
|
|
||||||
@@ -120,6 +120,7 @@ class CInfoViewer
|
|||||||
void showIcon_VTXT() const;
|
void showIcon_VTXT() const;
|
||||||
void showRecordIcon(const bool show);
|
void showRecordIcon(const bool show);
|
||||||
void showIcon_SubT() const;
|
void showIcon_SubT() const;
|
||||||
|
void showIcon_Resolution() const;
|
||||||
|
|
||||||
void showFailure();
|
void showFailure();
|
||||||
void showMotorMoving(int duration);
|
void showMotorMoving(int duration);
|
||||||
|
@@ -448,7 +448,7 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
{
|
{
|
||||||
char buf[100];
|
char buf[100];
|
||||||
//, buf2[100];
|
//, buf2[100];
|
||||||
int xres, yres, aspectRatio, framerate;
|
int xres = 0, yres = 0, aspectRatio = 0, framerate;
|
||||||
// paint labels
|
// paint labels
|
||||||
int spaceoffset = 0,i = 0;
|
int spaceoffset = 0,i = 0;
|
||||||
int array[5]={g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION)),
|
int array[5]={g_Font[font_info]->getRenderWidth(g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION)),
|
||||||
@@ -462,9 +462,10 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
spaceoffset = array[i];
|
spaceoffset = array[i];
|
||||||
}
|
}
|
||||||
average_bitrate_offset = spaceoffset+=4;
|
average_bitrate_offset = spaceoffset+=4;
|
||||||
|
if(!(videoDecoder->getBlank())){
|
||||||
videoDecoder->getPictureInfo(xres, yres, framerate);
|
videoDecoder->getPictureInfo(xres, yres, framerate);
|
||||||
aspectRatio = videoDecoder->getAspectRatio();
|
aspectRatio = videoDecoder->getAspectRatio();
|
||||||
|
}
|
||||||
//Video RESOLUTION
|
//Video RESOLUTION
|
||||||
ypos += iheight;
|
ypos += iheight;
|
||||||
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION));
|
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_STREAMINFO_RESOLUTION));
|
||||||
@@ -483,6 +484,9 @@ void CStreamInfo2::paint_techinfo(int xpos, int ypos)
|
|||||||
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_STREAMINFO_ARATIO));
|
sprintf ((char *) buf, "%s:",g_Locale->getText (LOCALE_STREAMINFO_ARATIO));
|
||||||
g_Font[font_info]->RenderString (xpos, ypos, width*2/3 - 10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8
|
g_Font[font_info]->RenderString (xpos, ypos, width*2/3 - 10, buf, COL_MENUCONTENTDARK, 0, true); // UTF-8
|
||||||
switch (aspectRatio) {
|
switch (aspectRatio) {
|
||||||
|
case 0:
|
||||||
|
sprintf ((char *) buf, "N/A");
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sprintf ((char *) buf, "4:3");
|
sprintf ((char *) buf, "4:3");
|
||||||
break;
|
break;
|
||||||
|
@@ -119,6 +119,17 @@
|
|||||||
#define NEUTRINO_ICON_NETWORK "network"
|
#define NEUTRINO_ICON_NETWORK "network"
|
||||||
#define NEUTRINO_ICON_LCD "lcd"
|
#define NEUTRINO_ICON_LCD "lcd"
|
||||||
#define NEUTRINO_ICON_VOLUME "volume"
|
#define NEUTRINO_ICON_VOLUME "volume"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_1920 "res_1920"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_1440 "res_1440"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_1280 "res_1280"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_720 "res_720"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_704 "res_704"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_544 "res_544"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_528 "res_528"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_480 "res_480"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_382 "res_382"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_352 "res_352"
|
||||||
|
#define NEUTRINO_ICON_RESOLUTION_000 "res_000"
|
||||||
|
|
||||||
#define DUMMY_ICON "dummy"
|
#define DUMMY_ICON "dummy"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user