vdr/vdr-plugin-remote CONTRIBUTORS FAQ HISTORY i18n.c Makefile README remote.c remote.h ttystatus.c ttystatus.h
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 07 Nov 2004 20:23:24 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote
In directory haydn:/tmp/cvs-serv15009/vdr/vdr-plugin-remote
Modified Files:
CONTRIBUTORS FAQ HISTORY i18n.c Makefile README remote.c
remote.h ttystatus.c ttystatus.h
Log Message:
* now imported new upstream (0.3.2) by hand, again :(
Index: HISTORY
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/HISTORY,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- HISTORY 9 Oct 2004 16:11:14 -0000 1.1
+++ HISTORY 7 Nov 2004 20:23:22 -0000 1.2
@@ -64,3 +64,10 @@
- Fixed high cpu usage while waiting for a tcp connection
(thanks to Frank Krömmelbein for reporting this one).
Replaced delay_ms by usleep, because delay_ms does busy-waiting.
+
+
+2004-11-07: Version 0.3.2
+- Fixed to compile with vdr 1.3.7+
+- LIRC remote control fixed (thanks to Mike Gratsas).
+- OSD emulation: minor improvements.
+- Added Finnish language texts (thanks to Ville Skyttä).
Index: FAQ
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/FAQ,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- FAQ 9 Oct 2004 16:11:14 -0000 1.1
+++ FAQ 7 Nov 2004 20:23:22 -0000 1.2
@@ -131,5 +131,5 @@
The keybdev driver is no longer optional. All keyboards use this driver.
Fortunately, there is a new ioctl to grab an input device in 2.6.x.
Patch the remote plugin using
- http://endriss.escape.bei.t-online.de/vdr/misc/remote-0.2.0_kernel-2.6_grab_device.diff
+ http://www.escape-edv.de/endriss/vdr/misc/remote-0.2.0_kernel-2.6_grab_device.diff
and recompile the plugin.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
Index: i18n.c
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/i18n.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- i18n.c 9 Oct 2004 16:11:14 -0000 1.1
+++ i18n.c 7 Nov 2004 20:23:22 -0000 1.2
@@ -43,7 +43,7 @@
"",
"",
"",
- "",
+ "Kaukosäädin",
"",
"",
"",
@@ -64,7 +64,7 @@
"",
"",
"",
- "",
+ "Paina mitä tahansa näppäintä käyttääksesi oletusnäppäinkarttaa",
"",
"",
"",
@@ -85,7 +85,7 @@
"",
"",
"",
- "",
+ "Käytetään käyttäjän määrittelemää näppäinkarttaa",
"",
"",
"",
@@ -107,7 +107,7 @@
"",
"",
"",
- "",
+ "Kaukosäädintesti - paina ja pidä alhaalla jotain kaukosäätimen näppäintä",
"",
"",
"",
@@ -128,7 +128,7 @@
"",
"",
"",
- "",
+ "RC5-yhteyskäytäntö tunnistettu",
"",
"",
"",
@@ -149,7 +149,7 @@
"",
"",
"",
- "",
+ "RC5-yhteyskäytäntö tunnistettu (käänteinen signaali)",
"",
"",
"",
@@ -170,7 +170,7 @@
"",
"",
"",
- "",
+ "RCMM-yhteyskäytäntö tunnistettu",
"",
"",
"",
@@ -191,7 +191,7 @@
"",
"",
"",
- "",
+ "RCMM-yhteyskäytäntö tunnistettu (käänteinen signaali)",
"",
"",
"",
@@ -212,7 +212,7 @@
"",
"",
"",
- "",
+ "Kaukosäädintä ei tunnistettu",
"",
"",
"",
@@ -233,7 +233,7 @@
"",
"",
"",
- "",
+ "Näppäinkartan lataaminen epäonnistui",
"",
"",
"",
@@ -254,7 +254,7 @@
"",
"",
"",
- "",
+ "%s: %s",
"",
"",
"",
Index: ttystatus.c
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/ttystatus.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ttystatus.c 9 Oct 2004 16:11:14 -0000 1.1
+++ ttystatus.c 7 Nov 2004 20:23:22 -0000 1.2
@@ -184,7 +184,6 @@
set_color(WHITE_BLACK);
refresh();
set_pos(2, 0);
- memset (lineBuf, 0, numEntries * sizeof(char *));
}
@@ -209,30 +208,22 @@
void cTtyStatus::OsdHelpKeys(const char *Red, const char *Green,
const char *Yellow, const char *Blue)
{
- if (Red)
- {
- set_color(BLACK_RED);
- set_pos(24,0);
- print(" %-15s", Red);
- }
- if (Green)
- {
- set_color(BLACK_GREEN);
- set_pos(24,20);
- print(" %-15s", Green);
- }
- if (Yellow)
- {
- set_color(BLACK_YELLOW);
- set_pos(24,40);
- print(" %-15s", Yellow);
- }
- if (Blue)
- {
- set_color(WHITE_BLUE);
- set_pos(24,60);
- print(" %-15s", Blue);
- }
+ set_color(Red ? BLACK_RED : WHITE_BLACK);
+ set_pos(24,0);
+ print(" %-15s", Red ? Red : "");
+
+ set_color(Green ? BLACK_GREEN: WHITE_BLACK);
+ set_pos(24,20);
+ print(" %-15s", Green ? Green : "");
+
+ set_color(Yellow ? BLACK_YELLOW : WHITE_BLACK);
+ set_pos(24,40);
+ print(" %-15s", Yellow ? Yellow : "");
+
+ set_color(Blue ? WHITE_BLUE : WHITE_BLACK);
+ set_pos(24,60);
+ print(" %-15s", Blue ? Blue : "");
+
refresh();
set_pos(2, 0);
}
@@ -246,7 +237,7 @@
{
int oldNumEntries = numEntries;
numEntries = Index + 100;
- lineBuf = (const char **) realloc((void *)lineBuf, numEntries * sizeof(char *));
+ lineBuf = (char **) realloc((void *)lineBuf, numEntries * sizeof(char *));
if (lineBuf == NULL)
{
numEntries = 0;
@@ -258,7 +249,9 @@
if (Text && 0 <= Index && Index < numEntries)
{
- lineBuf[Index] = Text;
+ if (lineBuf[Index] != NULL)
+ free(lineBuf[Index]);
+ lineBuf[Index] = strdup(Text);
lastIndex = Index;
}
}
@@ -289,7 +282,9 @@
else
{
// not found, item changed
- lineBuf[currIndex] = Text;
+ if (lineBuf[currIndex] != NULL)
+ free(lineBuf[currIndex]);
+ lineBuf[currIndex] = strdup(Text);
}
first = min(currIndex-10,lastIndex-20);
@@ -397,4 +392,13 @@
cTtyStatus::~cTtyStatus(void)
{
+ if (lineBuf && numEntries > 0)
+ {
+ for (int i = 0; i < numEntries; i++)
+ {
+ if (lineBuf[i])
+ free(lineBuf[i]);
+ }
+ free(lineBuf);
+ }
}
Index: README
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- README 9 Oct 2004 16:11:14 -0000 1.1
+++ README 7 Nov 2004 20:23:22 -0000 1.2
@@ -1,11 +1,11 @@
remote - Remote Control plugin for the Video Disk Recorder (VDR)
================================================================
-Version: 0.3.1
+Version: 0.3.2
Written by: Oliver Endriss <o.endriss@gmx.de>
-Latest version available at: http://endriss.escape.bei.t-online.de/vdr
+Latest version available at: http://www.escape-edv.de/endriss/vdr
Requirements: VDR 1.1.32 or later
DVB or dvb-kernel driver (2003-03-31 or later)
@@ -19,7 +19,7 @@
The following remote control devices are supported:
(a) linux input device driver ('/dev/input/eventX', X=0,1,2,...)
- - built-in remote control port of the av7110-based DVB cards
+ - built-in remote control port of the av711x-based DVB cards
(aka full-featured cards), e.g. DVB-S Nexus [1]
- remote control port of some budget cards, e.g. Nova-CI [2]
- other input devices (not tested, please report success!)
@@ -40,8 +40,8 @@
-------------
The Remote Control plugin is installed the same way as any other plugin:
- cd VDR/PLUGINS/src
-- tar xfz vdr-remote-0.3.1.tgz
-- ln -s remote-0.3.1 remote
+- tar xfz vdr-remote-0.3.2.tgz
+- ln -s remote-0.3.2 remote
- cd ../..
- make plugins
@@ -175,6 +175,12 @@
vdr -P"remote -p tcp:3333"
wait for a telnet connection on tcp port 3333
(use 'telnet vdr 3333' to access this port)
+
+vdr -P"remote -t /dev/tty10"
+ use terminal device without 'OSD'
+
+vdr -P"remote -T /dev/tty10"
+ use terminal device with 'OSD'
vdr -P"remote -i autodetect -p tcp:3333 -t /dev/tty10"
use multiple devices
Index: CONTRIBUTORS
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/CONTRIBUTORS,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CONTRIBUTORS 9 Oct 2004 16:11:14 -0000 1.1
+++ CONTRIBUTORS 7 Nov 2004 20:23:22 -0000 1.2
@@ -3,3 +3,10 @@
Frank Krömmelbein <Frank99 at vdrportal>
for reporting that the tcp remote control is causing high cpu load
+
+Mike Gratsas <MikeGratsas at techemail dot com>
+ for fixing the LIRC remote control code
+
+Ville Skyttä <ville dot skytta at iki dot fi>
+ for translating OSD texts to the Finnish language
+
Index: remote.c
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/remote.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- remote.c 9 Oct 2004 16:11:14 -0000 1.1
+++ remote.c 7 Nov 2004 20:23:22 -0000 1.2
@@ -28,7 +28,7 @@
#define KEYMAP_DEVICE_AV7110 "/proc/av7110_ir"
-static const char *VERSION = "0.3.1";
+static const char *VERSION = "0.3.2";
static const char *DESCRIPTION = "Remote control";
@@ -74,13 +74,13 @@
for (;;)
{
if (polldelay)
- usleep(100*polldelay);
+ usleep(1000*polldelay);
code = getKey();
if (code == INVALID_KEY)
{
esyslog("error reading '%s'\n", device);
- usleep(10000*polldelay);
+ usleep(100000*polldelay);
continue;
}
@@ -182,7 +182,7 @@
{
int err = errno;
esyslog("%s: unable to open '%s': %s", Name(), devname, strerror(err));
- EOSD("%s: %s", devname, strerror(err));
+ EOSD(tr("%s: %s"), devname, strerror(err));
return false;
}
@@ -204,7 +204,7 @@
else
{
esyslog("%s: error uploading keymap to '%s'", Name(), devname);
- Interface->Error(tr("Error uploading keymap"));
+ MSG_ERROR(tr("Error uploading keymap"));
return false;
}
}
@@ -285,18 +285,18 @@
{
if (n == 0)
{
- Interface->Info(tr("Press any key to use pre-loaded keymap"));
+ MSG_INFO(tr("Press any key to use pre-loaded keymap"));
for (testKey = 0, i = 0; testKey == 0 && i < 35; i++)
usleep(200000);
if (testKey != 0)
{
- Interface->Info(tr("User-supplied keymap will be used"));
+ MSG_INFO(tr("User-supplied keymap will be used"));
break;
}
}
kOptions = 0x0000;
- Interface->Info(tr("Remote control test - press and hold down any key"));
+ MSG_INFO(tr("Remote control test - press and hold down any key"));
loadKeymap(kDevname, kOptions);
for (testKey = 0, i = 0; testKey == 0 && i < 10; i++)
usleep(200000);
@@ -315,7 +315,7 @@
break;
}
}
- Interface->Info(tr("RC5 protocol detected"));
+ MSG_INFO(tr("RC5 protocol detected"));
sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr);
break;
}
@@ -339,7 +339,7 @@
break;
}
}
- Interface->Info(tr("RC5 protocol detected (inverted signal)"));
+ MSG_INFO(tr("RC5 protocol detected (inverted signal)"));
sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr);
break;
}
@@ -350,7 +350,7 @@
usleep(200000);
if (testKey != 0)
{
- Interface->Info(tr("RCMM protocol detected"));
+ MSG_INFO(tr("RCMM protocol detected"));
sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr);
break;
}
@@ -361,7 +361,7 @@
usleep(200000);
if (testKey != 0)
{
- Interface->Info(tr("RCMM protocol detected (inverted signal)"));
+ MSG_INFO(tr("RCMM protocol detected (inverted signal)"));
sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr);
break;
}
@@ -369,7 +369,7 @@
if (testKey == 0)
{
- Interface->Error(tr("No remote control detected"));
+ MSG_ERROR(tr("No remote control detected"));
esyslog("%s: no remote control detected", device);
usleep(5000000);
testMode = false;
@@ -687,16 +687,21 @@
{
switch (devtyp[i])
{
+#ifdef REMOTE_FEATURE_LIRC
+ case 'l':
+ fh[i] = access(devnam[i], R_OK);
+ break;
+#endif
+ case 'p':
+ fh[i] = 0;
+ break;
+
case 'T':
fh[i] = open(devnam[i], O_RDWR);
break;
default:
fh[i] = open(devnam[i], O_RDONLY);
- break;
-
- case 'p':
- fh[i] = 0;
break;
}
Index: ttystatus.h
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/ttystatus.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ttystatus.h 9 Oct 2004 16:11:14 -0000 1.1
+++ ttystatus.h 7 Nov 2004 20:23:22 -0000 1.2
@@ -35,7 +35,7 @@
/****************************************************************************/
private:
int fd;
- const char **lineBuf;
+ char **lineBuf;
int numEntries;
int lastIndex;
int currIndex;
Index: remote.h
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr-plugin-remote/remote.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- remote.h 9 Oct 2004 16:11:14 -0000 1.1
+++ remote.h 7 Nov 2004 20:23:22 -0000 1.2
@@ -22,11 +22,19 @@
#define DSYSLOG(x...)
#endif
+#if VDRVERSNUM <= 10306
+#define MSG_ERROR(x) Interface->Error(x)
+#define MSG_INFO(x) Interface->Info(x)
+#else
+#define MSG_ERROR(x) Skins.Message(mtError,x)
+#define MSG_INFO(x) Skins.Message(mtInfo,x)
+#endif
+
// display error message with parameters on OSD
#define EOSD(fmt,parms...) { char msg[132]; \
snprintf(msg, sizeof msg, fmt, parms); \
- Interface->Error(msg); \
- Interface->Error(msg); /* repeat once */ }
+ MSG_ERROR(msg); \
+ MSG_ERROR(msg); /* repeat once */ }