mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 01:41:12 +02:00
gui/videosettings.cpp: add missed hints, add PiP setup,
set initial PiP size/position, set format/aspect to PiP decoder
Origin commit data
------------------
Branch: ni/coolstream
Commit: da066c9155
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2013-02-26 (Tue, 26 Feb 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -54,6 +54,10 @@
|
|||||||
#include <video.h>
|
#include <video.h>
|
||||||
|
|
||||||
extern cVideo *videoDecoder;
|
extern cVideo *videoDecoder;
|
||||||
|
#ifdef BOXMODEL_APOLLO
|
||||||
|
extern cVideo *pipDecoder;
|
||||||
|
#include <gui/pipsetup.h>
|
||||||
|
#endif
|
||||||
extern int prev_video_mode;
|
extern int prev_video_mode;
|
||||||
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
|
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
|
||||||
|
|
||||||
@@ -297,11 +301,19 @@ int CVideoSettings::showVideoSetup()
|
|||||||
#ifdef BOXMODEL_APOLLO
|
#ifdef BOXMODEL_APOLLO
|
||||||
/* values are from -128 to 127, but brightness really no sense after +/- 40. changeNotify multiply contrast and saturation to 3 */
|
/* values are from -128 to 127, but brightness really no sense after +/- 40. changeNotify multiply contrast and saturation to 3 */
|
||||||
CMenuOptionNumberChooser * bcont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_BRIGHTNESS, &g_settings.brightness, true, -42, 42, this);
|
CMenuOptionNumberChooser * bcont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_BRIGHTNESS, &g_settings.brightness, true, -42, 42, this);
|
||||||
|
bcont->setHint("", LOCALE_MENU_HINT_VIDEO_BRIGHTNESS);
|
||||||
CMenuOptionNumberChooser * ccont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_CONTRAST, &g_settings.contrast, true, -42, 42, this);
|
CMenuOptionNumberChooser * ccont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_CONTRAST, &g_settings.contrast, true, -42, 42, this);
|
||||||
|
ccont->setHint("", LOCALE_MENU_HINT_VIDEO_CONTRAST);
|
||||||
CMenuOptionNumberChooser * scont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_SATURATION, &g_settings.saturation, true, -42, 42, this);
|
CMenuOptionNumberChooser * scont = new CMenuOptionNumberChooser(LOCALE_VIDEOMENU_SATURATION, &g_settings.saturation, true, -42, 42, this);
|
||||||
|
scont->setHint("", LOCALE_MENU_HINT_VIDEO_SATURATION);
|
||||||
videosetup->addItem(bcont);
|
videosetup->addItem(bcont);
|
||||||
videosetup->addItem(ccont);
|
videosetup->addItem(ccont);
|
||||||
videosetup->addItem(scont);
|
videosetup->addItem(scont);
|
||||||
|
|
||||||
|
CPipSetup pip;
|
||||||
|
CMenuForwarder * pipsetup = new CMenuForwarder(LOCALE_VIDEOMENU_PIP, true, NULL, &pip);
|
||||||
|
pipsetup->setHint("", LOCALE_MENU_HINT_VIDEO_PIP);
|
||||||
|
videosetup->addItem(pipsetup);
|
||||||
#endif
|
#endif
|
||||||
int res = videosetup->exec(NULL, "");
|
int res = videosetup->exec(NULL, "");
|
||||||
selected = videosetup->getSelected();
|
selected = videosetup->getSelected();
|
||||||
@@ -332,6 +344,9 @@ void CVideoSettings::setVideoSettings()
|
|||||||
videoDecoder->setAspectRatio(g_settings.video_Format, -1);
|
videoDecoder->setAspectRatio(g_settings.video_Format, -1);
|
||||||
#endif
|
#endif
|
||||||
videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||||
|
#ifdef BOXMODEL_APOLLO
|
||||||
|
pipDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||||
|
#endif
|
||||||
|
|
||||||
videoDecoder->SetDBDR(g_settings.video_dbdr);
|
videoDecoder->SetDBDR(g_settings.video_dbdr);
|
||||||
CAutoModeNotifier anotify;
|
CAutoModeNotifier anotify;
|
||||||
@@ -340,6 +355,7 @@ void CVideoSettings::setVideoSettings()
|
|||||||
changeNotify(LOCALE_VIDEOMENU_BRIGHTNESS, NULL);
|
changeNotify(LOCALE_VIDEOMENU_BRIGHTNESS, NULL);
|
||||||
changeNotify(LOCALE_VIDEOMENU_CONTRAST, NULL);
|
changeNotify(LOCALE_VIDEOMENU_CONTRAST, NULL);
|
||||||
changeNotify(LOCALE_VIDEOMENU_SATURATION, NULL);
|
changeNotify(LOCALE_VIDEOMENU_SATURATION, NULL);
|
||||||
|
pipDecoder->Pig(g_settings.pip_x, g_settings.pip_y, g_settings.pip_width, g_settings.pip_height, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,6 +413,9 @@ bool CVideoSettings::changeNotify(const neutrino_locale_t OptionName, void * /*
|
|||||||
if (g_settings.video_Format != 1 && g_settings.video_Format != 3 && g_settings.video_Format != 2)
|
if (g_settings.video_Format != 1 && g_settings.video_Format != 3 && g_settings.video_Format != 2)
|
||||||
g_settings.video_Format = 3;
|
g_settings.video_Format = 3;
|
||||||
videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
videoDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||||
|
#ifdef BOXMODEL_APOLLO
|
||||||
|
pipDecoder->setAspectRatio(g_settings.video_Format, g_settings.video_43mode);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOMODE))
|
else if (ARE_LOCALES_EQUAL(OptionName, LOCALE_VIDEOMENU_VIDEOMODE))
|
||||||
{
|
{
|
||||||
@@ -449,6 +468,9 @@ void CVideoSettings::next43Mode(void)
|
|||||||
text = VIDEOMENU_43MODE_OPTIONS[curmode].value;
|
text = VIDEOMENU_43MODE_OPTIONS[curmode].value;
|
||||||
g_settings.video_43mode = VIDEOMENU_43MODE_OPTIONS[curmode].key;
|
g_settings.video_43mode = VIDEOMENU_43MODE_OPTIONS[curmode].key;
|
||||||
videoDecoder->setAspectRatio(-1, g_settings.video_43mode);
|
videoDecoder->setAspectRatio(-1, g_settings.video_43mode);
|
||||||
|
#ifdef BOXMODEL_APOLLO
|
||||||
|
pipDecoder->setAspectRatio(-1, g_settings.video_43mode);
|
||||||
|
#endif
|
||||||
ShowHintUTF(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2);
|
ShowHintUTF(LOCALE_VIDEOMENU_43MODE, g_Locale->getText(text), 450, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,6 +494,9 @@ void CVideoSettings::SwitchFormat()
|
|||||||
g_settings.video_Format = VIDEOMENU_VIDEOFORMAT_OPTIONS[curmode].key;
|
g_settings.video_Format = VIDEOMENU_VIDEOFORMAT_OPTIONS[curmode].key;
|
||||||
|
|
||||||
videoDecoder->setAspectRatio(g_settings.video_Format, -1);
|
videoDecoder->setAspectRatio(g_settings.video_Format, -1);
|
||||||
|
#ifdef BOXMODEL_APOLLO
|
||||||
|
pipDecoder->setAspectRatio(g_settings.video_Format, -1);
|
||||||
|
#endif
|
||||||
ShowHintUTF(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2);
|
ShowHintUTF(LOCALE_VIDEOMENU_VIDEOFORMAT, g_Locale->getText(text), 450, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user