summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--ci.c11
-rw-r--r--ci.h4
-rw-r--r--menu.c4
4 files changed, 15 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index bac33f50..c6acd855 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2048,3 +2048,5 @@ Video Disk Recorder Revision History
firmware, version 2613 or higher; the -icam firmware is still limited to live
encrypted channels only. Finally we have time shift for encrypted channels on
single card systems!
+- Enhanced detection of pending user I/O from CAMs to avoid sluggish reaction
+ to remote control keypresses.
diff --git a/ci.c b/ci.c
index 31461ea2..91d9ede9 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 1.13 2003/04/19 10:59:53 kls Exp $
+ * $Id: ci.c 1.14 2003/04/20 09:52:45 kls Exp $
*/
/* XXX TODO
@@ -625,6 +625,7 @@ public:
const cCiTransportConnection *Tc(void) { return tc; }
int SessionId(void) { return sessionId; }
int ResourceId(void) { return resourceId; }
+ virtual bool HasUserIO(void) { return false; }
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
};
@@ -1009,6 +1010,7 @@ public:
cCiMMI(int SessionId, cCiTransportConnection *Tc);
virtual ~cCiMMI();
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
+ virtual bool HasUserIO(void) { return menu || enquiry; }
cCiMenu *Menu(void);
cCiEnquiry *Enquiry(void);
bool SendMenuAnswer(uint8_t Selection);
@@ -1287,6 +1289,7 @@ cCiHandler::cCiHandler(int Fd, int NumSlots)
{
numSlots = NumSlots;
newCaSupport = false;
+ hasUserIO = false;
for (int i = 0; i < MAX_CI_SESSION; i++)
sessions[i] = NULL;
tpl = new cCiTransportLayer(Fd, numSlots);
@@ -1480,10 +1483,12 @@ bool cCiHandler::Process(void)
tpl->NewConnection(Slot);
}
}
+ bool UserIO = false;
for (int i = 0; i < MAX_CI_SESSION; i++) {
- if (sessions[i])
- sessions[i]->Process();
+ if (sessions[i] && sessions[i]->Process())
+ UserIO |= sessions[i]->HasUserIO();
}
+ hasUserIO = UserIO;
if (newCaSupport)
newCaSupport = result = false; // triggers new SetCaPmt at caller!
return result;
diff --git a/ci.h b/ci.h
index 07ca411b..79ed62f3 100644
--- a/ci.h
+++ b/ci.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.h 1.6 2003/04/19 10:25:24 kls Exp $
+ * $Id: ci.h 1.7 2003/04/20 09:21:23 kls Exp $
*/
#ifndef __CI_H
@@ -81,6 +81,7 @@ private:
cMutex mutex;
int numSlots;
bool newCaSupport;
+ bool hasUserIO;
cCiSession *sessions[MAX_CI_SESSION];
cCiTransportLayer *tpl;
cCiTransportConnection *tc;
@@ -98,6 +99,7 @@ public:
static cCiHandler *CreateCiHandler(const char *FileName);
int NumSlots(void) { return numSlots; }
bool Process(void);
+ bool HasUserIO(void) { return hasUserIO; }
bool EnterMenu(int Slot);
cCiMenu *GetMenu(void);
cCiEnquiry *GetEnquiry(void);
diff --git a/menu.c b/menu.c
index e63d7077..520187d0 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 1.235 2003/04/12 09:40:48 kls Exp $
+ * $Id: menu.c 1.236 2003/04/20 09:21:36 kls Exp $
*/
#include "menu.h"
@@ -1636,7 +1636,7 @@ cOsdObject *CamControl(void)
cDevice *Device = cDevice::GetDevice(d);
if (Device) {
cCiHandler *CiHandler = Device->CiHandler();
- if (CiHandler) {
+ if (CiHandler && CiHandler->HasUserIO()) {
cCiMenu *CiMenu = CiHandler->GetMenu();
if (CiMenu)
return new cMenuCam(CiMenu);