Project

General

Profile

Bug #918 » receiver-fix-2.diff

urig, 03/25/2012 05:23 PM

View differences:

txtrecv.c
int TPid = newLiveChannel->Tpid();
if (TPid) {
receiver = new cTxtReceiver(TPid, newLiveChannel->GetChannelID(), storeTopText, storage);
receiver = new cTxtReceiver(newLiveChannel, storeTopText, storage);
cDevice::ActualDevice()->AttachReceiver(receiver);
}
......
}
cTxtReceiver::cTxtReceiver(int TPid, tChannelID chan, bool storeTopText, Storage* storage)
: cReceiver(chan, -1, TPid), cThread("osdteletext-receiver"),
cTxtReceiver::cTxtReceiver(const cChannel* chan, bool storeTopText, Storage* storage)
#if APIVERSNUM >= 10712
: cReceiver(chan, -1), cThread("osdteletext-receiver"),
#else
: cReceiver(chan, -1, chan->Tpid()), cThread("osdteletext-receiver"),
#endif
TxtPage(0), storeTopText(storeTopText), buffer((188+60)*75), storage(storage)
{
#if APIVERSNUM >= 10712
AddPid(chan->Tpid());
#endif
storage->prepareDirectory(ChannelID());
// 10 ms timeout on getting TS frames
txtrecv.h
virtual void Receive(uchar *Data, int Length);
virtual void Action();
public:
cTxtReceiver(int TPid, tChannelID chan, bool storeTopText, Storage* storage);
cTxtReceiver(const cChannel* chan, bool storeTopText, Storage* storage);
virtual ~cTxtReceiver();
virtual void Stop();
};
(1-1/2)