summaryrefslogtreecommitdiff
path: root/command/vdr2pkt.cpp
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-03-30 18:49:58 +0200
committerJochen Dolze <vdr@dolze.de>2010-03-30 18:49:58 +0200
commit74cdd9ffa1d0e5f74942051e7e22e07542929c03 (patch)
treee59472547b1ed3543b8e2d1d0e2a7c52fcb24c04 /command/vdr2pkt.cpp
parent6446f24dce1b30fa341b7de078ca4385d1378457 (diff)
downloadvdr-plugin-markad-74cdd9ffa1d0e5f74942051e7e22e07542929c03.tar.gz
vdr-plugin-markad-74cdd9ffa1d0e5f74942051e7e22e07542929c03.tar.bz2
Changed directory structure, added Makefiles
Diffstat (limited to 'command/vdr2pkt.cpp')
-rw-r--r--command/vdr2pkt.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/command/vdr2pkt.cpp b/command/vdr2pkt.cpp
new file mode 100644
index 0000000..8d5a18f
--- /dev/null
+++ b/command/vdr2pkt.cpp
@@ -0,0 +1,30 @@
+/*
+ * vdr2pkt.cpp: A program for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+#include "vdr2pkt.h"
+
+cMarkAdVDR2Pkt::cMarkAdVDR2Pkt(const char *QueueName, int QueueSize)
+{
+ queue = new cMarkAdPaketQueue(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 (!Pid.Type) return;
+
+ if (VDRData) queue->Put(VDRData,VDRSize);
+ *PktData=queue->GetPacket(PktSize,MA_PACKET_PKT);
+ return;
+}