mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Fix keepalive interval
This commit is contained in:
parent
1ad0a81d16
commit
417d4ed8fc
5
tuner.c
5
tuner.c
@ -41,7 +41,7 @@ cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
|
|||||||
currentStateM(tsIdle),
|
currentStateM(tsIdle),
|
||||||
internalStateM(),
|
internalStateM(),
|
||||||
externalStateM(),
|
externalStateM(),
|
||||||
timeoutM(eMinKeepAliveIntervalMs),
|
timeoutM(eMinKeepAliveIntervalMs - eKeepAlivePreBufferMs),
|
||||||
hasLockM(false),
|
hasLockM(false),
|
||||||
signalStrengthDBmM(0.0),
|
signalStrengthDBmM(0.0),
|
||||||
signalStrengthM(-1),
|
signalStrengthM(-1),
|
||||||
@ -284,7 +284,7 @@ bool cSatipTuner::Disconnect(void)
|
|||||||
|
|
||||||
currentServerM.Detach();
|
currentServerM.Detach();
|
||||||
statusUpdateM.Set(0);
|
statusUpdateM.Set(0);
|
||||||
timeoutM = eMinKeepAliveIntervalMs;
|
timeoutM = eMinKeepAliveIntervalMs - eKeepAlivePreBufferMs;
|
||||||
pmtPidM = -1;
|
pmtPidM = -1;
|
||||||
addPidsM.Clear();
|
addPidsM.Clear();
|
||||||
delPidsM.Clear();
|
delPidsM.Clear();
|
||||||
@ -393,6 +393,7 @@ void cSatipTuner::SetSessionTimeout(const char *sessionP, int timeoutP)
|
|||||||
if (nextServerM.IsQuirk(cSatipServer::eSatipQuirkSessionId) && !isempty(*sessionM) && startswith(*sessionM, "0"))
|
if (nextServerM.IsQuirk(cSatipServer::eSatipQuirkSessionId) && !isempty(*sessionM) && startswith(*sessionM, "0"))
|
||||||
rtspM.SetSession(SkipZeroes(*sessionM));
|
rtspM.SetSession(SkipZeroes(*sessionM));
|
||||||
timeoutM = (timeoutP > eMinKeepAliveIntervalMs) ? timeoutP : eMinKeepAliveIntervalMs;
|
timeoutM = (timeoutP > eMinKeepAliveIntervalMs) ? timeoutP : eMinKeepAliveIntervalMs;
|
||||||
|
timeoutM -= eKeepAlivePreBufferMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSatipTuner::SetupTransport(int rtpPortP, int rtcpPortP, const char *streamAddrP, const char *sourceAddrP)
|
void cSatipTuner::SetupTransport(int rtpPortP, int rtcpPortP, const char *streamAddrP, const char *sourceAddrP)
|
||||||
|
1
tuner.h
1
tuner.h
@ -89,6 +89,7 @@ private:
|
|||||||
eIdleCheckTimeoutMs = 15000, // in milliseconds
|
eIdleCheckTimeoutMs = 15000, // in milliseconds
|
||||||
eTuningTimeoutMs = 20000, // in milliseconds
|
eTuningTimeoutMs = 20000, // in milliseconds
|
||||||
eMinKeepAliveIntervalMs = 30000, // in milliseconds
|
eMinKeepAliveIntervalMs = 30000, // in milliseconds
|
||||||
|
eKeepAlivePreBufferMs = 2000, // in milliseconds
|
||||||
eSetupTimeoutMs = 2000 // in milliseconds
|
eSetupTimeoutMs = 2000 // in milliseconds
|
||||||
};
|
};
|
||||||
enum eTunerState { tsIdle, tsRelease, tsSet, tsTuned, tsLocked };
|
enum eTunerState { tsIdle, tsRelease, tsSet, tsTuned, tsLocked };
|
||||||
|
Loading…
Reference in New Issue
Block a user