summaryrefslogtreecommitdiff
path: root/remux.h
diff options
context:
space:
mode:
Diffstat (limited to 'remux.h')
-rw-r--r--remux.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/remux.h b/remux.h
index 5dd24ebd..ac627371 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 3.1 2014/01/16 10:15:50 kls Exp $
+ * $Id: remux.h 3.2 2014/01/28 11:06:37 kls Exp $
*/
#ifndef __REMUX_H
@@ -217,8 +217,11 @@ private:
int length;
int pid;
int index; // points to the next byte to process
+ int numPacketsPid; // the number of TS packets with the given PID (for statistical purposes)
+ int numPacketsOther; // the number of TS packets with other PIDs (for statistical purposes)
+ uchar SetEof(void);
protected:
- void Reset(void) { index = 0; }
+ void Reset(void);
public:
cTsPayload(void);
cTsPayload(uchar *Data, int Length, int Pid = -1);
@@ -246,6 +249,10 @@ public:
///< is counted with its full size.
bool Eof(void) const { return index >= length; }
///< Returns true if all available bytes of the TS payload have been processed.
+ void Statistics(void) const;
+ ///< May be called after a new frame has been detected, and will log a warning
+ ///< if the number of TS packets required to determine the frame type exceeded
+ ///< some safety limits.
uchar GetByte(void);
///< Gets the next byte of the TS payload, skipping any intermediate TS header data.
bool SkipBytes(int Bytes);
@@ -462,7 +469,7 @@ void PesDump(const char *Name, const u_char *Data, int Length);
// Frame detector:
-#define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 10
+#define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 100
class cFrameParser;