Mailing List archive

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

[vdr] Re: CAM Works, but I keep getting this menu...



Micael Beronius wrote:
> 
> Hi,
> 
> With resent dvbdriver and with the vdr-1.2.1, I have finally some somewhat
> working vdr, which is great!
> 
> But, after switching channels, I will end up in a mode, where the CAM menu
> saying "Viaccess Module" "No right" "OK to return to the Main menu"
> If I simply OK that, I will get a perfekt picture. (Normally, the picture
> arrives beneith the OSD, but to get rid of the OSD, I have to press OK.)
> Once this mode has been entered, I will need to restart vdr to get rid of
> these "No right" OSD's while switching channel.
> 
> Could this be a timeout issue?

The CAM menus indeed don't have a timeout, which apparently leads to
problems if such a menu pops up while there is nobody there to click
it away.

Please try the following modifications:

------- cut here -------------------------------------
--- menu.h      2003/05/24 16:35:52     1.56
+++ menu.h      2003/08/03 09:37:18
@@ -62,6 +62,7 @@
 class cMenuCam : public cOsdMenu {
 private:
   cCiMenu *ciMenu;
+  time_t lastActivity;
   bool selected;
   eOSState Select(void);
 public:
@@ -73,6 +74,7 @@
 class cMenuCamEnquiry : public cOsdMenu {
 private:
   cCiEnquiry *ciEnquiry;
+  time_t lastActivity;
   char *input;
   bool replied;
   eOSState Reply(void);
--- menu.c      2003/08/02 13:23:58     1.263
+++ menu.c      2003/08/03 09:38:37
@@ -1562,6 +1562,7 @@
   Add(new cOsdItem(ciMenu->BottomText()));
   Display();
   dsyslog("CAM: Menu - %s", ciMenu->TitleText());
+  lastActivity = time(NULL);
 }

 cMenuCam::~cMenuCam()
@@ -1590,6 +1591,10 @@
        default: break;
        }
      }
+  if (Key != kNone)
+     lastActivity = time(NULL);
+  else if (time(NULL) - lastActivity > MENUTIMEOUT)
+     state = osEnd;
   return state;
 }

@@ -1607,6 +1612,7 @@
   SetTitle(ciEnquiry->Text() ? ciEnquiry->Text() : "CAM");
   Add(new cMenuEditNumItem("Input", input, Length, ciEnquiry->Blind()));
   Display();
+  lastActivity = time(NULL);
 }

 cMenuCamEnquiry::~cMenuCamEnquiry()
@@ -1635,6 +1641,10 @@
        default: break;
        }
      }
+  if (Key != kNone)
+     lastActivity = time(NULL);
+  else if (time(NULL) - lastActivity > MENUTIMEOUT)
+     state = osEnd;
   return state;
 }
------- cut here -------------------------------------

Line numbers may be a little off, but it shouldn't be hard to do this manually.

This adds the usual menu timeout to the CAM menus.
It doesn't, however, help if a CAM menu doesn't go away when you press "Ok"
as requested by the menu. I have yet to encounter that problem here in order to
debug it. If you can still reproduce that problem, please insert some additional
debug output in cMenuCam to see what actually happens when you press "Ok".

Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index