diff options
author | phintuka <phintuka> | 2010-03-12 23:00:27 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-03-12 23:00:27 +0000 |
commit | a9664989130621ecec2c7d9984698a1523ce9638 (patch) | |
tree | bdeace6565083270c227a0d51fc93dd72a27bc9a | |
parent | c289ba88044d05d1795e299e99063fe49e1cfa80 (diff) | |
download | xineliboutput-a9664989130621ecec2c7d9984698a1523ce9638.tar.gz xineliboutput-a9664989130621ecec2c7d9984698a1523ce9638.tar.bz2 |
Added an setup option to select between subtitle OSD scaling and re-positioning
-rw-r--r-- | config.c | 4 | ||||
-rw-r--r-- | config.h | 3 | ||||
-rw-r--r-- | osd.c | 8 | ||||
-rw-r--r-- | setup_menu.c | 5 |
4 files changed, 14 insertions, 6 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.88 2010-03-10 21:17:44 phintuka Exp $ + * $Id: config.c,v 1.89 2010-03-12 23:00:26 phintuka Exp $ * */ @@ -567,6 +567,7 @@ config_t::config_t() { osd_height_auto = 0; osd_mixer = OSD_MIXER_FULL; osd_scaling = OSD_SCALING_NEAREST; + osd_spu_scaling = OSD_SCALING_NEAREST; hud_osd = 0; osd_blending = OSD_BLENDING_SOFTWARE; @@ -811,6 +812,7 @@ bool config_t::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name, "OSD.Height")) osd_height = 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.ScalingSPU")) osd_spu_scaling = 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 @@ -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.68 2009-11-16 11:16:16 phintuka Exp $ + * $Id: config.h,v 1.69 2010-03-12 23:00:26 phintuka Exp $ * */ @@ -309,6 +309,7 @@ class config_t { int osd_height_auto; int osd_mixer; // show multiple OSD layers int osd_scaling; // OSD scaling mode: off, nearest, bilinear + int osd_spu_scaling; // SPU OSD scaling mode: off, nearest, bilinear int hud_osd; // head up display OSD int osd_blending; // OSD blending method int osd_blending_lowresvideo; // Use hardware blending for low-resolution video @@ -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.40 2010-01-24 14:53:50 rofafor Exp $ + * $Id: osd.c,v 1.41 2010-03-12 23:00:27 phintuka Exp $ * */ @@ -291,6 +291,8 @@ void cXinelibOsd::CmdRle(int Wnd, int X0, int Y0, osdcmd.colors = Colors; osdcmd.palette = clut; osdcmd.scaling = xc.osd_scaling; + if (m_Layer == OSD_LEVEL_SUBTITLES || m_Layer == OSD_LEVEL_TTXTSUBS) + osdcmd.scaling = xc.osd_spu_scaling; if (DirtyArea) memcpy(&osdcmd.dirty_area, DirtyArea, sizeof(osd_rect_t)); @@ -370,7 +372,7 @@ eOsdError cXinelibOsd::SetAreas(const tArea *Areas, int NumAreas) #if VDRVERSNUM >= 10708 - if(xc.osd_scaling && ((m_Layer==OSD_LEVEL_SUBTITLES) || (m_Layer==OSD_LEVEL_TTXTSUBS))) { + if (xc.osd_spu_scaling && (m_Layer == OSD_LEVEL_SUBTITLES || m_Layer == OSD_LEVEL_TTXTSUBS)) { m_ExtentWidth = 720; m_ExtentHeight = 576; } else { @@ -449,7 +451,7 @@ void cXinelibOsd::Flush(void) return; int SendDone = 0, XOffset = 0, YOffset = 0; - if(!xc.osd_scaling && ((m_Layer==OSD_LEVEL_SUBTITLES) || (m_Layer==OSD_LEVEL_TTXTSUBS))) { + if (!xc.osd_spu_scaling && (m_Layer == OSD_LEVEL_SUBTITLES || m_Layer == OSD_LEVEL_TTXTSUBS)) { double Aspect; int W, H; m_Device->GetOsdSize(W, H, Aspect); diff --git a/setup_menu.c b/setup_menu.c index 28026229..48b599eb 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.75 2010-01-20 13:03:43 phintuka Exp $ + * $Id: setup_menu.c,v 1.76 2010-03-12 23:00:26 phintuka Exp $ * */ @@ -960,6 +960,8 @@ void cMenuSetupOSD::Set(void) new cMenuEditStraI18nItem(tr("Scaling method"), &newconfig.osd_scaling, OSD_SCALING_count, xc.s_osdScalings)); + Add(new cMenuEditBoolItem(tr("Scale subtitles"), &newconfig.osd_spu_scaling)); + Add(new cMenuEditStraI18nItem(tr("Show all layers"), &newconfig.osd_mixer, OSD_MIXER_count, xc.s_osdMixers)); @@ -1032,6 +1034,7 @@ void cMenuSetupOSD::Store(void) SetupStore("OSD.Width", xc.osd_width); SetupStore("OSD.Height", xc.osd_height); SetupStore("OSD.Scaling", xc.osd_scaling); + SetupStore("OSD.ScalingSPU", xc.osd_spu_scaling); SetupStore("OSD.HideMainMenu", xc.hide_main_menu); SetupStore("OSD.LayersVisible", xc.osd_mixer); SetupStore("OSD.Blending", xc.osd_blending); |