summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-03-03 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-03-03 18:00:00 +0100
commita001a4bf97715d62b387d1da9fd1e48382508428 (patch)
tree122e77986a23e2eea92487322e4c943595fdecd7 /menu.c
parent0bad88704ba7e0346c49bb28be28e709473d9244 (diff)
downloadvdr-patch-lnbsharing-a001a4bf97715d62b387d1da9fd1e48382508428.tar.gz
vdr-patch-lnbsharing-a001a4bf97715d62b387d1da9fd1e48382508428.tar.bz2
Version 1.0.0pre3vdr-1.0.0pre3
- Fixed parsing 'E' records in epg2html.pl. - Fixed a deadlock when switching channels via Schedule/Now|Next/Switch (reported by Martin Hammerschmid). - Changed the meaning of the 'Ca' parameter in 'channels.conf'. Each channel can now define which decryption method it needs in order to be accessed. The new configuration file 'ca.conf' contains the defined values, and the default 'channels.conf' has been modifed to contain the new values for 'Premiere World' and 'ORF'. If you use the default 'channels.conf' and have the conditional access hardware to receive encrypted channels, please make sure you copy the file 'ca.conf' into your /video directory (or wherever your configuration files are located) and go into the "Setup" menu and set the CICAM values according to your hardware setup. Currently there are two possible CICAM entries per DVB card, so any card can implement up to two different conditional access modes (besides the default "Free To Air" mode, which is always assumed to be available on any DVB card). - Updated French language texts (thanks to Jean-Claude Repetto).
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c65
1 files changed, 63 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index 28e5d4d..b1e7e49 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.159 2002/02/24 12:55:49 kls Exp $
+ * $Id: menu.c 1.160 2002/03/03 16:12:29 kls Exp $
*/
#include "menu.h"
@@ -585,6 +585,60 @@ void cMenuEditStraItem::Set(void)
SetValue(strings[*value]);
}
+// --- cMenuEditCaItem -------------------------------------------------------
+
+class cMenuEditCaItem : public cMenuEditIntItem {
+private:
+ const cCaDefinition *ca;
+ bool allowCardNr;
+protected:
+ virtual void Set(void);
+public:
+ cMenuEditCaItem(const char *Name, int *Value, bool AllowCardNr = false);
+ eOSState ProcessKey(eKeys Key);
+ };
+
+cMenuEditCaItem::cMenuEditCaItem(const char *Name, int *Value, bool AllowCardNr)
+:cMenuEditIntItem(Name, Value, 0)
+{
+ ca = CaDefinitions.Get(*Value);
+ allowCardNr = AllowCardNr;
+ Set();
+}
+
+void cMenuEditCaItem::Set(void)
+{
+ if (ca)
+ SetValue(ca->Description());
+ else
+ cMenuEditIntItem::Set();
+}
+
+eOSState cMenuEditCaItem::ProcessKey(eKeys Key)
+{
+ eOSState state = cMenuEditItem::ProcessKey(Key);
+
+ if (state == osUnknown) {
+ if (NORMALKEY(Key) == kLeft) { // TODO might want to increase the delta if repeated quickly?
+ if (ca && ca->Prev()) {
+ ca = (cCaDefinition *)ca->Prev();
+ *value = ca->Number();
+ }
+ }
+ else if (NORMALKEY(Key) == kRight) {
+ if (ca && ca->Next() && (allowCardNr || ((cCaDefinition *)ca->Next())->Number() > MAXDVBAPI)) {
+ ca = (cCaDefinition *)ca->Next();
+ *value = ca->Number();
+ }
+ }
+ else
+ return cMenuEditIntItem::ProcessKey(Key);
+ Set();
+ state = osContinue;
+ }
+ return state;
+}
+
// --- cMenuEditChannel ------------------------------------------------------
class cMenuEditChannel : public cOsdMenu {
@@ -613,7 +667,7 @@ cMenuEditChannel::cMenuEditChannel(int Index)
Add(new cMenuEditIntItem( tr("Dpid1"), &data.dpid1, 0, 0x1FFF));
Add(new cMenuEditIntItem( tr("Dpid2"), &data.dpid2, 0, 0x1FFF));
Add(new cMenuEditIntItem( tr("Tpid"), &data.tpid, 0, 0x1FFF));
- Add(new cMenuEditIntItem( tr("CA"), &data.ca, 0, cDvbApi::NumDvbApis));
+ Add(new cMenuEditCaItem( tr("CA"), &data.ca, true));
Add(new cMenuEditIntItem( tr("Pnr"), &data.pnr, 0));
}
}
@@ -1880,6 +1934,13 @@ void cMenuSetup::Set(void)
Add(new cMenuEditIntItem( tr("MinUserInactivity"), &data.MinUserInactivity));
Add(new cMenuEditBoolItem(tr("MultiSpeedMode"), &data.MultiSpeedMode));
Add(new cMenuEditBoolItem(tr("ShowReplayMode"), &data.ShowReplayMode));
+ for (int d = 0; d < cDvbApi::NumDvbApis; d++) {
+ for (int i = 0; i < 2; i++) {
+ char buffer[32];
+ snprintf(buffer, sizeof(buffer), "%s%d %d", tr("CICAM DVB"), d + 1, i + 1);
+ Add(new cMenuEditCaItem(buffer, &data.CaCaps[d][i]));
+ }
+ }
}
eOSState cMenuSetup::ProcessKey(eKeys Key)