]> git.vomp.tv Git - vompserver.git/commitdiff
Live TV teletext mods
authorChris Tallon <chris@vomp.tv>
Sun, 22 Feb 2009 16:08:57 +0000 (16:08 +0000)
committerChris Tallon <chris@vomp.tv>
Sun, 22 Feb 2009 16:08:57 +0000 (16:08 +0000)
mvpreceiver.c
mvpreceiver.h

index 13ae3c89021c153ed0b373f10e7734f84d0ba2bf..1fce336bd9d39b53f6410929d2dd6b3567b49ff0 100755 (executable)
@@ -38,9 +38,9 @@ MVPReceiver::MVPReceiver(cChannel* channel, cDevice* device)
 #if VDRVERSNUM < 10300
 : cReceiver(channel->Ca(), 0, 7, channel->Vpid(), channel->Ppid(), channel->Apid1(), channel->Apid2(), channel->Dpid1(), channel->Dpid2(), channel->Tpid())
 #elif VDRVERSNUM < 10500
-: cReceiver(channel->Ca(), 0, channel->Vpid(), channel->Apids(), channel->Dpids(), channel->Spids())
+: cReceiver(channel->Ca(), 0, channel->Vpid(), channel->Apids(), channel->Dpids(), mergeSpidsTpid(channel->Spids(),channel->Tpid()))
 #else
-: cReceiver(channel->GetChannelID(), 0, channel->Vpid(), channel->Apids(), channel->Dpids(), channel->Spids())
+: cReceiver(channel->GetChannelID(), 0, channel->Vpid(), channel->Apids(), channel->Dpids(), mergeSpidsTpid(channel->Spids(),channel->Tpid()))
 #endif
 {
   logger = Log::getInstance();
@@ -154,3 +154,16 @@ void MVPReceiver::sendStreamEnd()
   tcp->sendPacket(buffer, bufferLength);
 }
 
+
+int *MVPReceiver::mergeSpidsTpid(const int *spids,int tpid)
+{
+  int *destpids;
+  const int *runspid=spids;
+  for (runspid=spids,destpids=mergedSpidsTpid;*runspid;runspid++,destpids++) {
+       *destpids=*runspid;
+  }
+  *destpids=tpid;
+  destpids++;
+  *destpids=0;
+  return mergedSpidsTpid;
+}  
index 8b5d87293d096880ee5965ce38bab0775e72e3de..4bfd25f2b7e973b4afc6c2505cdd89cb565baa1e 100755 (executable)
@@ -62,6 +62,8 @@ class MVPReceiver : public cReceiver, public Thread
     
   protected:
     void threadMethod();
+    int *mergeSpidsTpid(const int *spids,int tpid);
+    int  mergedSpidsTpid[MAXSPIDS+2];
 };
 
 #endif