mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 13:37:42 +02:00
Get rid of OPTIONS while retuning.
This commit is contained in:
parent
1244397365
commit
3a16e57f87
23
tuner.c
23
tuner.c
@ -88,8 +88,10 @@ void cSatipTuner::Action(void)
|
|||||||
// Do the thread loop
|
// Do the thread loop
|
||||||
while (Running()) {
|
while (Running()) {
|
||||||
mutexM.Lock();
|
mutexM.Lock();
|
||||||
if (StateRequested())
|
if (StateRequested()) {
|
||||||
|
debug("cSatipTuner::%s(): switching from %s to %s [device %d]", __FUNCTION__, TunerStateString(currentStateM), TunerStateString(nextStateM), deviceIdM);
|
||||||
currentStateM = nextStateM;
|
currentStateM = nextStateM;
|
||||||
|
}
|
||||||
mutexM.Unlock();
|
mutexM.Unlock();
|
||||||
switch (currentStateM) {
|
switch (currentStateM) {
|
||||||
case tsIdle:
|
case tsIdle:
|
||||||
@ -189,16 +191,19 @@ bool cSatipTuner::Connect(void)
|
|||||||
// Just retune
|
// Just retune
|
||||||
if (streamIdM >= 0) {
|
if (streamIdM >= 0) {
|
||||||
debug("cSatipTuner::%s(): retune [device %d]", __FUNCTION__, deviceIdM);
|
debug("cSatipTuner::%s(): retune [device %d]", __FUNCTION__, deviceIdM);
|
||||||
KeepAlive(true);
|
if (rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port())) {
|
||||||
|
keepAliveM.Set(timeoutM);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (rtspM.Options(*connectionUri)) {
|
||||||
// Flush any old content
|
// Flush any old content
|
||||||
rtpM.Flush();
|
rtpM.Flush();
|
||||||
return rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port());
|
rtcpM.Flush();
|
||||||
}
|
|
||||||
keepAliveM.Set(timeoutM);
|
|
||||||
if (rtspM.Options(*connectionUri)) {
|
|
||||||
if (nextServerM && nextServerM->Quirk(cSatipServer::eSatipQuirkSessionId))
|
if (nextServerM && nextServerM->Quirk(cSatipServer::eSatipQuirkSessionId))
|
||||||
rtspM.SetSession(SkipZeroes(*sessionM));
|
rtspM.SetSession(SkipZeroes(*sessionM));
|
||||||
if (rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port())) {
|
if (rtspM.Setup(*uri, rtpM.Port(), rtcpM.Port())) {
|
||||||
|
keepAliveM.Set(timeoutM);
|
||||||
if (nextServerM) {
|
if (nextServerM) {
|
||||||
cSatipDiscover::GetInstance()->UseServer(nextServerM, true);
|
cSatipDiscover::GetInstance()->UseServer(nextServerM, true);
|
||||||
currentServerM = nextServerM;
|
currentServerM = nextServerM;
|
||||||
@ -223,8 +228,8 @@ bool cSatipTuner::Disconnect(void)
|
|||||||
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
|
cString uri = cString::sprintf("rtsp://%s/stream=%d", *streamAddrM, streamIdM);
|
||||||
rtspM.Teardown(*uri);
|
rtspM.Teardown(*uri);
|
||||||
}
|
}
|
||||||
currentStateM = tsIdle;
|
//currentStateM = tsIdle;
|
||||||
nextStateM = tsIdle;
|
//nextStateM = tsIdle;
|
||||||
|
|
||||||
// Reset signal parameters
|
// Reset signal parameters
|
||||||
hasLockM = false;
|
hasLockM = false;
|
||||||
@ -450,7 +455,7 @@ bool cSatipTuner::StateRequested(void)
|
|||||||
bool cSatipTuner::RequestState(eTunerState stateP)
|
bool cSatipTuner::RequestState(eTunerState stateP)
|
||||||
{
|
{
|
||||||
cMutexLock MutexLock(&mutexM);
|
cMutexLock MutexLock(&mutexM);
|
||||||
debug("cSatipTuner::%s(%s) %s <> %s [device %d]", __FUNCTION__, TunerStateString(stateP), TunerStateString(currentStateM), TunerStateString(nextStateM), deviceIdM);
|
debug("cSatipTuner::%s(%s) current=%s next=%s [device %d]", __FUNCTION__, TunerStateString(stateP), TunerStateString(currentStateM), TunerStateString(nextStateM), deviceIdM);
|
||||||
|
|
||||||
// validate legal state changes
|
// validate legal state changes
|
||||||
switch (currentStateM) {
|
switch (currentStateM) {
|
||||||
|
Loading…
Reference in New Issue
Block a user