neutrino: add setting for a simple resolution display

this enables the "simple" display that only shows "SD" and "HD"
(This originated on the dbox2world forum, I'm not sure who the
 original author was).

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@968 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2010-12-26 11:38:45 +00:00
parent e76b372031
commit 13c8a1642a
12 changed files with 110 additions and 49 deletions

View File

@@ -21,6 +21,7 @@ install_DATA = \
radar5.raw radar6.raw radar7.raw radar8.raw radar9.raw movieplayer.raw rec.png recording.png \
res_1920.png res_1280.png res_1440.png res_1080.png res_720.png res_704.png res_576.png \
res_528.png res_544.png res_480.png res_382.png res_352.png res_288.png res_000.png \
res_hd.png res_sd.png \
settings.png shell.png softupdate.png streaming.png \
subt.png subt_gray.png timer.png video.png \
volume.png volumebody.png volumeslider2.png volumeslider2alpha.png \

BIN
data/icons/res_hd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

BIN
data/icons/res_sd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

View File

@@ -744,6 +744,8 @@ miscsettings.infobar_disp_3 Logo Infobar / Signalbalken
miscsettings.infobar_disp_log Infobar Dis.
miscsettings.infobar_sat_display Kabel-/Satellitenanbieter
miscsettings.infobar_show Info bei EPG Änderungen
miscsettings.infobar_show_res Auflösung anzeigen
miscsettings.infobar_show_res_simple einfach
miscsettings.infobar_show_var_hdd Füllstandanzeige (var & hdd)
miscsettings.noaviawatchdog AVIA-Watchdog aktivieren
miscsettings.noenxwatchdog eNX-Watchdog aktivieren

View File

@@ -542,6 +542,8 @@ miscsettings.infobar_disp_3 Logo 3
miscsettings.infobar_disp_log Infoview Dis.
miscsettings.infobar_sat_display Satellite display on infobar
miscsettings.infobar_show show Info on EPG change
miscsettings.infobar_show_res show resolution on infobar
miscsettings.infobar_show_res_simple simple
miscsettings.infobar_show_var_hdd Fill level (var & hdd )
miscsettings.noaviawatchdog enable AVIA watchdog
miscsettings.noenxwatchdog enable eNX watchdog

View File

@@ -148,6 +148,9 @@ void CInfoViewer::Init()
if (icon_xres_width == 0)
icon_xres_width = 28;
if (g_settings.infobar_show_res >= 2)
icon_xres_width = 0;
frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED2_GREY, &icon_crypt_width, &dummy_h);
if (icon_crypt_width == 0)
icon_crypt_width = 24;
@@ -988,8 +991,8 @@ void CInfoViewer::showIcon_Resolution() const
const char *icon_name = NULL;
if (videoDecoder->getBlank()) {
icon_name = NEUTRINO_ICON_RESOLUTION_000;
}
else {
} else {
if (g_settings.infobar_show_res == 0) {//show resolution icon on infobar
videoDecoder->getPictureInfo(xres, yres, framerate);
switch (yres) {
case 1920:
@@ -1036,10 +1039,38 @@ void CInfoViewer::showIcon_Resolution() const
break;
}
}
if (g_settings.infobar_show_res == 1) {//show simple resolution icon on infobar
videoDecoder->getPictureInfo(xres, yres, framerate);
switch (yres) {
case 1920:
case 1440:
case 1280:
case 1088:
case 720:
icon_name = NEUTRINO_ICON_RESOLUTION_HD;
break;
case 704:
case 576:
case 544:
case 528:
case 480:
case 382:
case 352:
case 288:
icon_name = NEUTRINO_ICON_RESOLUTION_SD;
break;
default:
icon_name = NEUTRINO_ICON_RESOLUTION_000;
break;
}
}
}
if (g_settings.infobar_show_res < 2) {
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
{
bool have_sub = false;
@@ -1978,8 +2009,14 @@ void CInfoViewer::paint_ca_icons(int caid, char * icon, int &icon_space_offset)
void CInfoViewer::showOne_CAIcon(bool fta)
{
if (g_settings.infobar_show_res < 2){
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);
}
else if (g_settings.infobar_show_res == 2){
frameBuffer->paintIcon(fta ? NEUTRINO_ICON_SCRAMBLED2_GREY : NEUTRINO_ICON_SCRAMBLED2, BoxEndX - (icon_crypt_width + 2*icon_large_width + 2*icon_small_width + 5*2), BBarY,
InfoHeightY_Info);
}
}
void CInfoViewer::showIcon_CA_Status (int notfirst)

View File

@@ -220,6 +220,14 @@ const CMenuOptionChooser::keyval MENU_DISP_POS_OPTIONS[MENU_DISP_POS_OPTIONS_CO
{ 4 , LOCALE_SETTINGS_POS_BOTTOM_RIGHT }
};
#define INFOBAR_SHOW_RES_MODE_OPTION_COUNT 3
const CMenuOptionChooser::keyval INFOBAR_SHOW_RES_MODE_OPTIONS[INFOBAR_SHOW_RES_MODE_OPTION_COUNT] =
{
{ 0, LOCALE_OPTIONS_ON },
{ 1, LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES_SIMPLE },
{ 2, LOCALE_OPTIONS_OFF }
};
//show osd setup
void COsdSetup::showOsdSetup()
@@ -522,6 +530,7 @@ void COsdSetup::showOsdInfobarSetup(CMenuWidget *menu_infobar)
menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_VIRTUAL_ZAP_MODE, &g_settings.virtual_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY, &g_settings.infobar_sat_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_VAR_HDD, &g_settings.infobar_show_var_hdd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES, &g_settings.infobar_show_res, INFOBAR_SHOW_RES_MODE_OPTIONS, INFOBAR_SHOW_RES_MODE_OPTION_COUNT, true));
menu_infobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_SHOW, &g_settings.infobar_show, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
}

View File

@@ -137,6 +137,9 @@
#define NEUTRINO_ICON_RESOLUTION_352 "res_352"
#define NEUTRINO_ICON_RESOLUTION_288 "res_288"
#define NEUTRINO_ICON_RESOLUTION_000 "res_000"
#define NEUTRINO_ICON_RESOLUTION_HD "res_hd"
#define NEUTRINO_ICON_RESOLUTION_SD "res_sd"
#define DUMMY_ICON "dummy"

View File

@@ -484,6 +484,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.menu_pos = configfile.getInt32("menu_pos", 0 );
g_settings.infobar_show_var_hdd = configfile.getBool("infobar_show_var_hdd" , true );
g_settings.show_infomenu = configfile.getInt32("show_infomenu", 0 );
g_settings.infobar_show_res = configfile.getInt32("infobar_show_res", 0 );
//audio
g_settings.audio_AnalogMode = configfile.getInt32( "audio_AnalogMode", 0 );
g_settings.audio_DolbyDigital = configfile.getBool("audio_DolbyDigital" , false);
@@ -1031,6 +1032,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32("menu_pos" , g_settings.menu_pos);
configfile.setInt32("infobar_show_var_hdd" , g_settings.infobar_show_var_hdd );
configfile.setInt32("show_infomenu" , g_settings.show_infomenu );
configfile.setInt32("infobar_show_res" , g_settings.infobar_show_res );
//audio
configfile.setInt32( "audio_AnalogMode", g_settings.audio_AnalogMode );

View File

@@ -574,6 +574,8 @@ typedef enum {
LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG,
LOCALE_MISCSETTINGS_INFOBAR_SAT_DISPLAY,
LOCALE_MISCSETTINGS_INFOBAR_SHOW,
LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES,
LOCALE_MISCSETTINGS_INFOBAR_SHOW_RES_SIMPLE,
LOCALE_MISCSETTINGS_INFOBAR_SHOW_VAR_HDD,
LOCALE_MISCSETTINGS_SHOW_INFOMENU,
LOCALE_MISCSETTINGS_SHUTDOWN_COUNT,

View File

@@ -574,6 +574,8 @@ const char *locale_real_names[] = {
"miscsettings.infobar_disp_log",
"miscsettings.infobar_sat_display",
"miscsettings.infobar_show",
"miscsettings.infobar_show_res",
"miscsettings.infobar_show_res_simple",
"miscsettings.infobar_show_var_hdd",
"miscsettings.show_infomenu",
"miscsettings.shutdown_count",

View File

@@ -73,6 +73,7 @@ struct SNeutrinoSettings
int volume_pos;
int menu_pos;
int infobar_show_var_hdd;
int infobar_show_res;
//audio
int audio_AnalogMode;
int audio_DolbyDigital;