summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY8
-rw-r--r--channels.c28
-rw-r--r--channels.h4
-rw-r--r--device.h4
-rw-r--r--dvbdevice.c9
-rw-r--r--menu.c3
-rw-r--r--vdr.55
7 files changed, 45 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index 97805459..539a3e9c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2054,8 +2054,14 @@ Video Disk Recorder Revision History
your remote control while watching live video to start an instant recording
of the current programme and immediately start replaying that recording.
-2003-04-25: Version 1.1.29
+2003-04-26: Version 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).
diff --git a/channels.c b/channels.c
index 1e3d9c78..c68b4ee3 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())) {
diff --git a/channels.h b/channels.h
index b21ed307..c82fc282 100644
--- a/channels.h
+++ b/channels.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: channels.h 1.6 2002/11/30 12:59:05 kls Exp $
+ * $Id: channels.h 1.7 2003/04/26 09:15:40 kls Exp $
*/
#ifndef __CHANNELS_H
@@ -65,6 +65,7 @@ private:
int source;
int srate;
int vpid;
+ int ppid;
int apid1, apid2;
int dpid1, dpid2;
int tpid;
@@ -98,6 +99,7 @@ public:
int Source(void) const { return source; }
int Srate(void) const { return srate; }
int Vpid(void) const { return vpid; }
+ int Ppid(void) const { return ppid; }
int Apid1(void) const { return apid1; }
int Apid2(void) const { return apid2; }
int Dpid1(void) const { return dpid1; }
diff --git a/device.h b/device.h
index ad876ba8..8ffd4953 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 1.29 2003/01/03 15:43:48 kls Exp $
+ * $Id: device.h 1.30 2003/04/26 09:49:12 kls Exp $
*/
#ifndef __DEVICE_H
@@ -188,7 +188,7 @@ private:
bool active;
virtual void Action(void);
protected:
- enum ePidType { ptAudio, ptVideo, ptTeletext, ptDolby, ptOther };
+ enum ePidType { ptAudio, ptVideo, ptPcr, ptTeletext, ptDolby, ptOther };
class cPidHandle {
public:
int pid;
diff --git a/dvbdevice.c b/dvbdevice.c
index c25ebef4..32c5b9e6 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.54 2003/04/19 14:24:25 kls Exp $
+ * $Id: dvbdevice.c 1.55 2003/04/26 11:49:06 kls Exp $
*/
#include "dvbdevice.h"
@@ -524,8 +524,8 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9)
CHECK(ioctl(fd_video, VIDEO_SET_FORMAT, VideoFormat16_9 ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3));
}
-// ptAudio ptVideo ptTeletext ptDolby ptOther
-dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
+// ptAudio ptVideo ptPcr ptTeletext ptDolby ptOther
+dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_PCR, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER };
bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
{
@@ -662,6 +662,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
DelPid(pidHandles[ptAudio].pid);
DelPid(pidHandles[ptVideo].pid);
+ DelPid(pidHandles[ptPcr].pid);
DelPid(pidHandles[ptTeletext].pid);
DelPid(pidHandles[ptDolby].pid);
}
@@ -683,7 +684,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
if (TurnOnLivePIDs) {
aPid1 = Channel->Apid1();
aPid2 = Channel->Apid2();
- if (!(AddPid(Channel->Apid1(), ptAudio) && AddPid(Channel->Vpid(), ptVideo))) {//XXX+ dolby dpid1!!! (if audio plugins are attached)
+ if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(Channel->Apid1(), ptAudio) && AddPid(Channel->Vpid(), ptVideo))) {//XXX+ dolby dpid1!!! (if audio plugins are attached)
esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1);
return false;
}
diff --git a/menu.c b/menu.c
index 4b7136bc..17954683 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.237 2003/04/21 14:57:13 kls Exp $
+ * $Id: menu.c 1.238 2003/04/26 11:50:14 kls Exp $
*/
#include "menu.h"
@@ -575,6 +575,7 @@ void cMenuEditChannel::Setup(void)
Add(new cMenuEditSrcItem( tr("Source"), &data.source));
Add(new cMenuEditIntItem( tr("Frequency"), &data.frequency));
Add(new cMenuEditIntItem( tr("Vpid"), &data.vpid, 0, 0x1FFF));
+ Add(new cMenuEditIntItem( tr("Ppid"), &data.ppid, 0, 0x1FFF));
Add(new cMenuEditIntItem( tr("Apid1"), &data.apid1, 0, 0x1FFF));
Add(new cMenuEditIntItem( tr("Apid2"), &data.apid2, 0, 0x1FFF));
Add(new cMenuEditIntItem( tr("Dpid1"), &data.dpid1, 0, 0x1FFF));
diff --git a/vdr.5 b/vdr.5
index 4c3fa0a9..513bd5dd 100644
--- a/vdr.5
+++ b/vdr.5
@@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
-.\" $Id: vdr.5 1.17 2002/12/06 14:21:00 kls Exp $
+.\" $Id: vdr.5 1.18 2003/04/26 11:54:35 kls Exp $
.\"
.TH vdr 5 "6 Dec 2002" "1.2.0" "Video Disk Recorder Files"
.SH NAME
@@ -105,6 +105,9 @@ The symbol rate of this channel (DVB-S and DVB-C only).
.TP
.B VPID
The video PID (set to '0' for radio channels, '1' for encrypted radio channels).
+If this channel uses a separate PCR PID, it follows the VPID, separated by a
+plus sign, as in
+.B ...:164+17:...
.TP
.B APID
The audio PID (either one number, or two, separated by a comma).