mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Enhanced detection of pending user I/O from CAMs
This commit is contained in:
parent
5573a03fdc
commit
6bdfa4638d
2
HISTORY
2
HISTORY
@ -2048,3 +2048,5 @@ Video Disk Recorder Revision History
|
|||||||
firmware, version 2613 or higher; the -icam firmware is still limited to live
|
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
|
encrypted channels only. Finally we have time shift for encrypted channels on
|
||||||
single card systems!
|
single card systems!
|
||||||
|
- Enhanced detection of pending user I/O from CAMs to avoid sluggish reaction
|
||||||
|
to remote control keypresses.
|
||||||
|
11
ci.c
11
ci.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
/* XXX TODO
|
||||||
@ -625,6 +625,7 @@ public:
|
|||||||
const cCiTransportConnection *Tc(void) { return tc; }
|
const cCiTransportConnection *Tc(void) { return tc; }
|
||||||
int SessionId(void) { return sessionId; }
|
int SessionId(void) { return sessionId; }
|
||||||
int ResourceId(void) { return resourceId; }
|
int ResourceId(void) { return resourceId; }
|
||||||
|
virtual bool HasUserIO(void) { return false; }
|
||||||
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
|
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1009,6 +1010,7 @@ public:
|
|||||||
cCiMMI(int SessionId, cCiTransportConnection *Tc);
|
cCiMMI(int SessionId, cCiTransportConnection *Tc);
|
||||||
virtual ~cCiMMI();
|
virtual ~cCiMMI();
|
||||||
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
|
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
|
||||||
|
virtual bool HasUserIO(void) { return menu || enquiry; }
|
||||||
cCiMenu *Menu(void);
|
cCiMenu *Menu(void);
|
||||||
cCiEnquiry *Enquiry(void);
|
cCiEnquiry *Enquiry(void);
|
||||||
bool SendMenuAnswer(uint8_t Selection);
|
bool SendMenuAnswer(uint8_t Selection);
|
||||||
@ -1287,6 +1289,7 @@ cCiHandler::cCiHandler(int Fd, int NumSlots)
|
|||||||
{
|
{
|
||||||
numSlots = NumSlots;
|
numSlots = NumSlots;
|
||||||
newCaSupport = false;
|
newCaSupport = false;
|
||||||
|
hasUserIO = false;
|
||||||
for (int i = 0; i < MAX_CI_SESSION; i++)
|
for (int i = 0; i < MAX_CI_SESSION; i++)
|
||||||
sessions[i] = NULL;
|
sessions[i] = NULL;
|
||||||
tpl = new cCiTransportLayer(Fd, numSlots);
|
tpl = new cCiTransportLayer(Fd, numSlots);
|
||||||
@ -1480,10 +1483,12 @@ bool cCiHandler::Process(void)
|
|||||||
tpl->NewConnection(Slot);
|
tpl->NewConnection(Slot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool UserIO = false;
|
||||||
for (int i = 0; i < MAX_CI_SESSION; i++) {
|
for (int i = 0; i < MAX_CI_SESSION; i++) {
|
||||||
if (sessions[i])
|
if (sessions[i] && sessions[i]->Process())
|
||||||
sessions[i]->Process();
|
UserIO |= sessions[i]->HasUserIO();
|
||||||
}
|
}
|
||||||
|
hasUserIO = UserIO;
|
||||||
if (newCaSupport)
|
if (newCaSupport)
|
||||||
newCaSupport = result = false; // triggers new SetCaPmt at caller!
|
newCaSupport = result = false; // triggers new SetCaPmt at caller!
|
||||||
return result;
|
return result;
|
||||||
|
4
ci.h
4
ci.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __CI_H
|
||||||
@ -81,6 +81,7 @@ private:
|
|||||||
cMutex mutex;
|
cMutex mutex;
|
||||||
int numSlots;
|
int numSlots;
|
||||||
bool newCaSupport;
|
bool newCaSupport;
|
||||||
|
bool hasUserIO;
|
||||||
cCiSession *sessions[MAX_CI_SESSION];
|
cCiSession *sessions[MAX_CI_SESSION];
|
||||||
cCiTransportLayer *tpl;
|
cCiTransportLayer *tpl;
|
||||||
cCiTransportConnection *tc;
|
cCiTransportConnection *tc;
|
||||||
@ -98,6 +99,7 @@ public:
|
|||||||
static cCiHandler *CreateCiHandler(const char *FileName);
|
static cCiHandler *CreateCiHandler(const char *FileName);
|
||||||
int NumSlots(void) { return numSlots; }
|
int NumSlots(void) { return numSlots; }
|
||||||
bool Process(void);
|
bool Process(void);
|
||||||
|
bool HasUserIO(void) { return hasUserIO; }
|
||||||
bool EnterMenu(int Slot);
|
bool EnterMenu(int Slot);
|
||||||
cCiMenu *GetMenu(void);
|
cCiMenu *GetMenu(void);
|
||||||
cCiEnquiry *GetEnquiry(void);
|
cCiEnquiry *GetEnquiry(void);
|
||||||
|
4
menu.c
4
menu.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "menu.h"
|
||||||
@ -1636,7 +1636,7 @@ cOsdObject *CamControl(void)
|
|||||||
cDevice *Device = cDevice::GetDevice(d);
|
cDevice *Device = cDevice::GetDevice(d);
|
||||||
if (Device) {
|
if (Device) {
|
||||||
cCiHandler *CiHandler = Device->CiHandler();
|
cCiHandler *CiHandler = Device->CiHandler();
|
||||||
if (CiHandler) {
|
if (CiHandler && CiHandler->HasUserIO()) {
|
||||||
cCiMenu *CiMenu = CiHandler->GetMenu();
|
cCiMenu *CiMenu = CiHandler->GetMenu();
|
||||||
if (CiMenu)
|
if (CiMenu)
|
||||||
return new cMenuCam(CiMenu);
|
return new cMenuCam(CiMenu);
|
||||||
|
Loading…
Reference in New Issue
Block a user