diff options
Diffstat (limited to 'vdr2pkt.cpp')
-rw-r--r-- | vdr2pkt.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vdr2pkt.cpp b/vdr2pkt.cpp new file mode 100644 index 0000000..1a42fd7 --- /dev/null +++ b/vdr2pkt.cpp @@ -0,0 +1,30 @@ +/* + * vdr2pkt.cpp: A plugin for the Video Disk Recorder + * + * See the README file for copyright information and how to reach the author. + * + * $Id$ + */ + +#include "vdr2pkt.h" + +cMarkAdVDR2Pkt::cMarkAdVDR2Pkt(int RecvNumber, const char *QueueName, int QueueSize) +{ + queue = new cMarkAdPaketQueue(RecvNumber,QueueName,QueueSize); +} + +cMarkAdVDR2Pkt::~cMarkAdVDR2Pkt() +{ +if (queue) delete queue; +} + +void cMarkAdVDR2Pkt::Process(MarkAdPid Pid, uchar *VDRData, int VDRSize, uchar **PktData, int *PktSize) +{ + if ((!PktData) || (!PktSize) || (!queue)) return; + *PktData=NULL; + *PktSize=0; + + if (VDRData) queue->Put(VDRData,VDRSize); + *PktData=queue->GetPacket(PktSize,MA_PACKET_PKT); + return; +} |