diff options
-rw-r--r-- | config.c | 22 | ||||
-rw-r--r-- | config.h | 12 | ||||
-rw-r--r-- | osd.c | 6 | ||||
-rw-r--r-- | setup_menu.c | 27 |
4 files changed, 43 insertions, 24 deletions
@@ -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.62 2008-04-29 11:36:07 phintuka Exp $ + * $Id: config.c,v 1.63 2008-04-29 12:44:25 phintuka Exp $ * */ @@ -212,6 +212,12 @@ const char * const config_t::s_subExts[] = { NULL }; +const char * const config_t::s_osdBlendingMethods[] = { + trNOOP("Software"), + trNOOP("Hardware"), + NULL +}; + const char * const config_t::s_osdMixers[] = { trNOOP("no"), trNOOP("grayscale"), // item [1] @@ -453,8 +459,8 @@ config_t::config_t() { osd_scaling = OSD_SCALING_NEAREST; hud_osd = 0; - unscaled_osd = 0; - unscaled_osd_lowresvideo = 1; + osd_blending = OSD_BLENDING_SOFTWARE; + osd_blending_lowresvideo = OSD_BLENDING_HARDWARE; #if VDRVERSNUM < 10515 spu_autoshow = 0; @@ -686,9 +692,13 @@ bool config_t::SetupParse(const char *Name, const char *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.Scaling")) osd_scaling = atoi(Value); - else if (!strcasecmp(Name, "OSD.UnscaledAlways")) unscaled_osd = atoi(Value); - else if (!strcasecmp(Name, "OSD.UnscaledLowRes")) unscaled_osd_lowresvideo = atoi(Value); - + else if (!strcasecmp(Name, "OSD.Blending")) osd_blending = atoi(Value); + else if (!strcasecmp(Name, "OSD.BlendingLowRes")) osd_blending_lowresvideo = atoi(Value); +#if 1 + // < 1.0.1 + else if (!strcasecmp(Name, "OSD.UnscaledAlways")) osd_blending = atoi(Value); + else if (!strcasecmp(Name, "OSD.UnscaledLowRes")) osd_blending_lowresvideo = atoi(Value); +#endif else if (!strcasecmp(Name, "OSD.AlphaCorrection")) alpha_correction = atoi(Value); else if (!strcasecmp(Name, "OSD.AlphaCorrectionAbs")) alpha_correction_abs = atoi(Value); @@ -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.45 2008-04-14 14:13:15 phintuka Exp $ + * $Id: config.h,v 1.46 2008-04-29 12:44:25 phintuka Exp $ * */ @@ -132,6 +132,11 @@ #define SPEAKERS_A52_PASSTHRU 12 #define SPEAKERS_count 13 +// OSD blending methods +#define OSD_BLENDING_SOFTWARE 0 // xine-lib "normal" osd +#define OSD_BLENDING_HARDWARE 1 // xine-lib "unscaled osd" +#define OSD_BLENDING_count 2 + // OSD layers mixing #define OSD_MIXER_NONE 0 #define OSD_MIXER_GRAY 1 @@ -187,6 +192,7 @@ class config_t { static const char * const s_speakerArrangements[]; static const char * const s_subtitleSizes[]; static const char * const s_subExts[]; + static const char * const s_osdBlendingMethods[]; static const char * const s_osdMixers[]; static const char * const s_osdScalings[]; static const char * const s_vo_aspects[]; @@ -242,8 +248,8 @@ class config_t { int osd_mixer; // show multiple OSD layers int osd_scaling; // OSD scaling mode: off, nearest, bilinear int hud_osd; // head up display OSD - int unscaled_osd; - int unscaled_osd_lowresvideo; + int osd_blending; // OSD blending method + int osd_blending_lowresvideo; // Use hardware blending for low-resolution video int alpha_correction; int alpha_correction_abs; int extsub_size; /* size of separate subtitles ( -1 = xine default ; 0...6 = { tiny small normal large very large huge } */ @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: osd.c,v 1.23 2008-04-14 19:58:54 phintuka Exp $ + * $Id: osd.c,v 1.24 2008-04-29 12:44:25 phintuka Exp $ * */ @@ -224,9 +224,9 @@ void cXinelibOsd::CmdRle(int Wnd, int X0, int Y0, memcpy(&osdcmd.dirty_area, DirtyArea, sizeof(osd_rect_t)); if(m_Refresh) osdcmd.flags |= OSDFLAG_REFRESH; - if(xc.unscaled_osd) + if(xc.osd_blending == OSD_BLENDING_HARDWARE) osdcmd.flags |= OSDFLAG_UNSCALED; - else if(xc.unscaled_osd_lowresvideo) + if(xc.osd_blending_lowresvideo == OSD_BLENDING_HARDWARE) osdcmd.flags |= OSDFLAG_UNSCALED_LOWRES; prepare_palette(&clut[0], Palette, Colors, /*Top*/(Prev() == NULL), true); diff --git a/setup_menu.c b/setup_menu.c index f40971e4..5f0a1176 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.57 2008-04-29 12:38:17 phintuka Exp $ + * $Id: setup_menu.c,v 1.58 2008-04-29 12:44:25 phintuka Exp $ * */ @@ -848,7 +848,7 @@ class cMenuSetupOSD : public cMenuSetupPage cOsdItem *ctrl_scaling; cOsdItem *ctrl_alpha; cOsdItem *ctrl_alpha_abs; - cOsdItem *ctrl_unscaled; + cOsdItem *ctrl_blending; cOsdItem *ctrl_lowres; #if VDRVERSNUM < 10515 cOsdItem *ctrl_spulang0; @@ -888,7 +888,7 @@ void cMenuSetupOSD::Set(void) Clear(); ctrl_scaling = NULL; - ctrl_unscaled = NULL; + ctrl_blending = NULL; ctrl_lowres = NULL; ctrl_alpha = NULL; ctrl_alpha_abs = NULL; @@ -900,14 +900,15 @@ void cMenuSetupOSD::Set(void) Add(new cMenuEditBoolItem(tr("Hide main menu"), &newconfig.hide_main_menu)); - Add(ctrl_unscaled = + Add(ctrl_blending = new cMenuEditBoolItem(tr("Blending method"), - &newconfig.unscaled_osd, - tr("Software"), tr("Hardware"))); - if(!newconfig.unscaled_osd) { + &newconfig.osd_blending, + tr(xc.s_osdBlendingMethods[OSD_BLENDING_SOFTWARE]), + tr(xc.s_osdBlendingMethods[OSD_BLENDING_HARDWARE]))); + if(newconfig.osd_blending == OSD_BLENDING_SOFTWARE) { Add(ctrl_lowres = new cMenuEditBoolItem(tr(" Use hardware for low-res video"), - &newconfig.unscaled_osd_lowresvideo)); + &newconfig.osd_blending_lowresvideo)); } Add(ctrl_scaling = @@ -974,9 +975,9 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key) else if(item == ctrl_alpha_abs) xc.alpha_correction_abs = newconfig.alpha_correction_abs; - if(!newconfig.unscaled_osd && !ctrl_lowres) + if(newconfig.osd_blending==OSD_BLENDING_SOFTWARE && !ctrl_lowres) Set(); - if(newconfig.unscaled_osd && ctrl_lowres) + if(newconfig.osd_blending!=OSD_BLENDING_SOFTWARE && ctrl_lowres) Set(); #if VDRVERSNUM < 10515 if(newconfig.spu_autoshow && !ctrl_spulang0) @@ -1002,10 +1003,12 @@ void cMenuSetupOSD::Store(void) SetupStore("OSD.Scaling", xc.osd_scaling); SetupStore("OSD.HideMainMenu", xc.hide_main_menu); SetupStore("OSD.LayersVisible", xc.osd_mixer); - SetupStore("OSD.UnscaledAlways", xc.unscaled_osd); - SetupStore("OSD.UnscaledLowRes", xc.unscaled_osd_lowresvideo); + SetupStore("OSD.Blending", xc.osd_blending); + SetupStore("OSD.BlendingLowRes", xc.osd_blending_lowresvideo); #if 1 // Delete old keys (<=1.0.0) + SetupStore("OSD.UnscaledAlways"); + SetupStore("OSD.UnscaledLowRes"); SetupStore("OSD.UnscaledOpaque"); SetupStore("OSD.Prescale"); SetupStore("OSD.Downscale"); |