summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-01-30 11:10:25 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-01-30 11:10:25 +0100
commit08899602322175a6cb080951c2ad0dcbf71446fa (patch)
tree4d8d72ed157813e1a1b159ed5c57f8d875a926b1 /device.c
parenta9543347afe9ea7fd031a36e97ef56ba036c1515 (diff)
downloadvdr-08899602322175a6cb080951c2ad0dcbf71446fa.tar.gz
vdr-08899602322175a6cb080951c2ad0dcbf71446fa.tar.bz2
The PCR pid is now recorded for channels where this is different from the video PID
Diffstat (limited to 'device.c')
-rw-r--r--device.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/device.c b/device.c
index 3228af20..cb31b834 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.31 2010/01/01 15:40:35 kls Exp $
+ * $Id: device.c 2.32 2010/01/30 11:06:51 kls Exp $
*/
#include "device.h"
@@ -30,8 +30,8 @@ public:
};
cLiveSubtitle::cLiveSubtitle(int SPid)
-:cReceiver(tChannelID(), -1, SPid)
{
+ AddPid(SPid);
}
cLiveSubtitle::~cLiveSubtitle()
@@ -676,7 +676,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
if (Device && CanReplay()) {
cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
if (Device->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()!
- cControl::Launch(new cTransferControl(Device, Channel->GetChannelID(), Channel->Vpid(), Channel->Apids(), Channel->Dpids(), Channel->Spids()));
+ cControl::Launch(new cTransferControl(Device, Channel));
else
Result = scrNoTransfer;
}
@@ -1364,10 +1364,10 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
esyslog("ERROR: skipped %d bytes to sync on start of TS packet", Skipped);
return Played + Skipped;
}
+ int Pid = TsPid(Data);
if (TsHasPayload(Data)) { // silently ignore TS packets w/o payload
int PayloadOffset = TsPayloadOffset(Data);
if (PayloadOffset < TS_SIZE) {
- int Pid = TsPid(Data);
if (Pid == 0)
patPmtParser.ParsePat(Data, TS_SIZE);
else if (Pid == patPmtParser.PmtPid())
@@ -1396,6 +1396,13 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly)
}
}
}
+ else if (Pid == patPmtParser.Ppid()) {
+ int w = PlayTsVideo(Data, TS_SIZE);
+ if (w < 0)
+ return Played ? Played : w;
+ if (w == 0)
+ break;
+ }
Played += TS_SIZE;
Length -= TS_SIZE;
Data += TS_SIZE;