summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-04-27 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-04-27 18:00:00 +0200
commit0686038af36be65b666bce669957c4d94c13f409 (patch)
tree50c5bc80b5f49e0bc14b6846f1f53794c5da6f65 /channels.c
parent21a52ccb6d43cce35f7a381f55ea291195416f33 (diff)
downloadvdr-patch-lnbsharing-0686038af36be65b666bce669957c4d94c13f409.tar.gz
vdr-patch-lnbsharing-0686038af36be65b666bce669957c4d94c13f409.tar.bz2
Version 1.1.29vdr-1.1.29
- Fixed detecting broken connection to the LIRC daemon (thanks to Ludwig Nussel). - Now sending CA descriptors to the CAM in the same sequence as they were originally received (thanks to Stefan Huelswitt). - The PCR PID can now be set separately from the video PID. The syntax in the 'channels.conf' file is, for example, ...:164+17:..., where 164 is the video PID and 17 is the PCR PID. The separator is a '+' sign, not a comma or semicolon as with the audio PIDs, because this is not an alternate PID, but rather an additional, necessary PID. In order to use this feature you need a driver version dated 2003-04-27 or higher (setting the PCR PID didn't work in earlier versions). - Fixed deleting the last recording in the "Recordings" menu, which started pausing live video (thanks to Christoph Friederich for reporting this one). - Now setting the "broken link" flag for GOPs at the beginning of a new video sequence, which avoids artefacts when cutting (thanks to Stefan Huelswitt). - Removed the Mute() call from cDvbDevice::StillPicture() (suggested by Andreas Schultz). - Updated 'channels.conf.terr' for Berlin (thanks to Andreas Brachold). - Extended logging info when starting/stopping timers to show the channel number, start/stop time and the file name (suggested by Manuel Hartl). - Added a note regarding non-VDR files in the /videoX directories to INSTALL (suggested by Benjamin Harling). - Skipping keys that come in too fast from LIRC (thanks to Christian Jacobsen). - Avoiding short display of the main menu if a plugin displays its own OSD and is started through a user defined key macro (thanks to Andreas Mair for reporting this one). - Reduced the time to wait for EPG data when starting a recording to 3 seconds. - The new SVDRP command STAT can be used to request information about the disk usage (thanks to Thomas Koch). - Fixed faulty calculation of section length in eit.c (thanks to Teemu Rantanen).
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/channels.c b/channels.c
index 1e3d9c7..c68b4ee 100644
--- a/channels.c
+++ b/channels.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.c 1.11 2002/11/29 14:10:46 kls Exp $
+ * $Id: channels.c 1.12 2003/04/26 09:57:48 kls Exp $
*/
#include "channels.h"
@@ -164,6 +164,7 @@ cChannel::cChannel(void)
source = cSource::FromString("S19.2E");
srate = 27500;
vpid = 255;
+ ppid = 0;
apid1 = 256;
apid2 = 0;
dpid1 = 257;
@@ -286,8 +287,14 @@ const char *cChannel::ToText(cChannel *Channel)
asprintf(&buffer, ":%s\n", s);
}
else {
+ char vpidbuf[32];
+ char *q = vpidbuf;
+ q += snprintf(q, sizeof(vpidbuf), "%d", Channel->vpid);
+ if (Channel->ppid)
+ q += snprintf(q, sizeof(vpidbuf) - (q - vpidbuf), "+%d", Channel->ppid);
+ *q = 0;
char apidbuf[32];
- char *q = apidbuf;
+ q = apidbuf;
q += snprintf(q, sizeof(apidbuf), "%d", Channel->apid1);
if (Channel->apid2)
q += snprintf(q, sizeof(apidbuf) - (q - apidbuf), ",%d", Channel->apid2);
@@ -296,7 +303,7 @@ const char *cChannel::ToText(cChannel *Channel)
if (Channel->dpid2)
q += snprintf(q, sizeof(apidbuf) - (q - apidbuf), ",%d", Channel->dpid2);
*q = 0;
- asprintf(&buffer, "%s:%d:%s:%s:%d:%d:%s:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->ParametersToString(), cSource::ToString(Channel->source), Channel->srate, Channel->vpid, apidbuf, Channel->tpid, Channel->ca, Channel->sid, Channel->nid, Channel->tid, Channel->rid);
+ asprintf(&buffer, "%s:%d:%s:%s:%d:%s:%s:%d:%d:%d:%d:%d:%d\n", s, Channel->frequency, Channel->ParametersToString(), cSource::ToString(Channel->source), Channel->srate, vpidbuf, apidbuf, Channel->tpid, Channel->ca, Channel->sid, Channel->nid, Channel->tid, Channel->rid);
}
return buffer;
}
@@ -326,8 +333,9 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
char *namebuf = NULL;
char *sourcebuf = NULL;
char *parambuf = NULL;
+ char *vpidbuf = NULL;
char *apidbuf = NULL;
- int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%d :%a[^:]:%d :%d :%d :%d :%d :%d ", &namebuf, &frequency, &parambuf, &sourcebuf, &srate, &vpid, &apidbuf, &tpid, &ca, &sid, &nid, &tid, &rid);
+ int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%d :%d :%d :%d :%d :%d ", &namebuf, &frequency, &parambuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpid, &ca, &sid, &nid, &tid, &rid);
if (fields >= 9) {
if (fields == 9) {
// allow reading of old format
@@ -335,12 +343,19 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
ca = tpid;
tpid = 0;
}
+ vpid = ppid = 0;
apid1 = apid2 = 0;
dpid1 = dpid2 = 0;
bool ok = false;
- if (parambuf && sourcebuf && apidbuf) {
+ if (parambuf && sourcebuf && vpidbuf && apidbuf) {
ok = StringToParameters(parambuf) && (source = cSource::FromString(sourcebuf)) >= 0;
- char *p = strchr(apidbuf, ';');
+ char *p = strchr(vpidbuf, '+');
+ if (p)
+ *p++ = 0;
+ sscanf(vpidbuf, "%d", &vpid);
+ if (p)
+ sscanf(p, "%d", &ppid);
+ p = strchr(apidbuf, ';');
if (p)
*p++ = 0;
sscanf(apidbuf, "%d ,%d ", &apid1, &apid2);
@@ -350,6 +365,7 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
strn0cpy(name, namebuf, MaxChannelName);
free(parambuf);
free(sourcebuf);
+ free(vpidbuf);
free(apidbuf);
free(namebuf);
if (!AllowNonUniqueID && Channels.GetByChannelID(GetChannelID())) {