From c1b01bdc61b275bfab721620be131ee441703aeb Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 25 Dec 2009 15:26:16 +0100 Subject: [PATCH] cDevice::AddPid() now stores the stream type of the given pid --- CONTRIBUTORS | 1 + HISTORY | 4 +++- device.c | 5 +++-- device.h | 7 ++++--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 214e40ce..a70cec8a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1361,6 +1361,7 @@ Andreas Regel for fixing handling numeric keys in the channel display after switching channel groups for adding some missing 'const' statements to cBitmap + for making cDevice::AddPid() store the stream type of the given pid Thomas Bergwinkl for fixing the validity check for channel IDs, because some providers use TIDs diff --git a/HISTORY b/HISTORY index 6b8a7945..3d424bbe 100644 --- a/HISTORY +++ b/HISTORY @@ -6197,7 +6197,7 @@ Video Disk Recorder Revision History - Fixed the default value for "Pause key handling" in the MANUAL (reported by Diego Pierotto). -2009-12-24: Version 1.7.11 +2009-12-25: Version 1.7.11 - Fixed resetting the file size when regenerating the index file. - The new function cDevice::PatPmtParser() can be used in derived devices to access @@ -6230,3 +6230,5 @@ Video Disk Recorder Revision History - cPatFilter::Process() now only stores CA descriptors for video and audio pids (thanks to Francesco Saverio Schiavarelli for reporting a problem with channels that have some encrypted components that VDR doesn't use). +- cDevice::AddPid() now stores the stream type of the given pid (thanks to Andreas + Regel). diff --git a/device.c b/device.c index c015271f..527946ee 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.28 2009/12/24 11:13:53 kls Exp $ + * $Id: device.c 2.29 2009/12/25 15:24:02 kls Exp $ */ #include "device.h" @@ -413,7 +413,7 @@ bool cDevice::HasPid(int Pid) const return false; } -bool cDevice::AddPid(int Pid, ePidType PidType) +bool cDevice::AddPid(int Pid, ePidType PidType, int StreamType) { if (Pid || PidType == ptPcr) { int n = -1; @@ -460,6 +460,7 @@ bool cDevice::AddPid(int Pid, ePidType PidType) } if (n >= 0) { pidHandles[n].pid = Pid; + pidHandles[n].streamType = StreamType; pidHandles[n].used = 1; PRINTPIDS("C"); if (!SetPid(&pidHandles[n], n, true)) { diff --git a/device.h b/device.h index b6aef6e5..f1b63488 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 2.17 2009/12/04 15:03:16 kls Exp $ + * $Id: device.h 2.18 2009/12/25 15:09:18 kls Exp $ */ #ifndef __DEVICE_H @@ -277,14 +277,15 @@ protected: class cPidHandle { public: int pid; + int streamType; int handle; int used; - cPidHandle(void) { pid = used = 0; handle = -1; } + cPidHandle(void) { pid = streamType = used = 0; handle = -1; } }; cPidHandle pidHandles[MAXPIDHANDLES]; bool HasPid(int Pid) const; ///< Returns true if this device is currently receiving the given PID. - bool AddPid(int Pid, ePidType PidType = ptOther); + bool AddPid(int Pid, ePidType PidType = ptOther, int StreamType = 0); ///< Adds a PID to the set of PIDs this device shall receive. void DelPid(int Pid, ePidType PidType = ptOther); ///< Deletes a PID from the set of PIDs this device shall receive.