mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Optimized the startup delay.
This commit is contained in:
parent
b5ec84fd91
commit
9a6ae40954
6
device.c
6
device.c
@ -19,7 +19,9 @@ cSatipDevice::cSatipDevice(unsigned int indexP)
|
||||
isPacketDeliveredM(false),
|
||||
isOpenDvrM(false),
|
||||
deviceNameM(*cString::sprintf("%s %d", *DeviceType(), deviceIndexM)),
|
||||
channelM()
|
||||
channelM(),
|
||||
createdM(0),
|
||||
mutexM()
|
||||
{
|
||||
unsigned int bufsize = (unsigned int)SATIP_BUFFER_SIZE;
|
||||
bufsize -= (bufsize % TS_SIZE);
|
||||
@ -147,7 +149,7 @@ cString cSatipDevice::GetInformation(unsigned int pageP)
|
||||
bool cSatipDevice::Ready(void)
|
||||
{
|
||||
//debug("cSatipDevice::%s(%u)", __FUNCTION__, deviceIndexM);
|
||||
return (cSatipDiscover::GetInstance()->GetServerCount() > 0);
|
||||
return ((cSatipDiscover::GetInstance()->GetServerCount() > 0) || (createdM.Elapsed() > eReadyTimeoutMs));
|
||||
}
|
||||
|
||||
cString cSatipDevice::DeviceType(void) const
|
||||
|
4
device.h
4
device.h
@ -26,6 +26,9 @@ public:
|
||||
|
||||
// private parts
|
||||
private:
|
||||
enum {
|
||||
eReadyTimeoutMs = 2000 // in milliseconds
|
||||
};
|
||||
unsigned int deviceIndexM;
|
||||
bool isPacketDeliveredM;
|
||||
bool isOpenDvrM;
|
||||
@ -34,6 +37,7 @@ private:
|
||||
cRingBufferLinear *tsBufferM;
|
||||
cSatipTuner *pTunerM;
|
||||
cSatipSectionFilterHandler *pSectionFilterHandlerM;
|
||||
cTimeMs createdM;
|
||||
cMutex mutexM;
|
||||
|
||||
// constructor & destructor
|
||||
|
Loading…
Reference in New Issue
Block a user