summaryrefslogtreecommitdiff
path: root/command/demux.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2011-04-11 22:33:16 +0200
committerJochen Dolze <vdr@dolze.de>2011-04-11 22:33:16 +0200
commitafc27021e3c8542f7a966ea732e30212b786b923 (patch)
tree32646ba3cf306c79b4410d7c43e2af3adda27ec7 /command/demux.cpp
parent0b6cc044f9f44af88d8f115204cdae0b7dddd23c (diff)
downloadvdr-plugin-markad-afc27021e3c8542f7a966ea732e30212b786b923.tar.gz
vdr-plugin-markad-afc27021e3c8542f7a966ea732e30212b786b923.tar.bz2
Sorting of logo list added
New MTV3 logo Changed demuxer to return raw packets
Diffstat (limited to 'command/demux.cpp')
-rw-r--r--command/demux.cpp45
1 files changed, 42 insertions, 3 deletions
diff --git a/command/demux.cpp b/command/demux.cpp
index 1b89895..6593fbf 100644
--- a/command/demux.cpp
+++ b/command/demux.cpp
@@ -899,8 +899,9 @@ bool cPES2ES::Process(uchar *PESData, int PESSize, AvPacket *ESPkt)
// ----------------------------------------------------------------------------
-cDemux::cDemux(int VPid, int DPid, int APid, bool H264, bool VDRCount)
+cDemux::cDemux(int VPid, int DPid, int APid, bool H264, bool VDRCount, bool RAW)
{
+ raw=RAW;
TS=false;
if ((VPid>0) || (DPid>0) || (APid>0)) TS=true;
@@ -1235,7 +1236,25 @@ int cDemux::Process(uchar *Data, int Count, AvPacket *pkt)
pkt->Length=0;
bool add=needmoredata();
-
+ if ((raw) && (!Data) && (!Count))
+ {
+ uchar Dummy[6];
+ if (TS)
+ {
+ }
+ else
+ {
+ Dummy[0]=0;
+ Dummy[1]=0;
+ Dummy[2]=1;
+ Dummy[3]=0xbd;
+ Dummy[4]=0;
+ Dummy[5]=0;
+ }
+ Data=Dummy;
+ Count=6;
+ add=true; // last packet!
+ }
int bplen=0,readout=0;
uchar *bpkt=NULL;
if (add)
@@ -1247,7 +1266,27 @@ int cDemux::Process(uchar *Data, int Count, AvPacket *pkt)
bpkt=queue->Get(&bplen);
if (!bpkt) return -1;
last_bplen=bplen;
- if (vdrcount) vdraddpatpmt(bpkt,bplen);
+ if ((vdrcount) && (TS)) vdraddpatpmt(bpkt,bplen);
+ }
+
+ if (raw)
+ {
+ if (bpkt)
+ {
+ pkt->Data=bpkt;
+ pkt->Length=bplen;
+ pkt->Stream=stream_or_pid;
+ if (TS)
+ {
+ pkt->Type=PACKET_TS;
+ }
+ else
+ {
+ pkt->Type=PACKET_PES;
+ }
+ }
+ stream_or_pid=0;
+ return add ? readout : 0;
}
if (!TS)