1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Implemented setup option "DVB/Video display format"

This commit is contained in:
Klaus Schmidinger 2005-02-20 13:39:49 +01:00
parent 51f41252cf
commit e8bd7c2369
8 changed files with 110 additions and 8 deletions

View File

@ -3430,3 +3430,5 @@ Video Disk Recorder Revision History
with the larger buffer reserve (thanks to Marco Schlüßler). with the larger buffer reserve (thanks to Marco Schlüßler).
- Fixed the call to SetVideoFormat() in cDvbDevice::cDvbDevice() (parameter is _bool_). - Fixed the call to SetVideoFormat() in cDvbDevice::cDvbDevice() (parameter is _bool_).
- Added support for setting the video display mode (thanks to Marco Schlüßler). - 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.

4
MANUAL
View File

@ -588,6 +588,10 @@ Version 1.2
from the primary DVB interface, so that the viewer will from the primary DVB interface, so that the viewer will
be disturbed as little as possible. 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 Video format = 4:3 The video format (or aspect ratio) of the tv set in use
(4:3 or 16:9). (4:3 or 16:9).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "config.h"
@ -279,6 +279,7 @@ cSetup::cSetup(void)
UseVps = 0; UseVps = 0;
VpsMargin = 120; VpsMargin = 120;
RecordingDirs = 1; RecordingDirs = 1;
VideoDisplayFormat = 1;
VideoFormat = 0; VideoFormat = 0;
UpdateChannels = 4; UpdateChannels = 4;
UseDolbyDigital = 1; 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, "UseVps")) UseVps = atoi(Value);
else if (!strcasecmp(Name, "VpsMargin")) VpsMargin = atoi(Value); else if (!strcasecmp(Name, "VpsMargin")) VpsMargin = atoi(Value);
else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = 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, "VideoFormat")) VideoFormat = atoi(Value);
else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value); else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value);
else if (!strcasecmp(Name, "UseDolbyDigital")) UseDolbyDigital = atoi(Value); else if (!strcasecmp(Name, "UseDolbyDigital")) UseDolbyDigital = atoi(Value);
@ -498,6 +500,7 @@ bool cSetup::Save(void)
Store("UseVps", UseVps); Store("UseVps", UseVps);
Store("VpsMargin", VpsMargin); Store("VpsMargin", VpsMargin);
Store("RecordingDirs", RecordingDirs); Store("RecordingDirs", RecordingDirs);
Store("VideoDisplayFormat", VideoDisplayFormat);
Store("VideoFormat", VideoFormat); Store("VideoFormat", VideoFormat);
Store("UpdateChannels", UpdateChannels); Store("UpdateChannels", UpdateChannels);
Store("UseDolbyDigital", UseDolbyDigital); Store("UseDolbyDigital", UseDolbyDigital);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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 #ifndef __CONFIG_H
@ -237,6 +237,7 @@ public:
int UseVps; int UseVps;
int VpsMargin; int VpsMargin;
int RecordingDirs; int RecordingDirs;
int VideoDisplayFormat;
int VideoFormat; int VideoFormat;
int UpdateChannels; int UpdateChannels;
int UseDolbyDigital; int UseDolbyDigital;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "device.h"
@ -859,7 +859,7 @@ void cDevice::Detach(cPlayer *Player)
player->device = NULL; player->device = NULL;
player = NULL; player = NULL;
SetPlayMode(pmNone); SetPlayMode(pmNone);
SetVideoDisplayFormat(vdfLetterBox); SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat));
Audios.ClearAudio(); Audios.ClearAudio();
} }
} }

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "dvbdevice.h"
@ -626,7 +626,7 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9)
{ {
if (HasDecoder()) { if (HasDecoder()) {
CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, VideoFormat16_9 ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3)); CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, VideoFormat16_9 ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3));
SetVideoDisplayFormat(vdfLetterBox); SetVideoDisplayFormat(eVideoDisplayFormat(Setup.VideoDisplayFormat));
} }
} }

86
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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: * Translations provided by:
* *
@ -3094,6 +3094,90 @@ const tI18nPhrase Phrases[] = {
"Esmane DVB seade", "Esmane DVB seade",
"Primær DVB enhed", "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", { "Setup.DVB$Video format",
"Video Format", "Video Format",
"Video format", "Video format",

10
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "menu.h"
@ -1915,6 +1915,7 @@ private:
int originalNumAudioLanguages; int originalNumAudioLanguages;
int numAudioLanguages; int numAudioLanguages;
void Setup(void); void Setup(void);
const char *videoDisplayFormatTexts[3];
const char *updateChannelsTexts[5]; const char *updateChannelsTexts[5];
public: public:
cMenuSetupDVB(void); cMenuSetupDVB(void);
@ -1926,6 +1927,9 @@ cMenuSetupDVB::cMenuSetupDVB(void)
for (numAudioLanguages = 0; numAudioLanguages < I18nNumLanguages && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++) for (numAudioLanguages = 0; numAudioLanguages < I18nNumLanguages && data.AudioLanguages[numAudioLanguages] >= 0; numAudioLanguages++)
; ;
originalNumAudioLanguages = numAudioLanguages; originalNumAudioLanguages = numAudioLanguages;
videoDisplayFormatTexts[0] = tr("pan&scan");
videoDisplayFormatTexts[1] = tr("letterbox");
videoDisplayFormatTexts[2] = tr("center cut out");
updateChannelsTexts[0] = tr("no"); updateChannelsTexts[0] = tr("no");
updateChannelsTexts[1] = tr("names only"); updateChannelsTexts[1] = tr("names only");
updateChannelsTexts[2] = tr("names and PIDs"); updateChannelsTexts[2] = tr("names and PIDs");
@ -1943,6 +1947,7 @@ void cMenuSetupDVB::Setup(void)
Clear(); Clear();
Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices())); 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$Video format"), &data.VideoFormat, "4:3", "16:9"));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Use Dolby Digital"), &data.UseDolbyDigital)); Add(new cMenuEditBoolItem(tr("Setup.DVB$Use Dolby Digital"), &data.UseDolbyDigital));
Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"), &data.UpdateChannels, 5, updateChannelsTexts)); 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) eOSState cMenuSetupDVB::ProcessKey(eKeys Key)
{ {
int oldPrimaryDVB = ::Setup.PrimaryDVB; int oldPrimaryDVB = ::Setup.PrimaryDVB;
int oldVideoDisplayFormat = ::Setup.VideoDisplayFormat;
bool oldVideoFormat = ::Setup.VideoFormat; bool oldVideoFormat = ::Setup.VideoFormat;
int oldnumAudioLanguages = numAudioLanguages; int oldnumAudioLanguages = numAudioLanguages;
eOSState state = cMenuSetupBase::ProcessKey(Key); eOSState state = cMenuSetupBase::ProcessKey(Key);
@ -1984,6 +1990,8 @@ eOSState cMenuSetupDVB::ProcessKey(eKeys Key)
if (state == osBack && Key == kOk) { if (state == osBack && Key == kOk) {
if (::Setup.PrimaryDVB != oldPrimaryDVB) if (::Setup.PrimaryDVB != oldPrimaryDVB)
state = osSwitchDvb; state = osSwitchDvb;
if (::Setup.VideoDisplayFormat != oldVideoDisplayFormat)
cDevice::PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat(::Setup.VideoDisplayFormat));
if (::Setup.VideoFormat != oldVideoFormat) if (::Setup.VideoFormat != oldVideoFormat)
cDevice::PrimaryDevice()->SetVideoFormat(::Setup.VideoFormat); cDevice::PrimaryDevice()->SetVideoFormat(::Setup.VideoFormat);
} }