summaryrefslogtreecommitdiff
path: root/command/demux.h
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2011-03-25 16:07:51 +0100
committerJochen Dolze <vdr@dolze.de>2011-03-25 16:07:51 +0100
commit6adc2d76929fb8549689080c3510d3ff926ef4d2 (patch)
tree8ac6828cf73998d79662d7814ec43c209b27cbe3 /command/demux.h
parentb0c05b03c5ddf44ea4e3d2b9382dcb9e3ed902bc (diff)
downloadvdr-plugin-markad-6adc2d76929fb8549689080c3510d3ff926ef4d2.tar.gz
vdr-plugin-markad-6adc2d76929fb8549689080c3510d3ff926ef4d2.tar.bz2
Fixed TS afc error which led to "demux error"
Added more error messages and stream numbers
Diffstat (limited to 'command/demux.h')
-rw-r--r--command/demux.h39
1 files changed, 34 insertions, 5 deletions
diff --git a/command/demux.h b/command/demux.h
index 4d53a95..72dd453 100644
--- a/command/demux.h
+++ b/command/demux.h
@@ -27,6 +27,7 @@ typedef struct AvPacket
uchar *Data;
int Length;
int Type;
+ int Stream;
} AvPacket;
struct TSHDR
@@ -188,7 +189,9 @@ public:
void Clear();
int Skipped()
{
- return skipped;
+ int temp=skipped;
+ skipped=0;
+ return temp;
}
bool Put(uchar *Data, int Size);
uchar *Get(int *Size);
@@ -215,6 +218,17 @@ public:
class cTS2Pkt
{
+ enum
+ {
+ ERR_INIT=0,
+ ERR_SEQUENCE,
+ ERR_PAYLOAD,
+ ERR_HDRBIT,
+ ERR_AFCLEN,
+ ERR_DUPLICATE,
+ ERR_SYNC
+ };
+
private:
cPaketQueue *queue;
int counter;
@@ -222,15 +236,13 @@ private:
bool firstsync;
int skipped;
int pid;
+ int lasterror;
bool h264;
bool noticeFILLER;
- bool noticeSEQUENCE;
- bool noticeSTREAM;
- bool noticeTSERR;
public:
cTS2Pkt(int Pid, const char *QueueName="TS2Pkt", int QueueSize=32768, bool H264=false);
~cTS2Pkt();
- void Clear();
+ void Clear(AvPacket *Pkt=NULL);
int Skipped()
{
return skipped;
@@ -257,10 +269,19 @@ public:
class cPES2ES
{
+ enum
+ {
+ ERR_INIT,
+ ERR_LENGTH,
+ ERR_PADDING
+ };
+
private:
cPaketQueue *queue;
int skipped;
int ptype;
+ int stream;
+ int lasterror;
bool h264;
public:
cPES2ES(int PacketType, const char *QueueName="PES2ES", int QueueSize=32768);
@@ -288,10 +309,18 @@ public:
class cDemux
{
+ enum
+ {
+ ERR_INIT=0,
+ ERR_JUNK,
+ ERR_BROKEN
+ };
+
private:
int vpid,dpid,apid;
int stream_or_pid;
int skipped;
+ int lasterror;
bool h264;
bool TS;
uint64_t offset;