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),
|
isPacketDeliveredM(false),
|
||||||
isOpenDvrM(false),
|
isOpenDvrM(false),
|
||||||
deviceNameM(*cString::sprintf("%s %d", *DeviceType(), deviceIndexM)),
|
deviceNameM(*cString::sprintf("%s %d", *DeviceType(), deviceIndexM)),
|
||||||
channelM()
|
channelM(),
|
||||||
|
createdM(0),
|
||||||
|
mutexM()
|
||||||
{
|
{
|
||||||
unsigned int bufsize = (unsigned int)SATIP_BUFFER_SIZE;
|
unsigned int bufsize = (unsigned int)SATIP_BUFFER_SIZE;
|
||||||
bufsize -= (bufsize % TS_SIZE);
|
bufsize -= (bufsize % TS_SIZE);
|
||||||
@ -147,7 +149,7 @@ cString cSatipDevice::GetInformation(unsigned int pageP)
|
|||||||
bool cSatipDevice::Ready(void)
|
bool cSatipDevice::Ready(void)
|
||||||
{
|
{
|
||||||
//debug("cSatipDevice::%s(%u)", __FUNCTION__, deviceIndexM);
|
//debug("cSatipDevice::%s(%u)", __FUNCTION__, deviceIndexM);
|
||||||
return (cSatipDiscover::GetInstance()->GetServerCount() > 0);
|
return ((cSatipDiscover::GetInstance()->GetServerCount() > 0) || (createdM.Elapsed() > eReadyTimeoutMs));
|
||||||
}
|
}
|
||||||
|
|
||||||
cString cSatipDevice::DeviceType(void) const
|
cString cSatipDevice::DeviceType(void) const
|
||||||
|
4
device.h
4
device.h
@ -26,6 +26,9 @@ public:
|
|||||||
|
|
||||||
// private parts
|
// private parts
|
||||||
private:
|
private:
|
||||||
|
enum {
|
||||||
|
eReadyTimeoutMs = 2000 // in milliseconds
|
||||||
|
};
|
||||||
unsigned int deviceIndexM;
|
unsigned int deviceIndexM;
|
||||||
bool isPacketDeliveredM;
|
bool isPacketDeliveredM;
|
||||||
bool isOpenDvrM;
|
bool isOpenDvrM;
|
||||||
@ -34,6 +37,7 @@ private:
|
|||||||
cRingBufferLinear *tsBufferM;
|
cRingBufferLinear *tsBufferM;
|
||||||
cSatipTuner *pTunerM;
|
cSatipTuner *pTunerM;
|
||||||
cSatipSectionFilterHandler *pSectionFilterHandlerM;
|
cSatipSectionFilterHandler *pSectionFilterHandlerM;
|
||||||
|
cTimeMs createdM;
|
||||||
cMutex mutexM;
|
cMutex mutexM;
|
||||||
|
|
||||||
// constructor & destructor
|
// constructor & destructor
|
||||||
|
Loading…
Reference in New Issue
Block a user