[vdr] VDSB Video Data Stream Broken

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Thu Jan 5 18:17:02 CET 2006


Martin Schoenbeck wrote:
> me again,
> 
> Martin Schoenbeck schrieb:
> 
>> Hi Klaus,
>>
>> Klaus Schmidinger schrieb:
>>
>>> Since this is not set by default (and so I don't have it set here)
>>> this might be worth testing.
>>
>>
>>
>> Ok, I did it. But _you_ speak to my wife, if a recording of zero 
>> length files is created again. ;-)
> 
> 
> It didn't change anything. At least the timeout reports remain.
> 
> Martin

Please replace the cDvbTuner::Action() function with the following
version (add the lines marked with XXX), run VDR, and when it logs
timeouts please send me the log excerpt.

Klaus


void cDvbTuner::Action(void)
{
   cTimeMs Timer;
   bool LostLock = false;
   fe_status_t Status = (fe_status_t)0;
   while (Running()) {
         fe_status_t NewStatus;
         if (GetFrontendStatus(NewStatus, 10))
            Status = NewStatus;
         cMutexLock MutexLock(&mutex);
         switch (tunerStatus) {
           case tsIdle:
                break;
           case tsSet:
                dsyslog("TUNER %d: tsSet", cardIndex);//XXX
                tunerStatus = SetFrontend() ? tsTuned : tsIdle;
                Timer.Set(tuneTimeout);
                continue;
           case tsTuned:
                dsyslog("TUNER %d: tsTuned", cardIndex);//XXX
                if (Timer.TimedOut()) {
                   dsyslog("TUNER %d: tsTuned - timeout", cardIndex);//XXX
                   tunerStatus = tsSet;
                   diseqcCommands = NULL;
                   if (time(NULL) - lastTimeoutReport > 60) { // let's not get too many of these
                      esyslog("ERROR: frontend %d timed out while tuning", cardIndex);
                      lastTimeoutReport = time(NULL);
                      }
                   continue;
                   }
           case tsLocked:
                if (Status & FE_REINIT) {
                   tunerStatus = tsSet;
                   diseqcCommands = NULL;
                   esyslog("ERROR: frontend %d was reinitialized", cardIndex);
                   lastTimeoutReport = 0;
                   continue;
                   }
                else if (Status & FE_HAS_LOCK) {
                   if (tunerStatus != tsLocked) dsyslog("TUNER %d: tsLocked", cardIndex);//XXX
                   if (LostLock) {
                      esyslog("frontend %d regained lock", cardIndex);
                      LostLock = false;
                      }
                   tunerStatus = tsLocked;
                   locked.Broadcast();
                   lastTimeoutReport = 0;
                   }
                else if (tunerStatus == tsLocked) {
                   LostLock = true;
                   esyslog("ERROR: frontend %d lost lock", cardIndex);
                   tunerStatus = tsTuned;
                   Timer.Set(lockTimeout);
                   lastTimeoutReport = 0;
                   continue;
                   }
           }

         if (ciHandler)
            ciHandler->Process();
         if (tunerStatus != tsTuned)
            newSet.TimedWait(mutex, 1000);
         }
}



More information about the vdr mailing list