mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Setup parameter for VideoFormat
This commit is contained in:
parent
0af14457e0
commit
d3f255e79e
2
HISTORY
2
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).
|
||||
|
9
MANUAL
9
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
|
||||
|
||||
|
5
config.c
5
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);
|
||||
|
3
config.h
3
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);
|
||||
|
12
dvbapi.c
12
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) {
|
||||
|
6
dvbapi.h
6
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:
|
||||
|
8
i18n.c
8
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",
|
||||
|
13
menu.c
13
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;
|
||||
|
Loading…
Reference in New Issue
Block a user