diff --git a/HISTORY b/HISTORY index a62f28c1..07aa9e86 100644 --- a/HISTORY +++ b/HISTORY @@ -3430,3 +3430,5 @@ Video Disk Recorder Revision History with the larger buffer reserve (thanks to Marco Schlüßler). - Fixed the call to SetVideoFormat() in cDvbDevice::cDvbDevice() (parameter is _bool_). - Added support for setting the video display mode (thanks to Marco Schlüßler). +- The new setup option "DVB/Video display format" can be used to define which display + format to use for playing wide screen video on a 4:3 tv set. diff --git a/MANUAL b/MANUAL index a03f72cb..e95b94fa 100644 --- a/MANUAL +++ b/MANUAL @@ -588,6 +588,10 @@ Version 1.2 from the primary DVB interface, so that the viewer will be disturbed as little as possible. + Video display format = letterbox + The display format to use for playing wide screen video on + a 4:3 tv set ("pan & scan", "letterbox" or "center cut out"). + Video format = 4:3 The video format (or aspect ratio) of the tv set in use (4:3 or 16:9). diff --git a/config.c b/config.c index 900d039d..971f1671 100644 --- a/config.c +++ b/config.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.132 2005/02/05 10:43:04 kls Exp $ + * $Id: config.c 1.133 2005/02/20 12:52:59 kls Exp $ */ #include "config.h" @@ -279,6 +279,7 @@ cSetup::cSetup(void) UseVps = 0; VpsMargin = 120; RecordingDirs = 1; + VideoDisplayFormat = 1; VideoFormat = 0; UpdateChannels = 4; UseDolbyDigital = 1; @@ -435,6 +436,7 @@ bool cSetup::Parse(const char *Name, const char *Value) else if (!strcasecmp(Name, "UseVps")) UseVps = atoi(Value); else if (!strcasecmp(Name, "VpsMargin")) VpsMargin = atoi(Value); else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value); + else if (!strcasecmp(Name, "VideoDisplayFormat")) VideoDisplayFormat = atoi(Value); else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value); else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value); else if (!strcasecmp(Name, "UseDolbyDigital")) UseDolbyDigital = atoi(Value); @@ -498,6 +500,7 @@ bool cSetup::Save(void) Store("UseVps", UseVps); Store("VpsMargin", VpsMargin); Store("RecordingDirs", RecordingDirs); + Store("VideoDisplayFormat", VideoDisplayFormat); Store("VideoFormat", VideoFormat); Store("UpdateChannels", UpdateChannels); Store("UseDolbyDigital", UseDolbyDigital); diff --git a/config.h b/config.h index 07e91603..a94f9066 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.214 2005/02/19 11:35:16 kls Exp $ + * $Id: config.h 1.215 2005/02/20 12:50:37 kls Exp $ */ #ifndef __CONFIG_H @@ -237,6 +237,7 @@ public: int UseVps; int VpsMargin; int RecordingDirs; + int VideoDisplayFormat; int VideoFormat; int UpdateChannels; int UseDolbyDigital; diff --git a/device.c b/device.c index 629ad8eb..d3a0765d 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.94 2005/02/20 11:41:03 kls Exp $ + * $Id: device.c 1.95 2005/02/20 13:35:38 kls Exp $ */ #include "device.h" @@ -859,7 +859,7 @@ void cDevice::Detach(cPlayer *Player) player->device = NULL; player = NULL; SetPlayMode(pmNone); - SetVideoDisplayFormat(vdfLetterBox); + SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat)); Audios.ClearAudio(); } } diff --git a/dvbdevice.c b/dvbdevice.c index ed12c543..c2311229 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.123 2005/02/20 11:31:39 kls Exp $ + * $Id: dvbdevice.c 1.124 2005/02/20 13:35:28 kls Exp $ */ #include "dvbdevice.h" @@ -626,7 +626,7 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9) { if (HasDecoder()) { CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, VideoFormat16_9 ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3)); - SetVideoDisplayFormat(vdfLetterBox); + SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat)); } } diff --git a/i18n.c b/i18n.c index 9d7417c0..37aaf72e 100644 --- a/i18n.c +++ b/i18n.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: i18n.c 1.177 2005/02/12 10:26:51 kls Exp $ + * $Id: i18n.c 1.178 2005/02/20 13:39:33 kls Exp $ * * Translations provided by: * @@ -3094,6 +3094,90 @@ const tI18nPhrase Phrases[] = { "Esmane DVB seade", "Primær DVB enhed", }, + { "Setup.DVB$Video display format", + "Video Anzeige-Format", + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + "",//TODO + }, + { "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + "pan&scan", + }, + { "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + "letterbox", + }, + { "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + "center cut out", + }, { "Setup.DVB$Video format", "Video Format", "Video format", diff --git a/menu.c b/menu.c index a438b799..56a74b79 100644 --- a/menu.c +++ b/menu.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.340 2005/02/06 11:33:13 kls Exp $ + * $Id: menu.c 1.341 2005/02/20 13:39:49 kls Exp $ */ #include "menu.h" @@ -1915,6 +1915,7 @@ private: int originalNumAudioLanguages; int numAudioLanguages; void Setup(void); + const char *videoDisplayFormatTexts[3]; const char *updateChannelsTexts[5]; public: cMenuSetupDVB(void); @@ -1926,6 +1927,9 @@ cMenuSetupDVB::cMenuSetupDVB(void) for (numAudioLanguages = 0; numAudioLanguages < I18nNumLanguages && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++) ; originalNumAudioLanguages = numAudioLanguages; + videoDisplayFormatTexts[0] = tr("pan&scan"); + videoDisplayFormatTexts[1] = tr("letterbox"); + videoDisplayFormatTexts[2] = tr("center cut out"); updateChannelsTexts[0] = tr("no"); updateChannelsTexts[1] = tr("names only"); updateChannelsTexts[2] = tr("names and PIDs"); @@ -1943,6 +1947,7 @@ void cMenuSetupDVB::Setup(void) Clear(); Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices())); + Add(new cMenuEditStraItem(tr("Setup.DVB$Video display format"), &data.VideoDisplayFormat, 3, videoDisplayFormatTexts)); Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9")); Add(new cMenuEditBoolItem(tr("Setup.DVB$Use Dolby Digital"), &data.UseDolbyDigital)); Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 5, updateChannelsTexts)); @@ -1957,6 +1962,7 @@ void cMenuSetupDVB::Setup(void) eOSState cMenuSetupDVB::ProcessKey(eKeys Key) { int oldPrimaryDVB = ::Setup.PrimaryDVB; + int oldVideoDisplayFormat = ::Setup.VideoDisplayFormat; bool oldVideoFormat = ::Setup.VideoFormat; int oldnumAudioLanguages = numAudioLanguages; eOSState state = cMenuSetupBase::ProcessKey(Key); @@ -1984,6 +1990,8 @@ eOSState cMenuSetupDVB::ProcessKey(eKeys Key) if (state == osBack && Key == kOk) { if (::Setup.PrimaryDVB != oldPrimaryDVB) state = osSwitchDvb; + if (::Setup.VideoDisplayFormat != oldVideoDisplayFormat) + cDevice::PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat(::Setup.VideoDisplayFormat)); if (::Setup.VideoFormat != oldVideoFormat) cDevice::PrimaryDevice()->SetVideoFormat(::Setup.VideoFormat); }