cDevice::AddPid() now stores the stream type of the given pid

This commit is contained in:
Klaus Schmidinger 2009-12-25 15:26:16 +01:00
parent 3124c7598e
commit c1b01bdc61
4 changed files with 11 additions and 6 deletions

View File

@ -1361,6 +1361,7 @@ Andreas Regel <andreas.regel@gmx.de>
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 <Thomas.Bergwinkl@vr-web.de>
for fixing the validity check for channel IDs, because some providers use TIDs

View File

@ -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).

View File

@ -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)) {

View File

@ -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.