Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] [PATCH 1.3.17] Add rcu, lirc, kbd options (single binary for all)
This patch adds three command switches, obsoletes a few build options and
reuses a few others. (My manpage locale-independence patch must be applied
first else you'll get one reject.)
It adds --no-kbd, --lirc and --rcu. The RC options optionally take device
names. NO_KBD and REMOTE_KBD are no longer used, and REMOTE_LIRC and
REMOTE_RCU provide the default device names.
--
| Darren Salt | nr. Ashington, | d youmustbejoking,demon,co,uk
| Debian, | Northumberland | s zap,tartarus,org
| RISC OS | Toon Army | @
| You too can roll your own kernel...
Stop that! It's silly!
diff -urNad vdr-1.3.17/Makefile /tmp/dpep.UmIpZ2/vdr-1.3.17/Makefile
--- vdr-1.3.17/Makefile 2004-12-08 17:04:40.000000000 +0000
+++ /tmp/dpep.UmIpZ2/vdr-1.3.17/Makefile 2004-12-08 17:04:40.000000000 +0000
@@ -61,11 +61,10 @@
OSDFONT_ISO8859_15 = -adobe-helvetica-medium-r-normal--23-*-100-100-p-*-iso8859-15
SMLFONT_ISO8859_15 = -adobe-helvetica-medium-r-normal--18-*-100-100-p-*-iso8859-15
-ifndef NO_KBD
-DEFINES += -DREMOTE_KBD
-endif
+REMOTE_LIRC ?= /dev/lircd
+REMOTE_RCU ?= /dev/ttyS1
-DEFINES += -DREMOTE_$(REMOTE)
+DEFINES += -DREMOTE_RCU=\"$(REMOTE_RCU)\" -DREMOTE_LIRC=\"$(REMOTE_LIRC)\"
DEFINES += -D_GNU_SOURCE
diff -urNad vdr-1.3.17/vdr.1 /tmp/dpep.UmIpZ2/vdr-1.3.17/vdr.1
--- vdr-1.3.17/vdr.1 2004-12-08 17:04:40.000000000 +0000
+++ /tmp/dpep.UmIpZ2/vdr-1.3.17/vdr.1 2004-12-08 17:04:40.000000000 +0000
@@ -46,7 +46,18 @@
(default is to read them from the video directory).
.TP
.B \-d, \-\-daemon
-Run in daemon mode.
+Run in daemon mode. (This implies \-\-no\-kbd.)
+.TP
+.B \-\-no\-kbd
+Don't use the keyboard as an input device.
+.TP
+.BI \-\-lirc [=DEVICE]
+If this option is present, vdr will use a LIRC remote control device.
+If the device name is omitted, vdr uses \fI/dev/lircd\fR.
+.TP
+.BI \-\-rcu [=DEVICE]
+If this option is present, vdr will use a serial port remote control device.
+If the device name is omitted, vdr uses \fI/dev/ttyS1\fR.
.TP
.BI \-D\ num ,\ \-\-device= num
Use only the given DVB device (\fInum\fR = 0, 1, 2...).
diff -urNad vdr-1.3.17/vdr.c /tmp/dpep.UmIpZ2/vdr-1.3.17/vdr.c
--- vdr-1.3.17/vdr.c 2004-12-08 17:04:40.000000000 +0000
+++ /tmp/dpep.UmIpZ2/vdr-1.3.17/vdr.c 2004-12-08 17:04:47.000000000 +0000
@@ -142,6 +142,8 @@
int WatchdogTimeout = DEFAULTWATCHDOG;
const char *Terminal = NULL;
const char *Shutdown = NULL;
+ const char *rcu = NULL, *lirc = NULL;
+ int kbd = 1;
cPluginManager PluginManager(DEFAULTPLUGINDIR);
int ExitCode = 0;
@@ -164,6 +166,9 @@
{ "version", no_argument, NULL, 'V' },
{ "video", required_argument, NULL, 'v' },
{ "watchdog", required_argument, NULL, 'w' },
+ { "no-kbd", no_argument, NULL, 'k'&31 },
+ { "rcu", optional_argument, NULL, 'r'&31 },
+ { "lirc", optional_argument, NULL, 'l'&31 },
{ NULL }
};
@@ -268,6 +273,15 @@
fprintf(stderr, "vdr: invalid watchdog timeout: %s\n", optarg);
return 2;
break;
+ case 'k'&31:
+ kbd = 0;
+ break;
+ case 'r'&31:
+ rcu = optarg ? : REMOTE_RCU;
+ break;
+ case 'l'&31:
+ lirc = optarg ? : REMOTE_LIRC;
+ break;
default: return 2;
}
}
@@ -312,6 +326,11 @@
" -V, --version print version information and exit\n"
" -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n"
" seconds (default: %d); '0' disables the watchdog\n"
+ " --no-kbd don't use the keyboard as an input device\n"
+ " --rcu[=PATH] use a remote control device, attached to PATH\n"
+ " (default: " REMOTE_RCU ")\n"
+ " --lirc use a LIRC remote control device, attached to PATH\n"
+ " (default: " REMOTE_LIRC ")\n"
"\n",
DEFAULTEPGDATAFILENAME,
DEFAULTPLUGINDIR,
@@ -496,15 +515,12 @@
cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()->Theme());
// Remote Controls:
-#if defined(REMOTE_RCU)
- new cRcuRemote("/dev/ttyS1");
-#elif defined(REMOTE_LIRC)
- new cLircRemote("/dev/lircd");
-#endif
-#if defined(REMOTE_KBD)
- if (!DaemonMode && HasStdin)
+ if (rcu)
+ new cRcuRemote((char*)rcu);
+ if (lirc)
+ new cLircRemote((char*)lirc);
+ if (!DaemonMode && HasStdin && kbd)
new cKbdRemote;
-#endif
Interface->LearnKeys();
// External audio:
Home |
Main Index |
Thread Index