summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c14
-rw-r--r--config.h12
-rw-r--r--setup_menu.c7
3 files changed, 30 insertions, 3 deletions
diff --git a/config.c b/config.c
index 03da4d76..aca53e80 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c,v 1.47 2007-09-30 16:52:18 phintuka Exp $
+ * $Id: config.c,v 1.48 2007-09-30 21:11:11 phintuka Exp $
*
*/
@@ -202,6 +202,15 @@ const char *config_t::s_subExts[] = {
NULL
};
+const char *config_t::s_osdMixers[] = {
+ trNOOP("no"),
+ trNOOP("grayscale"), // item [1]
+ trNOOP("transparent"), // item [2]
+ trNOOP("transparent greyscale"), // item [3] ([1 | 2])
+ trNOOP("yes"),
+ NULL
+};
+
static char *strcatrealloc(char *dest, const char *src)
{
if (!src || !*src)
@@ -426,6 +435,8 @@ config_t::config_t() {
display_aspect = 0; /* auto */
hide_main_menu = 0;
+ osd_mixer = OSD_MIXER_FULL;
+
prescale_osd = 1;
prescale_osd_downscale = 0;
unscaled_osd = 0;
@@ -654,6 +665,7 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Audio.SoftwareVolumeControl")) sw_volume_control = atoi(Value);
else if (!strcasecmp(Name, "OSD.HideMainMenu")) hide_main_menu = atoi(Value);
+ else if (!strcasecmp(Name, "OSD.LayersVisible")) osd_mixer = atoi(Value);
else if (!strcasecmp(Name, "OSD.Prescale")) prescale_osd = atoi(Value);
else if (!strcasecmp(Name, "OSD.Downscale")) prescale_osd_downscale = atoi(Value);
else if (!strcasecmp(Name, "OSD.UnscaledAlways")) unscaled_osd = atoi(Value);
diff --git a/config.h b/config.h
index a7ccb3cf..bcc2bad4 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h,v 1.31 2007-09-30 16:52:18 phintuka Exp $
+ * $Id: config.h,v 1.32 2007-09-30 21:11:11 phintuka Exp $
*
*/
@@ -122,6 +122,14 @@
#define SPEAKERS_A52_PASSTHRU 12
#define SPEAKERS_count 13
+// OSD layers mixing
+#define OSD_MIXER_NONE 0
+#define OSD_MIXER_GRAY 1
+#define OSD_MIXER_ALPHA 2
+#define OSD_MIXER_GRAYALPHA 3 // OSD_MIXER_GRAY | OSD_MIXER_ALPHA
+#define OSD_MIXER_FULL 4
+#define OSD_MIXER_count 5
+
#define SUBTITLESIZE_count 7
#define HIDDEN_OPTION(opt) \
@@ -163,6 +171,7 @@ class config_t {
static const char *s_speakerArrangements[];
static const char *s_subtitleSizes[];
static const char *s_subExts[];
+ static const char *s_osdMixers[];
public:
@@ -211,6 +220,7 @@ class config_t {
// OSD settings
eMainMenuMode main_menu_mode; // used internally to open right sub-menu
int hide_main_menu;
+ int osd_mixer; // show multiple OSD layers
int prescale_osd;
int prescale_osd_downscale;
int unscaled_osd;
diff --git a/setup_menu.c b/setup_menu.c
index 5c3d9510..417cba2a 100644
--- a/setup_menu.c
+++ b/setup_menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: setup_menu.c,v 1.40 2007-09-30 16:52:18 phintuka Exp $
+ * $Id: setup_menu.c,v 1.41 2007-09-30 21:11:10 phintuka Exp $
*
*/
@@ -840,6 +840,10 @@ void cMenuSetupOSD::Set(void)
Add(NewTitle(tr("On-Screen Display")));
Add(new cMenuEditBoolItem(tr("Hide main menu"),
&newconfig.hide_main_menu));
+#if VDRVERSNUM >= 10509
+ Add(new cMenuEditStraI18nItem(tr("Show all layers"), &newconfig.osd_mixer,
+ OSD_MIXER_count, xc.s_osdMixers));
+#endif
Add(ctrl_scale =
new cMenuEditBoolItem(tr("Scale OSD to video size"),
&newconfig.prescale_osd));
@@ -939,6 +943,7 @@ void cMenuSetupOSD::Store(void)
orig_alpha_correction_abs = xc.alpha_correction_abs;
SetupStore("OSD.HideMainMenu", xc.hide_main_menu);
+ SetupStore("OSD.LayersVisible", xc.osd_mixer);
SetupStore("OSD.Prescale", xc.prescale_osd);
SetupStore("OSD.Downscale", xc.prescale_osd_downscale);
SetupStore("OSD.UnscaledAlways", xc.unscaled_osd);