diff options
-rw-r--r-- | config.c | 6 | ||||
-rw-r--r-- | config.h | 7 | ||||
-rw-r--r-- | frontend.c | 5 | ||||
-rw-r--r-- | i18n.c | 42 | ||||
-rw-r--r-- | setup_menu.c | 14 | ||||
-rw-r--r-- | xine_input_vdr.c | 12 |
6 files changed, 78 insertions, 8 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.39 2007-06-11 19:18:41 phintuka Exp $ + * $Id: config.c,v 1.40 2007-06-12 19:28:37 phintuka Exp $ * */ @@ -82,6 +82,8 @@ const char *config_t::s_speakerArrangements[] = "Surround 6.1", "Surround 7.1", "Pass Through", NULL}; +const char *config_t::s_subtitleSizes[] = {"default", "tiny", "small", "medium", "large", "very large", "huge", NULL }; + const char *config_t::s_subExts[] = {".sub", ".srt", ".txt", ".ssa", ".SUB", ".SRT", ".TXT", ".SSA", NULL}; @@ -318,6 +320,7 @@ config_t::config_t() { strn0cpy(spu_lang[2], "de", sizeof(spu_lang[2])); strn0cpy(spu_lang[1], "fi", sizeof(spu_lang[1])); //strn0cpy(spu_lang[3], "" , sizeof(spu_lang[3])); + extsub_size = -1; alpha_correction = 0; alpha_correction_abs = 0; @@ -540,6 +543,7 @@ bool config_t::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name, "OSD.SpuLang1")) STRN0CPY(spu_lang[1], Value); else if (!strcasecmp(Name, "OSD.SpuLang2")) STRN0CPY(spu_lang[2], Value); else if (!strcasecmp(Name, "OSD.SpuLang3")) STRN0CPY(spu_lang[3], Value); + else if (!strcasecmp(Name, "OSD.ExtSubSize")) extsub_size = atoi(Value); else if (!strcasecmp(Name, "RemoteMode")) remote_mode = atoi(Value); else if (!strcasecmp(Name, "Remote.ListenPort")) listen_port = 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.26 2007-06-11 19:20:34 phintuka Exp $ + * $Id: config.h,v 1.27 2007-06-12 19:28:37 phintuka Exp $ * */ @@ -123,6 +123,8 @@ #define SPEAKERS_A52_PASSTHRU 12 #define SPEAKERS_count 13 +#define SUBTITLESIZE_count 7 + #define HIDDEN_OPTION(opt) \ (xc.IsOptionHidden(xc.opt)) #define READONLY_OPTION(opt) \ @@ -160,7 +162,7 @@ class config_t { static const char *s_audioVisualizations[]; static const char *s_audioVisualizationNames[]; static const char *s_speakerArrangements[]; - + static const char *s_subtitleSizes[]; static const char *s_subExts[]; public: @@ -215,6 +217,7 @@ class config_t { int unscaled_osd_lowresvideo; 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 } */ // Media player int spu_autoshow; // Preferred SPU language(s) for media player @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend.c,v 1.35 2007-03-28 06:52:09 phintuka Exp $ + * $Id: frontend.c,v 1.36 2007-06-12 19:28:37 phintuka Exp $ * */ @@ -690,6 +690,9 @@ bool cXinelibThread::PlayFile(const char *FileName, int Position, free(m_FileName); m_FileName = NULL; Unlock(); + } else { + if(xc.extsub_size >= 0) + Xine_Control("EXTSUBSIZE", xc.extsub_size); } return (!GetStopSignal()) && (result==0); @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: i18n.c,v 1.22 2007-06-11 21:23:18 phintuka Exp $ + * $Id: i18n.c,v 1.23 2007-06-12 19:28:37 phintuka Exp $ * * Translations provided by: * @@ -685,6 +685,26 @@ const tI18nPhrase Phrases[] = { "", // Croatian }, { + "very large", // English + "", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "erittäin suuri", // Suomi + "", // Polski + "", // Español + "", // Ellinika + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Catala + "", // Russian + "", // Croatian + }, + { "huge", // English "Riesig", // Deutsch "", // Slovenski @@ -2830,6 +2850,26 @@ const tI18nPhrase Phrases[] = { "", // Croatian }, { + "External subtitle size", // English + "Untertitel größe", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Portugu<EA>s + "", // Fran<E7>ais + "", // Norsk + "Erillisen tekstityksen koko", // Suomi + "", // Polski + "", // Espa<F1>ol + "", // Ellinika + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Catala + "", // Russian + "", // Croatian + }, + { "Aspect ratio", // English "Seitenverhältnis", // Deutsch "", // Slovenski diff --git a/setup_menu.c b/setup_menu.c index e2e34d37..4692010c 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.32 2007-06-12 18:55:50 phintuka Exp $ + * $Id: setup_menu.c,v 1.33 2007-06-12 19:28:37 phintuka Exp $ * */ @@ -801,6 +801,7 @@ cMenuSetupOSD::cMenuSetupOSD(void) memcpy(&newconfig, &xc, sizeof(config_t)); orig_alpha_correction = xc.alpha_correction; orig_alpha_correction_abs = xc.alpha_correction_abs; + newconfig.extsub_size++; Set(); } @@ -872,6 +873,9 @@ void cMenuSetupOSD::Set(void) newconfig.spu_lang[3], 4, LangNameChars)); } + Add(new cMenuEditStraI18nItem(tr("External subtitle size"), + &newconfig.extsub_size, SUBTITLESIZE_count, xc.s_subtitleSizes)); + if(current<1) current=1; /* first item is not selectable */ SetCurrent(Get(current)); //SetCurrent(Get(1)); @@ -915,8 +919,13 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key) void cMenuSetupOSD::Store(void) { - memcpy(&xc, &newconfig, sizeof(config_t)); + newconfig.extsub_size --; + if(newconfig.extsub_size != xc.extsub_size) { + cString tmp = cString::sprintf("EXTSUBSIZE %d", newconfig.extsub_size); + cXinelibDevice::Instance().PlayFileCtrl(tmp); + } + memcpy(&xc, &newconfig, sizeof(config_t)); orig_alpha_correction = xc.alpha_correction; orig_alpha_correction_abs = xc.alpha_correction_abs; @@ -929,6 +938,7 @@ void cMenuSetupOSD::Store(void) SetupStore("OSD.AlphaCorrection", xc.alpha_correction); SetupStore("OSD.AlphaCorrectionAbs", xc.alpha_correction_abs); + SetupStore("OSD.ExtSubSize", xc.extsub_size); SetupStore("OSD.SpuAutoSelect", xc.spu_autoshow); SetupStore("OSD.SpuLang0", xc.spu_lang[0]); SetupStore("OSD.SpuLang1", xc.spu_lang[1]); diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 42adaee0..d455b50e 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.85 2007-06-09 15:24:44 phintuka Exp $ + * $Id: xine_input_vdr.c,v 1.86 2007-06-12 19:28:37 phintuka Exp $ * */ @@ -3683,6 +3683,16 @@ static int vdr_plugin_parse_control(input_plugin_t *this_gen, const char *cmd) err = CONTROL_PARAM_ERROR; } + } else if(!strncasecmp(cmd, "EXTSUBSIZE ", 11)) { + int size = 0; + if(1 == sscanf(cmd, "EXTSUBSIZE %d", &size)) + /* size of separate subtitles : + -1 = xine default + 0...6 = { tiny small normal large very large huge } */ + stream->xine->config->update_num(stream->xine->config, "subtitles.separate.subtitle_size", size); + else + err = CONTROL_PARAM_ERROR; + } else if(!strncasecmp(cmd, "GRAB ", 5)) { handle_control_grab(this, cmd); |