summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-02-03 16:28:03 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-02-03 16:28:03 +0100
commitd303632efed839aa7bd7a8a743da08a75665020d (patch)
treec32c3bddd89f3d064528fa102be76c871a257ca5 /config.c
parent4041359317be487ab31e058c10c9f62ec38fbc04 (diff)
downloadvdr-d303632efed839aa7bd7a8a743da08a75665020d.tar.gz
vdr-d303632efed839aa7bd7a8a743da08a75665020d.tar.bz2
Implemented TT PID
Diffstat (limited to 'config.c')
-rw-r--r--config.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/config.c b/config.c
index 5838c68c..d4d3daf0 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.39 2001/01/14 15:29:15 kls Exp $
+ * $Id: config.c 1.40 2001/02/03 16:19:42 kls Exp $
*/
#include "config.h"
@@ -199,6 +199,7 @@ cChannel::cChannel(const cChannel *Channel)
srate = Channel ? Channel->srate : 27500;
vpid = Channel ? Channel->vpid : 255;
apid = Channel ? Channel->apid : 256;
+ tpid = Channel ? Channel->tpid : 32;
ca = Channel ? Channel->ca : 0;
pnr = Channel ? Channel->pnr : 0;
groupSep = Channel ? Channel->groupSep : false;
@@ -216,7 +217,7 @@ const char *cChannel::ToText(cChannel *Channel)
if (Channel->groupSep)
asprintf(&buffer, ":%s\n", s);
else
- asprintf(&buffer, "%s:%d:%c:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->polarization, Channel->diseqc, Channel->srate, Channel->vpid, Channel->apid, Channel->ca, Channel->pnr);
+ 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);
return buffer;
}
@@ -239,8 +240,15 @@ bool cChannel::Parse(const char *s)
}
else {
groupSep = false;
- int fields = sscanf(s, "%a[^:]:%d:%c:%d:%d:%d:%d:%d:%d", &buffer, &frequency, &polarization, &diseqc, &srate, &vpid, &apid, &ca, &pnr);
- if (fields == 9) {
+ //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);
+ if (fields >= 9) {
+ if (fields == 9) {
+ // allow reading of old format
+ pnr = ca;
+ ca = tpid;
+ tpid = 0;
+ }
strn0cpy(name, buffer, MaxChannelName);
delete buffer;
}
@@ -265,7 +273,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, ca, pnr))
+ if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid, tpid, ca, pnr))
return true;
esyslog(LOG_ERR, "retrying");
}