summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-07-29 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-07-29 18:00:00 +0200
commit8f9cc68f76c4fd0960f919a77fb16a6455922deb (patch)
tree83f607160a07966e97069397580acfb0d9b1be7a /config.c
parent610c5600df98b35226536ffe92b1fd231128c7d4 (diff)
downloadvdr-patch-lnbsharing-8f9cc68f76c4fd0960f919a77fb16a6455922deb.tar.gz
vdr-patch-lnbsharing-8f9cc68f76c4fd0960f919a77fb16a6455922deb.tar.bz2
Version 0.85vdr-0.85
- Added Norwegian language texts (thanks to Jørgen Tvedt). - Increased the usleep value in cDvbOsd::Cmd() to 5000 in order to work on systems with the KURT/utime-patch (thanks to Guido Fiala). - Changed the check whether the driver is loaded in runvdr to check for the 'dvb' module (the last one loaded). - Fixed repeat function with LIRC (thanks to Stefan Huelswitt). - Increased the upper limit for the symbol rate to 30000 (thanks to Ulrich Röder). - Made the position of the channel display configurable (thanks to Stefan Huelswitt). - Made the width and height of the OSD configurable (thanks to Stefan Huelswitt). - DiSEqC support can now be generally enabled/disabled in the Setup menu. This may be necessary if your multiswitch gets irritated by the default DiSEqC codes '0' (thanks to Markus Lang). - Fixed replaying in case there is no index file. - Fixed jumping to an editing mark when replay has been paused. - Avoiding unnecessary code execution in the replay progress display (thanks to Guido Fiala). - When entering time values the digits that still have to be entered are now shown as '-' (as in "1-:--"). - When setting an editing mark while the progress display is not active, the display will now be turned on for a short while to indicate the successful setting of the mark. - Updated 'channels.conf' for Premiere World (thanks to Helmut Schächner). Check your timers if you use this channels.conf file, since the sequence of several PW channels has been changed. - Changed the color of "Info" messages to "black on green" and that of the confirmation messages (like "Delete...") to "black on yellow". - Fixed display with DEBUG_OSD (it still crashes sometimes, esp. when replaying, but I can't seem to find what causes this... any ideas anybody?). - Avoiding audio/video distortions in 'Transfer Mode' by no longer actually tuning the primary interface (which can't receive this channel, anyway). Apparently the driver gets irritated when the channel is switched and a replay session is started immediately after that. - Increased timeout until reporting "video data stream broken" when recording. - Explicitly switching back to the previously active channel after ending a replay session (to have it shown correctly in case it was in 'Transfer Mode').
Diffstat (limited to 'config.c')
-rw-r--r--config.c81
1 files changed, 66 insertions, 15 deletions
diff --git a/config.c b/config.c
index acf1996..8e0cce3 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.44 2001/04/01 14:32:22 kls Exp $
+ * $Id: config.c 1.52 2001/07/27 13:45:28 kls Exp $
*/
#include "config.h"
@@ -155,7 +155,7 @@ eKeys cKeys::Get(unsigned int Code)
}
eKeys cKeys::Translate(const char *Command)
-{
+{
if (Command) {
const tKey *k = keys;
while ((k->type != kNone) && strcasecmp(k->name, Command) != 0)
@@ -166,7 +166,7 @@ eKeys cKeys::Translate(const char *Command)
}
unsigned int cKeys::Encode(const char *Command)
-{
+{
eKeys k = Translate(Command);
if (k != kNone)
return keys[k].code;
@@ -200,7 +200,10 @@ cChannel::cChannel(const cChannel *Channel)
diseqc = Channel ? Channel->diseqc : 0;
srate = Channel ? Channel->srate : 27500;
vpid = Channel ? Channel->vpid : 255;
- apid = Channel ? Channel->apid : 256;
+ apid1 = Channel ? Channel->apid1 : 256;
+ apid2 = Channel ? Channel->apid2 : 0;
+ dpid1 = Channel ? Channel->dpid1 : 257;
+ dpid2 = Channel ? Channel->dpid2 : 0;
tpid = Channel ? Channel->tpid : 32;
ca = Channel ? Channel->ca : 0;
pnr = Channel ? Channel->pnr : 0;
@@ -218,8 +221,19 @@ const char *cChannel::ToText(cChannel *Channel)
delete buffer;
if (Channel->groupSep)
asprintf(&buffer, ":%s\n", s);
- else
- asprintf(&buffer, "%s:%d:%c:%d:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->polarization, Channel->diseqc, Channel->srate, Channel->vpid, Channel->apid, Channel->tpid, Channel->ca, Channel->pnr);
+ else {
+ char apidbuf[32];
+ char *q = apidbuf;
+ q += snprintf(q, sizeof(apidbuf), "%d", Channel->apid1);
+ if (Channel->apid2)
+ q += snprintf(q, sizeof(apidbuf) - (q - apidbuf), ",%d", Channel->apid2);
+ if (Channel->dpid1 || Channel->dpid2)
+ q += snprintf(q, sizeof(apidbuf) - (q - apidbuf), ";%d", Channel->dpid1);
+ if (Channel->dpid2)
+ q += snprintf(q, sizeof(apidbuf) - (q - apidbuf), ",%d", Channel->dpid2);
+ *q = 0;
+ asprintf(&buffer, "%s:%d:%c:%d:%d:%d:%s:%d:%d:%d\n", s, Channel->frequency, Channel->polarization, Channel->diseqc, Channel->srate, Channel->vpid, apidbuf, Channel->tpid, Channel->ca, Channel->pnr);
+ }
return buffer;
}
@@ -242,8 +256,21 @@ bool cChannel::Parse(const char *s)
}
else {
groupSep = false;
- //XXX
- int fields = sscanf(s, "%a[^:]:%d:%c:%d:%d:%d:%d:%d:%d:%d", &buffer, &frequency, &polarization, &diseqc, &srate, &vpid, &apid, &tpid, &ca, &pnr);
+ char *apidbuf = NULL;
+ int fields = sscanf(s, "%a[^:]:%d:%c:%d:%d:%d:%a[^:]:%d:%d:%d", &buffer, &frequency, &polarization, &diseqc, &srate, &vpid, &apidbuf, &tpid, &ca, &pnr);
+ apid1 = apid2 = 0;
+ dpid1 = dpid2 = 0;
+ if (apidbuf) {
+ char *p = strchr(apidbuf, ';');
+ if (p)
+ *p++ = 0;
+ sscanf(apidbuf, "%d,%d", &apid1, &apid2);
+ if (p)
+ sscanf(p, "%d,%d", &dpid1, &dpid2);
+ delete apidbuf;
+ }
+ else
+ return false;
if (fields >= 9) {
if (fields == 9) {
// allow reading of old format
@@ -275,7 +302,7 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
isyslog(LOG_INFO, "switching to channel %d", number);
}
for (int i = 3; i--;) {
- if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid, tpid, ca, pnr))
+ if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr))
return true;
esyslog(LOG_ERR, "retrying");
}
@@ -305,8 +332,8 @@ cTimer::cTimer(bool Instant)
if (stop >= 2400)
stop -= 2400;
//TODO VPS???
- priority = DEFAULTPRIORITY;
- lifetime = DEFAULTLIFETIME;
+ priority = Setup.DefaultPriority;
+ lifetime = Setup.DefaultLifetime;
*file = 0;
summary = NULL;
if (Instant && ch)
@@ -330,8 +357,8 @@ cTimer::cTimer(const cEventInfo *EventInfo)
stop = time->tm_hour * 100 + time->tm_min;
if (stop >= 2400)
stop -= 2400;
- priority = DEFAULTPRIORITY;
- lifetime = DEFAULTLIFETIME;
+ priority = Setup.DefaultPriority;
+ lifetime = Setup.DefaultLifetime;
*file = 0;
const char *Title = EventInfo->GetTitle();
if (!isempty(Title))
@@ -524,14 +551,14 @@ bool cTimer::Matches(time_t t)
}
time_t cTimer::StartTime(void)
-{
+{
if (!startTime)
Matches();
return startTime;
}
time_t cTimer::StopTime(void)
-{
+{
if (!stopTime)
Matches();
return stopTime;
@@ -734,14 +761,22 @@ cSetup::cSetup(void)
ShowInfoOnChSwitch = 1;
MenuScrollPage = 1;
MarkInstantRecord = 1;
+ LnbSLOF = 11700;
LnbFrequLo = 9750;
LnbFrequHi = 10600;
+ DiSEqC = 1;
SetSystemTime = 0;
MarginStart = 2;
MarginStop = 10;
EPGScanTimeout = 5;
SVDRPTimeout = 300;
PrimaryLimit = 0;
+ DefaultPriority = 50;
+ DefaultLifetime = 50;
+ VideoFormat = VIDEO_FORMAT_4_3;
+ ChannelInfoPos = 0;
+ OSDwidth = 52;
+ OSDheight = 18;
CurrentChannel = -1;
}
@@ -756,14 +791,22 @@ bool cSetup::Parse(char *s)
else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value);
else if (!strcasecmp(Name, "MenuScrollPage")) MenuScrollPage = atoi(Value);
else if (!strcasecmp(Name, "MarkInstantRecord")) MarkInstantRecord = atoi(Value);
+ else if (!strcasecmp(Name, "LnbSLOF")) LnbSLOF = atoi(Value);
else if (!strcasecmp(Name, "LnbFrequLo")) LnbFrequLo = atoi(Value);
else if (!strcasecmp(Name, "LnbFrequHi")) LnbFrequHi = atoi(Value);
+ else if (!strcasecmp(Name, "DiSEqC")) DiSEqC = atoi(Value);
else if (!strcasecmp(Name, "SetSystemTime")) SetSystemTime = atoi(Value);
else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
else if (!strcasecmp(Name, "EPGScanTimeout")) EPGScanTimeout = atoi(Value);
else if (!strcasecmp(Name, "SVDRPTimeout")) SVDRPTimeout = atoi(Value);
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, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
+ else if (!strcasecmp(Name, "OSDwidth")) OSDwidth = atoi(Value);
+ else if (!strcasecmp(Name, "OSDheight")) OSDheight = atoi(Value);
else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
else
return false;
@@ -813,14 +856,22 @@ bool cSetup::Save(const char *FileName)
fprintf(f, "ShowInfoOnChSwitch = %d\n", ShowInfoOnChSwitch);
fprintf(f, "MenuScrollPage = %d\n", MenuScrollPage);
fprintf(f, "MarkInstantRecord = %d\n", MarkInstantRecord);
+ fprintf(f, "LnbSLOF = %d\n", LnbSLOF);
fprintf(f, "LnbFrequLo = %d\n", LnbFrequLo);
fprintf(f, "LnbFrequHi = %d\n", LnbFrequHi);
+ fprintf(f, "DiSEqC = %d\n", DiSEqC);
fprintf(f, "SetSystemTime = %d\n", SetSystemTime);
fprintf(f, "MarginStart = %d\n", MarginStart);
fprintf(f, "MarginStop = %d\n", MarginStop);
fprintf(f, "EPGScanTimeout = %d\n", EPGScanTimeout);
fprintf(f, "SVDRPTimeout = %d\n", SVDRPTimeout);
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, "ChannelInfoPos = %d\n", ChannelInfoPos);
+ fprintf(f, "OSDwidth = %d\n", OSDwidth);
+ fprintf(f, "OSDheight = %d\n", OSDheight);
fprintf(f, "CurrentChannel = %d\n", CurrentChannel);
f.Close();
isyslog(LOG_INFO, "saved setup to %s", FileName);