Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Latest status of FE_HAS_LOCK problem?



Klaus Schmidinger wrote:
> There have been several suggested modifications to VDR's
> cDvbTuner::Action() in order to avoid problems with the driver
> returning a very short FE_HAS_LOCK status. Since I have been
> very busy doing buffer optimizations for the past several
> weeks, I'm afraid I don't know what the current status of these
> things is.
>
> Since there has been a fix in the driver to avoid these short
> FE_HAS_LOCK status spikes, maybe there is no more change necessary
> in VDR?

My system did not get those spikes, but quite often distorsions in 
audio and/or video after a channel switch. Sometimes it was neccesary 
to restart vdr with reloaded drivers.

The changes I made in cDvbTuner seems to workaround the problem. Some 
times ago you posted the attached patch for the section handler on 
this list. With this patch included, there are no other changes 
necessary to solve my zapping problems.

Stefan


--- sections.h  2004/01/11 13:18:38     1.3
+++ sections.h  2004/08/08 13:44:17
@@ -27,7 +27,7 @@
   cDevice *device;
   bool active;
   int statusCount;
-  bool on;
+  bool on, waitForLock;
   time_t lastIncompleteSection;
   cList<cFilter> filters;
   cList<cFilterHandle> filterHandles;
--- sections.c  2004/07/17 14:26:32     1.7
+++ sections.c  2004/08/08 13:59:08
@@ -46,6 +46,7 @@
   active = false;
   statusCount = 0;
   on = false;
+  waitForLock = false;
   lastIncompleteSection = 0;
   Start();
 }
@@ -145,13 +146,18 @@
 {
   Lock();
   if (on != On) {
-     statusCount++;
-     for (cFilter *fi = filters.First(); fi; fi = filters.Next(fi)) {
-         fi->SetStatus(false);
-         if (On)
-            fi->SetStatus(true);
-         }
-     on = On;
+     if (!On || device->HasLock()) {
+        statusCount++;
+        for (cFilter *fi = filters.First(); fi; fi = filters.Next(fi)) {
+            fi->SetStatus(false);
+            if (On)
+               fi->SetStatus(true);
+            }
+        on = On;
+        waitForLock = false;
+        }
+     else
+        waitForLock = On;
      }
   Unlock();
 }
@@ -162,6 +168,8 @@
   while (active) {

         Lock();
+        if (waitForLock)
+           SetStatus(true);
         int NumFilters = filterHandles.Count();
         pollfd pfd[NumFilters];
         for (cFilterHandle *fh = filterHandles.First(); fh; fh = filterHandles.Next(fh)) {


Home | Main Index | Thread Index