summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--MANUAL9
-rw-r--r--config.c5
-rw-r--r--config.h3
-rw-r--r--dvbapi.c12
-rw-r--r--dvbapi.h6
-rw-r--r--i18n.c8
-rw-r--r--menu.c13
8 files changed, 49 insertions, 9 deletions
diff --git a/HISTORY b/HISTORY
index 96ac6539..60ea8165 100644
--- a/HISTORY
+++ b/HISTORY
@@ -531,3 +531,5 @@ Video Disk Recorder Revision History
- The compile time switch VFAT has been fixed to recognize the ':' character
in recording names, too.
- Setting all PIDs to 0x1FFF before switching channel.
+- New setup parameter "VideoFormat" to define the aspect ratio of the tv set
+ in use (4:3 or 16:9).
diff --git a/MANUAL b/MANUAL
index 06686f14..8d605526 100644
--- a/MANUAL
+++ b/MANUAL
@@ -355,6 +355,15 @@ Video Disk Recorder User's Manual
never keep the user from viewing stuff on the primary
interface. On systems with only one DVB card, timers
with a priority below PrimaryLimit will never execute.
+
+ DefaultPriority = 50 The default Priority and Lifetime values used when
+ DefaultLifetime = 50 creating a new timer event. A Lifetime value of 99
+ means that this recording will never be deleted
+ automatically.
+
+ VideoFormat = 0 The video format (or aspect ratio) of the tv set in use.
+ 0 = 4:3
+ 1 = 16:9
* Executing system commands
diff --git a/config.c b/config.c
index bd3d83bf..b8c2d9f8 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.46 2001/06/02 13:57:25 kls Exp $
+ * $Id: config.c 1.47 2001/06/16 14:06:56 kls Exp $
*/
#include "config.h"
@@ -756,6 +756,7 @@ cSetup::cSetup(void)
PrimaryLimit = 0;
DefaultPriority = 50;
DefaultLifetime = 50;
+ VideoFormat = VIDEO_FORMAT_4_3;
CurrentChannel = -1;
}
@@ -781,6 +782,7 @@ bool cSetup::Parse(char *s)
else if (!strcasecmp(Name, "PrimaryLimit")) PrimaryLimit = atoi(Value);
else if (!strcasecmp(Name, "DefaultPriority")) DefaultPriority = atoi(Value);
else if (!strcasecmp(Name, "DefaultLifetime")) DefaultLifetime = atoi(Value);
+ else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
else
return false;
@@ -841,6 +843,7 @@ bool cSetup::Save(const char *FileName)
fprintf(f, "PrimaryLimit = %d\n", PrimaryLimit);
fprintf(f, "DefaultPriority = %d\n", DefaultPriority);
fprintf(f, "DefaultLifetime = %d\n", DefaultLifetime);
+ fprintf(f, "VideoFormat = %d\n", VideoFormat);
fprintf(f, "CurrentChannel = %d\n", CurrentChannel);
f.Close();
isyslog(LOG_INFO, "saved setup to %s", FileName);
diff --git a/config.h b/config.h
index b532cb63..1d81106a 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.48 2001/06/14 08:20:34 kls Exp $
+ * $Id: config.h 1.49 2001/06/16 14:05:58 kls Exp $
*/
#ifndef __CONFIG_H
@@ -275,6 +275,7 @@ public:
int SVDRPTimeout;
int PrimaryLimit;
int DefaultPriority, DefaultLifetime;
+ int VideoFormat;
int CurrentChannel;
cSetup(void);
bool Load(const char *FileName);
diff --git a/dvbapi.c b/dvbapi.c
index 453b2b12..ec0c8f63 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.76 2001/06/16 11:36:40 kls Exp $
+ * $Id: dvbapi.c 1.77 2001/06/16 14:23:28 kls Exp $
*/
#include "dvbapi.h"
@@ -1375,6 +1375,10 @@ cDvbApi::cDvbApi(int n)
fd_dvr = -1;
+ // Video format:
+
+ SetVideoFormat(Setup.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
+
// We only check the devices that must be present - the others will be checked before accessing them:
if (((fd_qpskfe >= 0 && fd_sec >= 0) || fd_qamfe >= 0) && fd_demuxv >= 0 && fd_demuxa1 >= 0 && fd_demuxa2 >= 0 && fd_demuxt >= 0) {
@@ -2027,6 +2031,12 @@ void cDvbApi::SetModeNormal(bool FromRecording)
}
}
+void cDvbApi::SetVideoFormat(videoFormat_t Format)
+{
+ if (fd_video)
+ CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, Format));
+}
+
bool cDvbApi::SetPid(int fd, dmxPesType_t PesType, dvb_pid_t Pid, dmxOutput_t Output)
{
if (Pid == 0) {
diff --git a/dvbapi.h b/dvbapi.h
index 02211eab..48579f3f 100644
--- a/dvbapi.h
+++ b/dvbapi.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.h 1.38 2001/06/14 14:54:25 kls Exp $
+ * $Id: dvbapi.h 1.39 2001/06/16 14:21:16 kls Exp $
*/
#ifndef __DVBAPI_H
@@ -173,6 +173,10 @@ public:
void Text(int x, int y, const char *s, eDvbColor colorFg = clrWhite, eDvbColor colorBg = clrBackground);
void Flush(void);
+ // Video format facilities:
+
+ void SetVideoFormat(videoFormat_t Format);
+
// Channel facilities
private:
diff --git a/i18n.c b/i18n.c
index 02fc7ceb..ad87ec7b 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.18 2001/06/03 12:57:21 kls Exp $
+ * $Id: i18n.c 1.19 2001/06/16 14:27:10 kls Exp $
*
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
@@ -530,6 +530,12 @@ const tPhrase Phrases[] = {
"", // TODO
"", // TODO
},
+ { "VideoFormat",
+ "Video Format",
+ "", // TODO
+ "", // TODO
+ "", // TODO
+ },
// The days of the week:
{ "MTWTFSS",
"MDMDFSS",
diff --git a/menu.c b/menu.c
index 78539237..06d50c83 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.73 2001/06/14 14:55:16 kls Exp $
+ * $Id: menu.c 1.74 2001/06/16 14:23:02 kls Exp $
*/
#include "menu.h"
@@ -118,21 +118,24 @@ eOSState cMenuEditIntItem::ProcessKey(eKeys Key)
class cMenuEditBoolItem : public cMenuEditIntItem {
protected:
+ const char *falseString, *trueString;
virtual void Set(void);
public:
- cMenuEditBoolItem(const char *Name, int *Value);
+ cMenuEditBoolItem(const char *Name, int *Value, const char *FalseString = NULL, const char *TrueString = NULL);
};
-cMenuEditBoolItem::cMenuEditBoolItem(const char *Name, int *Value)
+cMenuEditBoolItem::cMenuEditBoolItem(const char *Name, int *Value, const char *FalseString, const char *TrueString)
:cMenuEditIntItem(Name, Value, 0, 1)
{
+ falseString = FalseString ? FalseString : tr("no");
+ trueString = TrueString ? TrueString : tr("yes");
Set();
}
void cMenuEditBoolItem::Set(void)
{
char buf[16];
- snprintf(buf, sizeof(buf), "%s", *value ? tr("yes") : tr("no"));
+ snprintf(buf, sizeof(buf), "%s", *value ? trueString : falseString);
SetValue(buf);
}
@@ -1620,6 +1623,7 @@ void cMenuSetup::Set(void)
Add(new cMenuEditIntItem( tr("PrimaryLimit"), &data.PrimaryLimit, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("DefaultPriority"), &data.DefaultPriority, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("DefaultLifetime"), &data.DefaultLifetime, 0, MAXLIFETIME));
+ Add(new cMenuEditBoolItem(tr("VideoFormat"), &data.VideoFormat, "4:3", "16:9"));
}
eOSState cMenuSetup::ProcessKey(eKeys Key)
@@ -1630,6 +1634,7 @@ eOSState cMenuSetup::ProcessKey(eKeys Key)
switch (Key) {
case kOk: state = (Setup.PrimaryDVB != data.PrimaryDVB) ? osSwitchDvb : osEnd;
cDvbApi::PrimaryDvbApi->SetUseTSTime(data.SetSystemTime);
+ cDvbApi::PrimaryDvbApi->SetVideoFormat(data.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
Setup = data;
Setup.Save();
break;