summaryrefslogtreecommitdiff
path: root/remux.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-01-23 16:44:46 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-01-23 16:44:46 +0100
commit2b174b07bde731981068895a780e3e0564bb85ac (patch)
tree854680d01966886fda0c8267cfde62056b9a6c3a /remux.h
parent1ca753003b97ea3df52460165118e040ae73a080 (diff)
downloadvdr-2b174b07bde731981068895a780e3e0564bb85ac.tar.gz
vdr-2b174b07bde731981068895a780e3e0564bb85ac.tar.bz2
Changed cPatPmtGenerator to make sure the PMT pid doesn't collide with any of the actual pids of the channel
Diffstat (limited to 'remux.h')
-rw-r--r--remux.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/remux.h b/remux.h
index 6b09b713..b65da73b 100644
--- a/remux.h
+++ b/remux.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.h 2.5 2009/01/23 16:40:27 kls Exp $
+ * $Id: remux.h 2.6 2009/01/23 16:44:46 kls Exp $
*/
#ifndef __REMUX_H
@@ -153,6 +153,7 @@ private:
int pmtCounter;
int patVersion;
int pmtVersion;
+ int pmtPid;
uchar *esInfoLength;
void IncCounter(int &Counter, uchar *TsPacket);
void IncVersion(int &Version);
@@ -163,14 +164,18 @@ protected:
int MakeSubtitlingDescriptor(uchar *Target, const char *Language);
int MakeLanguageDescriptor(uchar *Target, const char *Language);
int MakeCRC(uchar *Target, const uchar *Data, int Length);
-public:
- cPatPmtGenerator(void);
+ void GeneratePmtPid(cChannel *Channel);
+ ///< Generates a PMT pid that doesn't collide with any of the actual
+ ///< pids of the Channel.
void GeneratePat(void);
///< Generates a PAT section for later use with GetPat().
- ///< This function is called by default from the constructor.
- void GeneratePmt(tChannelID ChannelID);
- ///< Generates a PMT section for the given ChannelId, for later use
+ void GeneratePmt(cChannel *Channel);
+ ///< Generates a PMT section for the given Channel, for later use
///< with GetPmt().
+public:
+ cPatPmtGenerator(cChannel *Channel = NULL);
+ void SetChannel(cChannel *Channel);
+ ///< Sets the Channel for which the PAT/PMT shall be generated.
uchar *GetPat(void);
///< Returns a pointer to the PAT section, which consists of exactly
///< one TS packet.