From d63d54a902f73e7754b6c959f5a9942143550957 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 22 Feb 2009 16:08:57 +0000 Subject: [PATCH] Live TV teletext mods --- mvpreceiver.c | 17 +++++++++++++++-- mvpreceiver.h | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/mvpreceiver.c b/mvpreceiver.c index 13ae3c8..1fce336 100755 --- a/mvpreceiver.c +++ b/mvpreceiver.c @@ -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; +} diff --git a/mvpreceiver.h b/mvpreceiver.h index 8b5d872..4bfd25f 100755 --- a/mvpreceiver.h +++ b/mvpreceiver.h @@ -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 -- 2.39.5