gui/videosettings.cpp: add option to enable/disable SD OSD on apollo

Origin commit data
------------------
Branch: ni/coolstream
Commit: d446be1f95
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-04-15 (Tue, 15 Apr 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2014-04-15 15:10:58 +04:00
parent 734bcc44fe
commit 4eb99636a3
6 changed files with 24 additions and 1 deletions

View File

@@ -1233,6 +1233,7 @@ menu.hint_video_modes VF key will cycle between enabled modes
menu.hint_video_pip Picture in picture size and position
menu.hint_video_saturation Change picture saturation
menu.hint_video_scart_mode Select analog output mode for SCART connectors
menu.hint_video_sdosd Enable/disable OSD display on SD output (scart, cinch)
menu.hint_volume Configure Volume GUI options
menu.hint_volume_digits Numeric display of the volumebar on/off
menu.hint_volume_pos Select volume indicator position
@@ -2093,6 +2094,7 @@ videomenu.pip_error PiP start failed
videomenu.saturation Saturation
videomenu.scart Scart
videomenu.screensetup Screen Setup
videomenu.sdosd SD OSD
videomenu.sharpness Sharpness
videomenu.tv-scart Video
videomenu.vcrsignal VCR Output Signal Type

View File

@@ -54,6 +54,8 @@
#include <cs_api.h>
#include <video.h>
#include <cnxtfb.h>
extern cVideo *videoDecoder;
#ifdef ENABLE_PIP
extern cVideo *pipDecoder;
@@ -324,6 +326,10 @@ int CVideoSettings::showVideoSetup()
videosetup->addItem(bcont);
videosetup->addItem(ccont);
videosetup->addItem(scont);
CMenuOptionChooser * sd = new CMenuOptionChooser(LOCALE_VIDEOMENU_SDOSD, &g_settings.enable_sd_osd, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this);
sd->setHint("", LOCALE_MENU_HINT_VIDEO_SDOSD);
videosetup->addItem(sd);
}
#endif
#ifdef ENABLE_PIP
@@ -380,6 +386,7 @@ void CVideoSettings::setVideoSettings()
changeNotify(LOCALE_VIDEOMENU_BRIGHTNESS, NULL);
changeNotify(LOCALE_VIDEOMENU_CONTRAST, NULL);
changeNotify(LOCALE_VIDEOMENU_SATURATION, NULL);
changeNotify(LOCALE_VIDEOMENU_SDOSD, NULL);
#endif
#ifdef ENABLE_PIP
pipDecoder->Pig(g_settings.pip_x, g_settings.pip_y, g_settings.pip_width, g_settings.pip_height, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
@@ -462,6 +469,14 @@ bool CVideoSettings::changeNotify(const neutrino_locale_t OptionName, void * /*
{
videoDecoder->SetControl(VIDEO_CONTROL_SATURATION, g_settings.saturation*3);
}
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_SDOSD))
{
int val = g_settings.enable_sd_osd;
printf("SD OSD enable: %d\n", val);
int fd = CFrameBuffer::getInstance()->getFileHandle();
if (ioctl(fd, FBIO_SCALE_SD_OSD, &val))
perror("FBIO_SCALE_SD_OSD");
}
#endif
#if 0
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_SHARPNESS))

View File

@@ -833,6 +833,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.brightness = configfile.getInt32("brightness", 0);
g_settings.contrast = configfile.getInt32("contrast", 0);
g_settings.saturation = configfile.getInt32("saturation", 0);
g_settings.enable_sd_osd = configfile.getInt32("enable_sd_osd", 1);
#endif
#ifdef ENABLE_PIP
g_settings.pip_x = configfile.getInt32("pip_x", 50);
@@ -1271,7 +1272,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
#ifdef BOXMODEL_APOLLO
configfile.setInt32("brightness", g_settings.brightness );
configfile.setInt32("contrast", g_settings.contrast );
configfile.setInt32("saturation", g_settings.saturation );
configfile.setInt32("enable_sd_osd", g_settings.enable_sd_osd );
#endif
#ifdef ENABLE_PIP
configfile.setInt32("pip_x", g_settings.pip_x);

View File

@@ -1260,6 +1260,7 @@ typedef enum
LOCALE_MENU_HINT_VIDEO_PIP,
LOCALE_MENU_HINT_VIDEO_SATURATION,
LOCALE_MENU_HINT_VIDEO_SCART_MODE,
LOCALE_MENU_HINT_VIDEO_SDOSD,
LOCALE_MENU_HINT_VOLUME,
LOCALE_MENU_HINT_VOLUME_DIGITS,
LOCALE_MENU_HINT_VOLUME_POS,
@@ -2120,6 +2121,7 @@ typedef enum
LOCALE_VIDEOMENU_SATURATION,
LOCALE_VIDEOMENU_SCART,
LOCALE_VIDEOMENU_SCREENSETUP,
LOCALE_VIDEOMENU_SDOSD,
LOCALE_VIDEOMENU_SHARPNESS,
LOCALE_VIDEOMENU_TV_SCART,
LOCALE_VIDEOMENU_VCRSIGNAL,

View File

@@ -1260,6 +1260,7 @@ const char * locale_real_names[] =
"menu.hint_video_pip",
"menu.hint_video_saturation",
"menu.hint_video_scart_mode",
"menu.hint_video_sdosd",
"menu.hint_volume",
"menu.hint_volume_digits",
"menu.hint_volume_pos",
@@ -2120,6 +2121,7 @@ const char * locale_real_names[] =
"videomenu.saturation",
"videomenu.scart",
"videomenu.screensetup",
"videomenu.sdosd",
"videomenu.sharpness",
"videomenu.tv-scart",
"videomenu.vcrsignal",

View File

@@ -59,6 +59,7 @@ struct SNeutrinoSettings
int brightness;
int contrast;
int saturation;
int enable_sd_osd;
#endif
char current_volume;
int current_volume_step;