remote-0.5.0/0000755000175000017500000000000012066517414012715 5ustar endrissendrissremote-0.5.0/i18n.h0000644000175000017500000000223512066453660013651 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * i18n.h: Internationalization * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #ifndef __PLUGIN_REMOTE_I18N_H #define __PLUGIN_REMOTE_I18N_H #include #if APIVERSNUM <= 10506 #define trNOOP(s) (s) extern const tI18nPhrase remotePhrases[]; #endif #endif // __PLUGIN_REMOTE_I18N_H remote-0.5.0/remote.c0000644000175000017500000005544712066453751014376 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * remote.c: main source file * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #include #ifdef REMOTE_FEATURE_LIRC #include #endif #include #include #include #include #include #include "i18n.h" #include "remote.h" #ifdef REMOTE_FEATURE_TCPIP #include "remotetcp.h" #endif #define NUMREMOTES 10 // maximum number of remote control devices #define AV7110_KEYMAP_DEVICE "/proc/av7110_ir" #if 0 #define PROC_INPUT_DEVICES "/proc/bus/input/devices" #define AV7110_PARM_DEVICE_MASK "/sys/module/dvb_ttpci/parameters/ir_device_mask" #define AV7110_PARM_PROTOCOL "/sys/module/dvb_ttpci/parameters/ir_protocol" #define AV7110_PARM_INVERSION "/sys/module/dvb_ttpci/parameters/ir_inversion" #endif static const char *VERSION = "0.5.0"; static const char *DESCRIPTION = trNOOP("Remote control"); // --------------------------------------------------------------------------- cRemoteGeneric::cRemoteGeneric(const char *name, int f, char *d) :cRemote(name) // --------------------------------------------------------------------------- { fh = f; device = d; polldelay = 40; // ms repeatdelay = 350; // ms repeatfreq = 100; // ms repeattimeout = 500; // ms } // --------------------------------------------------------------------------- cRemoteGeneric::~cRemoteGeneric() // --------------------------------------------------------------------------- { Cancel(); } // --------------------------------------------------------------------------- bool cRemoteGeneric::Put(uint64_t Code, bool Repeat, bool Release) // --------------------------------------------------------------------------- { //printf("%s: code %llx repeat %u release %u\n", // __func__, Code, Repeat, Release); return cRemote::Put(Code, Repeat, Release); } // --------------------------------------------------------------------------- void cRemoteGeneric::Action(void) // --------------------------------------------------------------------------- { #if VDRVERSNUM <= 10317 int now, first = 0, last = 0; #else cTimeMs first, rate, timeout; #endif uint64_t code, lastcode = INVALID_KEY; bool repeat = false; for (;;) { if (polldelay) usleep(1000*polldelay); code = getKey(); if (code == INVALID_KEY) { esyslog("error reading '%s'\n", device); usleep(100000*polldelay); continue; } #if VDRVERSNUM <= 10317 now = time_ms(); #endif if (keyPressed(code)) { // key down #if VDRVERSNUM <= 10317 if (now - last > repeattimeout) #else if (timeout.TimedOut()) #endif { if (repeat) { Put(lastcode,false,true); DSYSLOG("%s: timeout %016llx\n", device, code); repeat = false; } lastcode = INVALID_KEY; } if (code != lastcode) { Put(code); DSYSLOG("%s: press %016llx\n", device, code); lastcode = code; #if VDRVERSNUM <= 10317 last = first = now; #else first.Set(repeatdelay); rate.Set(repeatfreq); timeout.Set(repeattimeout); #endif repeat = false; } else { #if VDRVERSNUM <= 10317 if (now - first < repeatdelay || now - last < repeatfreq) #else if (!first.TimedOut() || !rate.TimedOut()) #endif continue; Put(code,true); DSYSLOG("%s: repeat %016llx\n", device, code); #if VDRVERSNUM <= 10317 last = now; #else rate.Set(repeatfreq); timeout.Set(repeattimeout); #endif repeat = true; } } else { // key up if (repeat) { Put(lastcode,false,true); DSYSLOG("%s: release %016llx\n", device, lastcode); repeat = false; } lastcode = INVALID_KEY; } }/* for */ } /*****************************************************************************/ // --------------------------------------------------------------------------- // // Try to identify input device. // // input: fh - file handle // name - device name // // returns: 0 - unknown device // 1 - full-featured card // 2 - other DVB card, e.g. budget receiver // -1 - error // // --------------------------------------------------------------------------- int identifyInputDevice(const int fh, char *name) // --------------------------------------------------------------------------- { char description[256]; // check name of input device if (ioctl(fh, EVIOCGNAME(sizeof(description)), description) < 0) return -1; dsyslog("device %s: %s", name, description); if (!strcmp(description, "DVB on-card IR receiver")) return 1; if (strstr(description, "DVB") || strstr(description, "dvb")) return 2; return 0; } // --------------------------------------------------------------------------- bool cRemoteDevInput::loadKeymap(const char *devname, uint32_t options) // --------------------------------------------------------------------------- { int fh; uint16_t keymap[2+256]; int n; fh = open(devname, O_WRONLY); if (fh < 0) { int err = errno; esyslog("%s: unable to open '%s': %s", Name(), devname, strerror(err)); EOSD(tr("%s: %s"), devname, strerror(err)); return false; } keymap[0] = (uint16_t) options; keymap[1] = (uint16_t) (options >> 16); for (int i = 1; i <= 256; i++) keymap[1+i] = i; n = write(fh, keymap, sizeof keymap); close(fh); if (n == sizeof keymap) { dsyslog("%s: keymap loaded '%s' flags %.8x", Name(), devname, options); return true; } else { esyslog("%s: error uploading keymap to '%s'", Name(), devname); MSG_ERROR(tr("Error uploading keymap")); return false; } } // --------------------------------------------------------------------------- cRemoteDevInput::cRemoteDevInput(const char *name, int f, char *d) :cRemoteGeneric(name, f, d) // --------------------------------------------------------------------------- { testMode = false; Start(); // autorepeat #define BITS_PER_LONG (sizeof(unsigned long) * 8) unsigned long data[EV_MAX]; memset(data, 0, sizeof data); ioctl(f, EVIOCGBIT(0,EV_MAX), data); if ( data[EV_REP/BITS_PER_LONG] & (1 << EV_REP%BITS_PER_LONG) ) { // autorepeat driver dsyslog("%s: autorepeat supported", name); polldelay = 0; } else { // non-autorepeat drivers polldelay = repeatdelay = repeatfreq = repeattimeout = 0; } // grab device if possible (kernel 2.6) #ifndef EVIOCGRAB // required if an old /usr/include/linux/input.h is used with a new kernel :-( #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ #endif data[0] = 1; if (ioctl(f, EVIOCGRAB, data) == 0) dsyslog("%s: exclusive access granted", name); // setup keymap const char *setupStr = GetSetup(); char kDevname[256]; memset(kDevname, 0, sizeof kDevname); uint32_t kOptions = 0; int kAddr = -1; if (setupStr) { sscanf(setupStr, "%s %x %d", kDevname, &kOptions, &kAddr); if (kAddr != -1) kOptions |= ((kAddr << 16) | 0x4000); } if (kDevname[0]) { loadKeymap(kDevname, kOptions); } } // --------------------------------------------------------------------------- bool cRemoteDevInput::Initialize() // --------------------------------------------------------------------------- { testMode = true; char setupStr[256]; memset (setupStr, 0, sizeof setupStr); // load keymap for full-featured cards if (identifyInputDevice(fh, device) == 1) { const char *kDevname = AV7110_KEYMAP_DEVICE; uint32_t kOptions; int kAddr = -1; int i, n; for (n = 0; n < 2; n++) { if (n == 0) { 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) { MSG_INFO(tr("User-supplied keymap will be used")); break; } } kOptions = 0x0000; 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); if (testKey != 0) { for (i = 0; i < 64; i++) { int a = (i & 0x1f); loadKeymap(kDevname, kOptions | 0x4000 | (a << 16)); usleep(400000); testKey = 0; usleep(400000); if (testKey != 0) { kAddr = a; break; } } MSG_INFO(tr("RC5 protocol detected")); sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr); break; } kOptions = 0x8000; loadKeymap(kDevname, kOptions); for (testKey = 0, i = 0; testKey == 0 && i < 10; i++) usleep(200000); if (testKey != 0) { for (i = 0; i < 64; i++) { int a = (i & 0x1f); loadKeymap(kDevname, kOptions | 0x4000 | (a << 16)); usleep(400000); testKey = 0; usleep(400000); if (testKey != 0) { kAddr = a; break; } } MSG_INFO(tr("RC5 protocol detected (inverted signal)")); sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr); break; } kOptions = 0x0001; loadKeymap(kDevname, kOptions); for (testKey = 0, i = 0; testKey == 0 && i < 10; i++) usleep(200000); if (testKey != 0) { MSG_INFO(tr("RCMM protocol detected")); sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr); break; } kOptions = 0x8001; loadKeymap(kDevname, kOptions); for (testKey = 0, i = 0; testKey == 0 && i < 10; i++) usleep(200000); if (testKey != 0) { MSG_INFO(tr("RCMM protocol detected (inverted signal)")); sprintf (setupStr, "%s %.8x %d", kDevname, kOptions, kAddr); break; } }/* for */ if (testKey == 0) { MSG_ERROR(tr("No remote control detected")); esyslog("%s: no remote control detected", device); usleep(5000000); testMode = false; return false; } }/* DVB card */ if (setupStr[0]) PutSetup(setupStr); testMode = false; return true; } // --------------------------------------------------------------------------- uint64_t cRemoteDevInput::getKey(void) // --------------------------------------------------------------------------- { struct input_event ev; int n; uint64_t code; do n = read(fh, &ev, sizeof ev); while (n == sizeof ev && ev.type != 1); if (n == sizeof ev) { if (ev.value) ev.value = 1; code = ((uint64_t)ev.value << 32) | ((uint64_t)ev.type << 16) | (uint64_t)ev.code; } else code = INVALID_KEY; if (testMode) { testKey = code; code = 0ULL; } return code; } // --------------------------------------------------------------------------- bool cRemoteDevInput::keyPressed(uint64_t code) // --------------------------------------------------------------------------- { return (code & 0xFFFF00000000ULL); } /*****************************************************************************/ #ifdef REMOTE_FEATURE_LIRCOLD // --------------------------------------------------------------------------- uint64_t cRemoteDevLirc::getKey(void) // --------------------------------------------------------------------------- { unsigned long code; int n; n = read(fh, &code, sizeof code); if (n != sizeof code) return INVALID_KEY; else return (uint64_t)code; } // --------------------------------------------------------------------------- bool cRemoteDevLirc::keyPressed(uint64_t code) // --------------------------------------------------------------------------- { return (code & 0x80); } #endif // REMOTE_FEATURE_LIRCOLD /*****************************************************************************/ // --------------------------------------------------------------------------- cRemoteDevTty::cRemoteDevTty(const char *name, int f, char *d) :cRemoteGeneric(name, f, d) // --------------------------------------------------------------------------- { struct termios t; if (!tcgetattr(f, &tm)) { t = tm; t.c_lflag &= ~(ICANON | ECHO); tcsetattr(f, TCSANOW, &t); } polldelay = 0; repeattimeout = 80; if (f >= 0) Start(); } // --------------------------------------------------------------------------- cRemoteDevTty::~cRemoteDevTty() // --------------------------------------------------------------------------- { tcsetattr(fh, TCSANOW, &tm); } // --------------------------------------------------------------------------- uint64_t cRemoteDevTty::getKey(void) // --------------------------------------------------------------------------- { int n; uint64_t code = 0; n = read(fh, &code, sizeof code); return (n > 0) ? code : INVALID_KEY; } // --------------------------------------------------------------------------- bool cRemoteDevTty::keyPressed(uint64_t code) // --------------------------------------------------------------------------- { return true; } // --------------------------------------------------------------------------- bool cRemoteDevTty::Put(uint64_t Code, bool Repeat, bool Release) // --------------------------------------------------------------------------- { bool rc = cRemote::Put(Code, Repeat, Release); if (!rc && Code <= 0xff) rc = cRemote::Put(KBDKEY(Code)); return rc; } /*****************************************************************************/ class cPluginRemote : public cPlugin /*****************************************************************************/ { private: int devcnt; char devtyp[NUMREMOTES]; char *devnam[NUMREMOTES]; int fh[NUMREMOTES]; public: cPluginRemote(void); virtual ~cPluginRemote(); virtual const char *Version(void) { return VERSION; } virtual const char *Description(void) { return tr(DESCRIPTION); } virtual const char *CommandLineHelp(void); virtual bool ProcessArgs(int argc, char *argv[]); virtual bool Start(void); }; // --------------------------------------------------------------------------- cPluginRemote::cPluginRemote(void) // --------------------------------------------------------------------------- { for (int i = 0; i < NUMREMOTES; i++) { devtyp[i] = '\0'; devnam[i] = NULL; fh[i] = -1; } devcnt = 0; } // --------------------------------------------------------------------------- cPluginRemote::~cPluginRemote() // --------------------------------------------------------------------------- { // must not delete any remotes, see PLUGINS.html! for (int i = 0; i < devcnt; i++) { if (fh[i] >= 0) close(fh[i]); fh[i] = -1; } devcnt = 0; } // --------------------------------------------------------------------------- const char *cPluginRemote::CommandLineHelp(void) // --------------------------------------------------------------------------- { return " -i dev, --input=dev input device (/dev/input/... | autodetect)\n" #ifdef REMOTE_FEATURE_LIRC " -l dev, --lirc=dev lirc device (/dev/lircd)\n" #endif #ifdef REMOTE_FEATURE_LIRCOLD " -l dev, --lirc=dev kernel lirc device (/dev/lirc)\n" #endif #ifdef REMOTE_FEATURE_TCPIP " -p tcp:n, --port=tcp:n listen on tcp port \n" #endif " -t dev, --tty=dev tty device\n" " -T dev, --TTY=dev tty device with 'OSD'\n"; } // --------------------------------------------------------------------------- bool cPluginRemote::ProcessArgs(int argc, char *argv[]) // --------------------------------------------------------------------------- { static struct option long_options[] = { { "input", required_argument, NULL, 'i' }, { "lirc", required_argument, NULL, 'l' }, { "port", required_argument, NULL, 'p' }, { "tty", required_argument, NULL, 't' }, { "TTY", required_argument, NULL, 'T' }, { NULL } }; int c; while ((c = getopt_long(argc, argv, "i:l:p:t:T:", long_options, NULL)) != -1) { switch (c) { case 'i': case 'l': case 'p': case 't': case 'T': if (devcnt >= NUMREMOTES) { esyslog("%s: too many remotes", Name()); return false; } devtyp[devcnt] = c; devnam[devcnt] = optarg; devcnt++; break; default: esyslog("%s: invalid argument", Name()); return false; } } return true; } // --------------------------------------------------------------------------- bool cPluginRemote::Start(void) // --------------------------------------------------------------------------- { bool ok = false; #if APIVERSNUM <= 10506 // translations RegisterI18n(remotePhrases); #endif // no device specified by the user, set default if (devcnt == 0) { devtyp[0] = 'i'; devnam[0] = (char *) "autodetect"; devcnt = 1; } /* probe eventX devices */ for (int i = 0; i < devcnt; i++) { if (devtyp[i] == 'i' && strcmp(devnam[i], "autodetect") == 0) { char nam[80]; for (int j = 0; ; j++) { sprintf(nam, "/dev/input/event%d", j); fh[i] = open(nam, O_RDONLY); if (fh[i] < 0) { switch (errno) { case EACCES: // permission denied: ignore device continue; default: // no more devices: stop scanning break; } break; } if (identifyInputDevice(fh[i], nam) >= 1) { // found DVB card receiver devnam[i] = strdup(nam); close(fh[i]); break; } // unknown device, try next one close(fh[i]); } // for j } // if autodetect // use default device if nothing could be identified if (devtyp[i] == 'i' && strcmp(devnam[i], "autodetect") == 0) devnam[i] = (char *) "/dev/input/ir"; } // for i for (int i = 0; i < devcnt; i++) { // build name for remote.conf char *nam = NULL; char *cp = strrchr(devnam[i], '/'); if (cp) asprintf(&nam, "%s-%s", Name(), cp+1); else asprintf(&nam, "%s-%s", Name(), devnam[i]); if (!nam) continue; strreplace(nam, '.', '_'); 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; } if (fh[i] < 0) { esyslog("%s: unable to open '%s': %s", Name(), devnam[i], strerror(errno)); EOSD(tr("%s: %s"), devnam[i], strerror(errno)); free(nam); continue; } // at least, one device opened successfully ok = true; dsyslog("%s: using '%s'", Name(), devnam[i]); switch (devtyp[i]) { case 'i': new cRemoteDevInput(nam,fh[i],devnam[i]); break; #ifdef REMOTE_FEATURE_LIRC case 'l': new cLircRemote(devnam[i]); // use vdr's lirc code break; #endif #ifdef REMOTE_FEATURE_LIRCOLD case 'l': new cRemoteDevLirc(nam,fh[i],devnam[i]); break; #endif #ifdef REMOTE_FEATURE_TCPIP case 'p': new cTcpRemote(nam, -1, devnam[i]); break; #endif case 'T': new cRemoteDevTtyWithOsd(nam,fh[i],devnam[i]); break; case 't': new cRemoteDevTty(nam,fh[i],devnam[i]); break; } free(nam); } // for if (!ok) esyslog("%s: fatal error - unable to open input device", Name()); return ok; } /*****************************************************************************/ VDRPLUGINCREATOR(cPluginRemote); // Don't touch this! remote-0.5.0/ttystatus.c0000644000175000017500000002300212066453770015146 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * ttystatus.c: tty osd emulation * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #include #include #include "ttystatus.h" void cTtyStatus::display(const char *buf) { int n = strlen(buf); int tabs = 0; int tabstop = 30; int pos = 0; for (int i = 0; i < n; i++) { if (buf[i] == '\t') tabs++; } if (tabs == 1) tabstop = 40; else if (tabs == 2) tabstop = 10; else if (tabs == 3) tabstop = 8; else tabstop = 4; for (int i = 0; i < n && pos < 80; i++) { switch (buf[i]) { case '\t': do { write(fd, " ", 1); pos++; } while (pos % tabstop != 0); break; case '\n': write(fd, "\r\n", 2); break; default: write(fd, buf+i, 1); pos++; break; } } } void cTtyStatus::display2(const char *buf) { for (size_t i = 0; i < strlen(buf); i++) { switch(buf[i]) { case '\n': write(fd, "\r\n", 2); break; default: write(fd, buf+i, 1); break; } } } void cTtyStatus::set_color(int col) { switch(col) { case WHITE_BLACK: print("\e[1m\e[37m\e[40m"); break; case YELLOW_BLACK: print("\e[1m\e[33m\e[40m"); break; case CYAN_BLACK: print("\e[1m\e[36m\e[40m"); break; case BLACK_CYAN: print("\e[0m\e[30m\e[46m"); break; case BLACK_RED: print("\e[0m\e[30m\e[41m"); break; case BLACK_GREEN: print("\e[0m\e[30m\e[42m"); break; case BLACK_YELLOW: print("\e[0m\e[30m\e[43m"); break; case WHITE_BLUE: print("\e[1m\e[37m\e[44m"); break; } } #if VDRVERSNUM <= 10337 void cTtyStatus::Recording(const cDevice *Device, const char *Name) { const char *FileName = NULL; bool On = (Name != NULL); #else void cTtyStatus::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) { #endif const char *startStop = On ? "start" : "stop"; const char *s = Name; if (!s) s = FileName; if (!s) s = "..."; set_pos(24, 0); set_color(BLACK_GREEN); print(" Card %d: %s recording '%s'%-60s", Device->CardIndex()+1, startStop, s, ""); refresh(); set_pos(2, 0); } #if VDRVERSNUM <= 10337 void cTtyStatus::Replaying(const cControl *Control, const char *Name) { const char *FileName = NULL; bool On = (Name != NULL); #else void cTtyStatus::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) { #endif const char *startStop = On ? "Start" : "Stop"; const char *s = Name; if (!s) s = FileName; if (!s) s = "..."; set_pos(24, 0); set_color(BLACK_GREEN); print(" %s replay '%s'%-70s", startStop, s, ""); refresh(); set_pos(2, 0); } void cTtyStatus::SetVolume(int Volume, bool Absolute) { static int lastVolume; // dsyslog("%s: vol %d abs %d", __FUNCTION__, Volume, Absolute); set_pos(24, 0); set_color(BLACK_GREEN); #if APIVERSNUM < 10402 Absolute = true; #endif if (Absolute) lastVolume = Volume; else lastVolume += Volume; print(" Set volume %d %-70s", lastVolume, ""); refresh(); set_pos(2, 0); } void cTtyStatus::OsdClear(void) { clear_screen(); refresh(); } void cTtyStatus::OsdTitle(const char *Title) { // dsyslog("%s: '%s'", __FUNCTION__, Title); clear_screen(); set_color(BLACK_CYAN); set_pos(0, 0); print(" %-80s", Title); set_color(WHITE_BLACK); refresh(); set_pos(2, 0); } void cTtyStatus::OsdStatusMessage(const char *Message) { set_pos(23,0); if (Message) { set_color(BLACK_YELLOW); print(" %-80s", Message); } else { set_color(WHITE_BLACK); print("%-80s", ""); } refresh(); set_pos(2, 0); } void cTtyStatus::OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *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); } void cTtyStatus::OsdItem(const char *Text, int Index) { // dsyslog("%s[%4d]: '%s'", __FUNCTION__, Index, Text); if (numEntries <= Index) { int oldNumEntries = numEntries; numEntries = Index + 100; lineBuf = (char **) realloc((void *)lineBuf, numEntries * sizeof(char *)); if (lineBuf == NULL) { numEntries = 0; return; } for (int i = oldNumEntries; i < numEntries; i++) lineBuf[i] = NULL; } if (Text && 0 <= Index && Index < numEntries) { if (lineBuf[Index] != NULL) free(lineBuf[Index]); lineBuf[Index] = strdup(Text); lastIndex = Index; } } void cTtyStatus::OsdCurrentItem(const char *Text) { int i; int first, last; // dsyslog("%s: '%s'", __FUNCTION__, Text); if (numEntries > 0 && Text) { for (i = 0; i <= lastIndex; i++) { if (lineBuf[i] == NULL) continue; if (strcmp(Text, lineBuf[i]) == 0) break; } if (i <= lastIndex) { // found currIndex = i; } else { // not found, item changed if (lineBuf[currIndex] != NULL) free(lineBuf[currIndex]); lineBuf[currIndex] = strdup(Text); } first = min(currIndex-10,lastIndex-20); first = max(first,0); last = min(first+20,lastIndex); set_color(WHITE_BLACK); for (i = first; i <= last; i++) { if (i == currIndex) set_color(BLACK_CYAN); set_pos(2+i-first, 0); print("%-80s", lineBuf[i]); if (i == currIndex) set_color(WHITE_BLACK); } set_color(WHITE_BLACK); refresh(); } } void cTtyStatus::OsdTextItem(const char *Text, bool Scroll) { // dsyslog("%s: '%s' scroll %d", __FUNCTION__, Text, Scroll); if (Text) { set_color(CYAN_BLACK); display2(Text); display2("\n\n"); refresh(); } else { set_pos(2, 0); } } void cTtyStatus::OsdChannel(const char *Text) { clear_screen(); set_color(WHITE_BLACK); set_pos(19, 0); print("%-80s", Text); refresh(); } void cTtyStatus::OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) { char buffer[25]; struct tm tm_r; int line = 20; strftime(buffer, sizeof(buffer), "%R", localtime_r(&PresentTime, &tm_r)); if (PresentTitle) { set_color(YELLOW_BLACK); set_pos(line++, 0); print("%5s ", buffer); set_color(CYAN_BLACK); print("%s", PresentTitle); } if (PresentSubtitle) { if (strlen(PresentSubtitle)) { set_pos(line++, 0); print("%5s %s", "", PresentSubtitle); } } strftime(buffer, sizeof(buffer), "%R", localtime_r(&FollowingTime, &tm_r)); if (FollowingTitle) { set_color(YELLOW_BLACK); set_pos(line++, 0); print("%5s ", buffer); set_color(CYAN_BLACK); print("%s", FollowingTitle); } if (FollowingSubtitle) { set_pos(line++, 0); print("%5s %s", "", FollowingSubtitle); } refresh(); } cTtyStatus::cTtyStatus(int f) { // initialize variables lineBuf = NULL; numEntries = 0; lastIndex = 0; currIndex = 0; fd = f; } cTtyStatus::~cTtyStatus(void) { if (lineBuf && numEntries > 0) { for (int i = 0; i < numEntries; i++) { if (lineBuf[i]) free(lineBuf[i]); } free(lineBuf); } } remote-0.5.0/remote.h0000644000175000017500000001023612066453670014366 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * remote.h: input/lirc/tty remote control * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #ifndef __PLUGIN_REMOTE_H #define __PLUGIN_REMOTE_H #include #include #include "ttystatus.h" //#define DEBUG #ifdef DEBUG #define DSYSLOG(x...) dsyslog(x) #else #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); \ MSG_ERROR(msg); \ MSG_ERROR(msg); /* repeat once */ } #if APIVERSNUM <= 10404 #define uint64_t uint64 #endif /*****************************************************************************/ class cRemoteGeneric : protected cRemote, protected cThread /*****************************************************************************/ { protected: static const uint64_t INVALID_KEY = (uint64_t) -1; int fh; char *device; int polldelay; int repeatdelay; int repeatfreq; int repeattimeout; cRemoteGeneric(const char *name, int f, char *d); virtual ~cRemoteGeneric(); virtual uint64_t getKey(void) = 0; virtual bool keyPressed(uint64_t code) = 0; virtual bool Put(uint64_t Code, bool Repeat = false, bool Release = false); virtual void Action(void); }; /*****************************************************************************/ class cRemoteDevInput : protected cRemoteGeneric /*****************************************************************************/ { private: bool testMode; uint64_t testKey; bool loadKeymap(const char *devname, uint32_t options); protected: virtual uint64_t getKey(void); virtual bool keyPressed(uint64_t code); public: cRemoteDevInput(const char *name, int f, char *d); virtual bool Initialize(void); }; #ifdef REMOTE_FEATURE_LIRCOLD /*****************************************************************************/ class cRemoteDevLirc : protected cRemoteGeneric /*****************************************************************************/ { protected: virtual uint64_t getKey(void); virtual bool keyPressed(uint64_t code); public: cRemoteDevLirc(const char *name, int f, char *d) :cRemoteGeneric(name, f, d) { Start(); } }; #endif /*****************************************************************************/ class cRemoteDevTty : protected cRemoteGeneric /*****************************************************************************/ { private: struct termios tm; protected: virtual uint64_t getKey(void); virtual bool keyPressed(uint64_t code); virtual bool Put(uint64_t Code, bool Repeat = false, bool Release = false); public: cRemoteDevTty(const char *name, int f, char *d); virtual ~cRemoteDevTty(); }; /*****************************************************************************/ class cRemoteDevTtyWithOsd : protected cRemoteDevTty, protected cTtyStatus /*****************************************************************************/ { public: cRemoteDevTtyWithOsd(const char *name, int f, char *d) :cRemoteDevTty(name, f, d), cTtyStatus(f) {} }; #endif // __PLUGIN_REMOTE_H remote-0.5.0/HISTORY0000644000175000017500000001057612066454311014006 0ustar endrissendrissVDR Plugin 'remote' Revision History ------------------------------------ 2002-10-14: Version 0.0.1 - Initial revision. 2003-03-31: Version 0.1.0 - Support autorepeat on /dev/input/eventX with following API-3 drivers: o DVB HEAD (2003-03-31 and later) o dvb kernel (2003-03-31 and later) 2003-05-16: Version 0.1.1 - Fixed key learning for vdr-1.1.31+. 2003-10-05: Version 0.2.0 - Simplified installation for av7110-based (aka full-featured) cards: o av7110_loadkeys is no longer required, but may be used anyway (for backward compatibility). o Integrated generic keymap support for all remote controls. No need to use remote-specific keymaps anymore. o Remote control protocol (RC5, RCMM), signal inversion setting and device address are automatically detected. - Implemented internationalization. - Dropped old (API-1) driver support. - Updated plugin Makefile (re-created with vdr 1.2.5 newplugin). - Minimum vdr version 1.1.32 or later. 2004-02-01: Version 0.2.1 - Implemented code to autodetect the remote control device. If called without parameters, the plugin will detect the receiver of the DVB card on event0/1/2/... automagically. This should make setup easier for people who have an USB keyboard or an USB mouse. - Included workaround for kernel 2.6: Try to get exclusive access ("grab" device). Patching the plugin is not required anymore. - Added some OSD diagnostic messages to make debugging easier. - Included some patches in sub-directory 'misc': o DVB driver patch to set permissions for /proc/av7110_ir to 666 o kernel 2.4 keybdev patch See README for details when these patches should be applied. - Minor code clean-up. - Makefile: added -D_GNU_SOURCE to make plugin compatible with vdr patches. 2004-04-22: Version 0.3.0 - New keyword '-i autodetect', Autodetect mode can be used together with other command line options. - LIRC remote control (option '-l'). It just starts the LIRC code of vdr. Please note that I do not use LIRC and cannot provide any support. - TCP/telnet remote control (option '-p'). - 'OSD' emulation for TTY (option '-T') and TCP remote control (option '-p'). 2004-04-28: Version 0.3.1 - Fixed gcc 3.4.0 compilation warnings. - 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ä). 2005-01-09: Version 0.3.3 - Fixed to compile with vdr 1.3.18+ - Write name of input device to syslog. 2006-01-09: Version 0.3.4 - Fixed to compile with vdr 1.3.38+ - Added -fPIC to CXXFLAGS. 2006-01-25: Version 0.3.5 - Fixed segfault due to FileName == NULL in cTtyStatus::Recording() and cTtyStatus::Replaying() (thanks to Ronny Kornexl for reporting this one). Rewrote cTtyStatus::Recording() and cTtyStatus::Replaying(): Do not assume that Name and/or FileName have a particular format. 2006-03-04: Version 0.3.6 - Added French language texts (thanks to Pierre Briec). 2006-04-30: Version 0.3.7 - Updated Makefile (use APIVERSION for VDR >= 1.3.47, VDRVERSION otherwise) 2006-09-02: Version 0.3.8 - cRemoteDevInput: Ignore all event types except type 1 (key). - Added Italian language texts (thanks to Nicola Franchi). - Added Polish language texts (thanks to Jakub Wolnicki). - Fixed cTtyStatus::SetVolume() for API version 1.4.2. 2006-12-03: Version 0.3.9 - Added Russian language texts (thanks to Waldemar Nikel). - Replaced uint64 by uint64_t for APIVERSION >= 1.4.5. 2007-10-06: Version 0.4.0 - Implemented gettext support for VDR >= 1.5.7, i18n is still used for older vdr releases. - If supported by udev, an input device can be selected by pci slot now. For example: vdr -P"remote -i /dev/input/by-path/pci-0000:02:06.0--event-ir" (Thanks to Joachim Selinger for suggesting to add this feature.) 2012-12-26: Version 0.5.0 - gettext detection modified to use $(VDRDIR)/i18n.h (thanks to Tobias Grimm). - Updated Italian language texts. - Fixed some compiler warnings. - Telnet section added to FAQ. - GPL text added to all source files. - Fixed crash with TTY and/or Telnet remotes when VDR terminated. - Access /proc/av7110_ir in write-only mode (required by kernel 2.6.34+). - Adopt Makefile for vdr 1.7.34+. remote-0.5.0/FAQ0000644000175000017500000001536112066517357013263 0ustar endrissendrissRemote Control Mini-FAQ (Rev 0.5.0, 2012-12-26 En) ================================================== 1. Which hardware is supported? ---------------------------- Configurations which have been reported to work: card type driver connector IR protocol notes --------------------------------------------------------------------- TT S2 6400 saa716x_ff ir connector RC5 Activy 300 RCMM DVB-S 1.x dvb-ttpci J2 RC5/RCMM 1 DVB-S 1.x dvb-ttpci CI module RC5/RCMM 1 DVB-S 2.x dvb-ttpci ir connector RC5/RCMM 1,2 DVB-S 2.x dvb-ttpci CI module RC5/RCMM 1,2 Nova-CI budget-ci ir connector RC5 [1] All full-featured cards support RC5 and RCMM. For RC5 you need a RC5-capable IR receiver. For RCMM you need a RCMM-capable IR receiver. [2] The receivers shipped with rev 2.x cards support RC5. Other '/dev/input/eventX'-based devices will most probably work, if the event device is specified using the '-i' parameter. If supported by udev, an input device can also be selected by pci slot. See README for an example. Please report if you have a working configuration not listed here. Thx. ------------------------------------------------------------------------------- 2. It does not work. What should I do? ----------------------------------- 2.1 All card types -------------- Please verify that... - the remote control really works. Check the batteries! - the plug of the remote control receiver is connected properly. (This is the most common problem with rev 2.x full-featured cards!) - Use the latest version of the remote control plugin. 2.2 Full-featured cards ------------------- 2.2.1 The remote control does not work, if a CI is connected ------------------------------------------------------ Whenever a CI is connected, the on-board connector will be disabled! On some CIs there is a jumper to select whether the receiver of the CI or the receiver of the FF-card should be used. RTFM. If not, use the integrated receiver of the CI, or connect the receiver to the ir connector of the CI. ------------------------------------------------------------------------------- 3. Testing - Debugging - Troubleshooting ------------------------------------- 3.1 Identifying the correct event device ------------------------------------ Check the output of 'cat /proc/bus/input/devices'. For example (full-featured card on /dev/input/event2): ... I: Bus=0001 Vendor=13c2 Product=0000 Version=0002 N: Name="DVB on-card IR receiver" P: Phys=pci-0000:00:0c.0/ir0 S: Sysfs=/class/input/input4 U: Uniq= H: Handlers=kbd event2 B: EV=100013 B: KEY=1 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe B: MSC=18 ... 'DVB on-card IR receiver' identifies the receiver of the full-featured card. 'event2' is the device the remote plugin has to use (in this example). 3.2 Check the system log (/var/log/messages, dmesg, logread etc.) ------------------------------------------------------------- The remote plugin must use the device identified in 3.1. For example: ... Jul 27 07:04:29 orion vdr: [4032] remote: using '/dev/input/event2' Jul 27 07:04:29 orion vdr: [4032] remote-event2: autorepeat supported Jul 27 07:04:29 orion vdr: [4032] remote-event2: exclusive access granted ... If it does not use the correct device, specify the device using the '-i' parameter. If supported by udev, an input device can also be selected by pci slot. See README for an example. 3.3 Enabling ir debugging in the driver ----------------------------------- 3.3.1 full-featured cards - dvb-ttpci driver Type echo 16 > /sys/module/dvb_ttpci/parameters/debug 3.3.2 budget card - budget-ci driver Type echo 1 > /sys/module/budget_ci/parameters/ir_debug 3.4 What is the expected behavior of evtest? ---------------------------------------- You should see something like this: evtest /dev/input/event2 Input driver version is 1.0.0 Input device ID: bus 0x1 vendor 0x13c2 product 0x0 version 0x2 Input device name: "DVB on-card IR receiver" Supported events: Event type 0 (Reset) Event code 0 (Reset) Event code 1 (Key) Event code 4 (?) Event code 20 (Repeat) Event type 1 (Key) Event code 1 (Esc) Event code 2 (1) Event code 3 (2) Event code 4 (3) ... Testing ... (interrupt to exit) Event: time 1047342384.790038, type 1 (Key), code 402 (ChannelUp), value 1 Event: time 1047342385.290630, type 1 (Key), code 402 (ChannelUp), value 0 ... 'DVB on-card IR receiver' indicates the receiver of the full-featured card. 'Event:' lines are the result of pressing a key on the remote control. To get 'Event' lines: - vdr must be stopped. - A keymap must have been loaded. 3.5 Loading user-defined keymaps ---------------------------- For full-featured cards a user-defined keymap may be loaded using av7110_loadkeys from the dvb-apps package. 3.5.1 Examples: - RC5, not inverted, keymap 'hauppauge.rc5': av7110_loadkeys hauppauge.rc5 > /proc/av7110_ir - RC5, inverted, keymap 'hauppauge.rc5': av7110_loadkeys -i hauppauge.rc5 > /proc/av7110_ir - RCMM, not inverted, keymap 'activy.rcmm' av7110_loadkeys activy.rcmm > /proc/av7110_ir - RCMM, inverted, keymap 'activy.rcmm' av7110_loadkeys -i activy.rcmm > /proc/av7110_ir 3.5.2 How do I have to modify 'runvdr' to load the keymap? Have a look at the script 'runvdr.remote' in sub-directory 'misc'. ------------------------------------------------------------------------------- 4. Telnet ------ 4.1 Terminating the telnet session ------------------------------ Any telnet session can be terminated by 'escape character' c (close). The escape character will be displayed when telnet is started, default is Ctrl-]. 4.2 Key mapping example ------------------- VDR is able to learn the telnet keys like any other keyboard. If you cannot see the OSD to perform key learning, add file misc/remote.conf.tcp3333 to your remote.conf. The keys are documented in misc/remote.conf.tcp3333.readme. 4.3 Customizing the key mapping --------------------------- It is recommended to use the key learning feature of vdr, but you might also use your favorite editor to modify the key mapping. Key codes can be found by using the debug feature of telnet: - enter command mode by pressing the 'escape character' - enter 'set netdata on' Note that the byte order must be reversed for remote.conf. ------------------------------------------------------------------------------- 5. More information ---------------- WIKIs: - VDR and plugins http://www.vdr-wiki.de - DVB http://linuxtv.org/wiki If nothing helps, please post your problem at - VDR mailing list http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr - VDR Portal http://www.vdr-portal.de remote-0.5.0/remotetcp.h0000644000175000017500000000272612066453677015111 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * remotetcp.h: tcp/telnet remote control * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #ifndef __PLUGIN_REMOTETCP_H #define __PLUGIN_REMOTETCP_H #include #include "remote.h" /****************************************************************************/ class cTcpRemote : protected cRemoteDevTty /****************************************************************************/ { private: cTtyStatus *cstatus; cSocket *csock; protected: virtual uint64_t getKey(void); public: cTcpRemote(const char *name, int f, char *d); virtual ~cTcpRemote(); }; #endif // __PLUGIN_REMOTETCP_H remote-0.5.0/ttystatus.h0000644000175000017500000000616512066453707015166 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * ttystatus.h: tty osd emulation * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #ifndef __PLUGIN_TTYSTATUS_H #define __PLUGIN_TTYSTATUS_H #define WHITE_BLACK 1 #define YELLOW_BLACK 2 #define CYAN_BLACK 3 #define BLACK_CYAN 4 #define BLACK_RED 5 #define BLACK_GREEN 6 #define BLACK_YELLOW 7 #define WHITE_BLUE 8 #include #define clear_screen() { set_color(WHITE_BLACK); print("\e[2J"); } #define refresh() #define set_pos(y,x) print("\e[%d;%dH", y+1, x+1); #define print(fmt...) { char buf[100]; snprintf(buf,100, fmt); display(buf); } /****************************************************************************/ class cTtyStatus : public cStatus { /****************************************************************************/ private: int fd; char **lineBuf; int numEntries; int lastIndex; int currIndex; int tabstop; protected: virtual void display(const char *buf); virtual void display2(const char *buf); virtual void set_color(int col); #if VDRVERSNUM <= 10337 virtual void Replaying(const cControl *Control, const char *Name); virtual void Recording(const cDevice *Device, const char *Name); #else virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); #endif virtual void SetVolume(int Volume, bool Absolute); virtual void OsdClear(void); virtual void OsdTitle(const char *Title); virtual void OsdStatusMessage(const char *Message); virtual void OsdHelpKeys(const char *Red, const char *Green, const char *Yellow, const char *Blue); virtual void OsdItem(const char *Text, int Index); virtual void OsdCurrentItem(const char *Text); virtual void OsdTextItem(const char *Text, bool Scroll); virtual void OsdChannel(const char *Text); virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle); public: cTtyStatus(int fd); virtual ~cTtyStatus(); }; #endif // __PLUGIN_TTYSTATUS_H remote-0.5.0/i18n.c0000644000175000017500000001412212066453431013636 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * i18n.c: Internationalization * * Copyright (C) 2002-2012 Oliver Endriss * * Translations provided by: * Finnish Ville Skyttä * French Pierre Briec * Italian Nicola Franchi * Italian Gringo * Polish Jakub Wolnicki * Russian Waldemar Nikel * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #include "i18n.h" /* // The name of the language (this MUST be the first phrase!): { "English", "Deutsch", "Slovenski", "Italiano", "Nederlands", "Português", "Français", "Norsk", "suomi", "Polski", "Español", "Ellinika", "Svenska", "Romaneste", "Magyar", "Català", "ÀãááÚØÙ", // Russian }, */ const tI18nPhrase remotePhrases[] = { // Menu titles: { "Remote control", "Fernbedienung", "", "Telecomando", "", "", "Télécommande", "", "Kaukosäädin", "Zdalne sterowanie", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¿ãÛìâ ãßàÐÒÛÕÝØï", #endif }, { "Press any key to use pre-loaded keymap", "Taste drücken, um zuvor geladene Keymap zu verwenden", "", "Premi un tasto per usare una tabella dei tasti precaricata", "", "", "Appuyez sur une touche pour utiliser un Keymap préchargé", "", "Paina mitä tahansa näppäintä käyttääksesi oletusnäppäinkarttaa", "Nacisnij dowolny klawisz, aby uzyc zaladowanej mapy klawiszy", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "½ÐÖÜØâÕ ÛîÑãî ÚÝÞßÚã ÔÛï ØáßÞÛì×ÞÒÐÝØï àÐÝÕÕ ×ÐÓàãÖÕÝÞÙ àÐáÚÛÐÔÚØ", #endif }, { "User-supplied keymap will be used", "Benutzerdefinierte Keymap wird verwendet", "", "Verrà usata una mappa dei tasti fornita dall'utente", "", "", "Keymap personnalisé va être utilisé", "", "Käytetään käyttäjän määrittelemää näppäinkarttaa", "Uzyta zostanie mapa klawiszy, zdefinowana przez uzytkownika", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "±ãÔÕâ ØáßÞÛì×ÞÒÐâìáï àÐáÚÛÐÔÚÐ ßÞÛì×ÞÒÐâÕÛï", #endif }, { "Remote control test - press and hold down any key", "Test der Fernbedienung - beliebige Taste gedrückt halten", "", "Prova telecomando - premi e tieni premuto un tasto", "", "", "Test télécommande - Appuyer et maintenir une touche enfoncée", "", "Kaukosäädintesti - paina ja pidä alhaalla jotain kaukosäätimen näppäintä", "Test zdalnego sterowania - nacisnij i przytrzymaj dowolny klawisz", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¿àÞÒÕàÚÐ ßãÛìâÐ - ÝÐÖÜØâÕ Ø ãÔÕàÖØâÕ ÛîÑãî ÚÝÞßÚã", #endif }, { "RC5 protocol detected", "RC5-Protokoll erkannt", "", "Rilevato protocollo RC5", "", "", "Protocole RC5 détecté", "", "RC5-yhteyskäytäntö tunnistettu", "Wykryto protokol RC5", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RC5", #endif }, { "RC5 protocol detected (inverted signal)", "RC5-Protokoll erkannt (invertiertes Signal)", "", "Rilevato protocollo RC5 (segnale invertito)", "", "", "Protocole RC5 détecté (signal inversé)", "", "RC5-yhteyskäytäntö tunnistettu (käänteinen signaali)", "Wykryto protokol RC5 (sygnal odwrocony)", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RC5 (á ØÝÒÕàâØàÞÒÐÝØÕÜ áØÓÝÐÛÐ)", #endif }, { "RCMM protocol detected", "RCMM-Protokoll erkannt", "", "Rilevato protocollo RCMM", "", "", "Protocole RCMM détecté", "", "RCMM-yhteyskäytäntö tunnistettu", "Wykryto protokol RCMM", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RCMM", #endif }, { "RCMM protocol detected (inverted signal)", "RCMM-Protokoll erkannt (invertiertes Signal)", "", "Rilevato protocollo RCMM (segnale invertito)", "", "", "Protocole RCMM détecté (signal inversé)", "", "RCMM-yhteyskäytäntö tunnistettu (käänteinen signaali)", "Wykryto protokol RCMM (sygnal odwrocony)", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RCMM (á ØÝÒÕàâØàÞÒÐÝØÕÜ áØÓÝÐÛÐ)", #endif }, { "No remote control detected", "Keine Fernbedienung erkannt", "", "Nessun telecomando rilevato", "", "", "Aucune télécommande détectée", "", "Kaukosäädintä ei tunnistettu", "Nie znaleziono zdalnego sterowania", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¿ãÛìâ ãßàÐÒÛÕÝØï ÝÕ ÞßÞ×ÝÐÝ", #endif }, { "Error uploading keymap", "Fehler beim Laden der Tastenbelegung", "", "Errore caricamento tabella dei tasti", "", "", "Erreur chargement tables de touches", "", "Näppäinkartan lataaminen epäonnistui", "Blad przy przesylaniu mapy klawiszy", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "¾èØÑÚÐ ßàØ ×ÐÓàã×ÚÕ àÐáÚÛÐÔÚØ", #endif }, { "%s: %s", "%s: %s", "", "%s: %s", "", "", "%s: %s", "", "%s: %s", "%s: %s", "", "", "", "", "", "", #if VDRVERSNUM >= 10302 "%s: %s", #endif }, { NULL } }; remote-0.5.0/Makefile0000644000175000017500000001221412066450011014342 0ustar endrissendriss# # Remote Control plugin for the Video Disk Recorder # # Copyright (C) 2002-2010 Oliver Endriss # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html # # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. # By default the main source file also carries this name. PLUGIN = remote ### The version number of this plugin (taken from the main source file): VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') ### The directory environment: # Use package data if installed...otherwise assume we're under the VDR source directory: PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc)) LIBDIR = $(DESTDIR)$(call PKGCFG,libdir) LOCDIR = $(DESTDIR)$(call PKGCFG,locdir) # TMPDIR ?= /tmp ### The compiler options: export CFLAGS = $(call PKGCFG,cflags) export CXXFLAGS = $(call PKGCFG,cxxflags) ### The version number of VDR's plugin API: APIVERSION = $(call PKGCFG,apiversion) ### Backward compatibility stuff ifeq ($(LOCDIR),) ### The C++ compiler and options: CXX ?= g++ CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual ### The directory environment: VDRDIR = ../../.. LIBDIR = ../../lib ### Allow user defined options to overwrite defaults: -include $(VDRDIR)/Make.config ### The version number of VDR's plugin API (taken from VDR's "config.h"): APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) ifeq ($(APIVERSION),) ### Backward compatibility: use version number of VDR! APIVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/config.h) endif LOCDIR = $(VDRDIR)/locale ### Includes and Defines (add further entries here): DEFINES += -D_GNU_SOURCE INCLUDES += -I$(VDRDIR)/include ### Run 'install' for target 'all': all: install ifeq ($(shell grep 'I18N_DEFAULT_LOCALE' $(VDRDIR)/i18n.h),) OLD_I18N = 1 i18n install-i18n: endif endif # compatibility section ### The name of the distribution archive: ARCHIVE = $(PLUGIN)-$(VERSION) PACKAGE = vdr-$(ARCHIVE) ### The name of the shared object file: SOFILE = libvdr-$(PLUGIN).so ### Includes and Defines (add further entries here): DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### optional components DEFINES += -DREMOTE_FEATURE_LIRC DEFINES += -DREMOTE_FEATURE_TCPIP ### The object files (add further files here): OBJS = $(PLUGIN).o OBJS += ttystatus.o ifneq (, $(findstring REMOTE_FEATURE_TCPIP, $(DEFINES))) OBJS += remotetcp.o endif ifneq ($(OLD_I18N),) OBJS += i18n.o endif ### The main target: all: $(SOFILE) i18n ### Implicit rules: %.o: %.c $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< ### Dependencies: MAKEDEP = $(CXX) -MM -MG DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ -include $(DEPFILE) ### Internationalization (I18N): ifeq ($(OLD_I18N),) PODIR = po I18Npo = $(wildcard $(PODIR)/*.po) I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file)))) I18Nmsgs = $(addprefix $(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file)))))) I18Npot = $(PODIR)/$(PLUGIN).pot %.mo: %.po msgfmt -c -o $@ $< $(I18Npot): $(wildcard *.c) xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='' -o $@ `ls $^` %.po: $(I18Npot) msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $< @touch $@ $(I18Nmsgs): $(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo install -D -m644 $< $@ .PHONY: i18n i18n: $(I18Nmo) $(I18Npot) install-i18n: $(I18Nmsgs) endif ### Targets: $(SOFILE): $(OBJS) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ install-lib: $(SOFILE) install -D $^ $(LIBDIR)/$^.$(APIVERSION) install: install-lib install-i18n dist: $(I18Npo) clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @mkdir $(TMPDIR)/$(ARCHIVE) @cp -a * $(TMPDIR)/$(ARCHIVE) @tar czf $(PACKAGE).tgz -C $(TMPDIR) $(ARCHIVE) @-rm -rf $(TMPDIR)/$(ARCHIVE) @echo Distribution package created as $(PACKAGE).tgz clean: @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ env: @echo "Configuration:" @echo " APIVERSION $(APIVERSION)" @echo " CXX $(CXX) CXXFLAGS $(CXXFLAGS)" @echo " VDRDIR $(VDRDIR) LIBDIR $(LIBDIR) LOCDIR $(LOCDIR)" remote-0.5.0/COPYING0000644000175000017500000004310610422170550013742 0ustar endrissendriss GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. remote-0.5.0/po/0000755000175000017500000000000012066517413013332 5ustar endrissendrissremote-0.5.0/po/fr_FR.po0000644000175000017500000000335012066465457014703 0ustar endrissendriss# Remote Control plugin language source file. # Copyright (C) 2007 Oliver Endriss # This file is distributed under the same license as the Remote Control plugin package. # Pierre Briec , 2006 # msgid "" msgstr "" "Project-Id-Version: Remote Control plugin 0.4.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-05-27 17:56+0200\n" "PO-Revision-Date: 2007-10-05 06:58+0200\n" "Last-Translator: Pierre Briec , 2006\n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: remote.c:52 msgid "Remote control" msgstr "Télécommande" #: remote.c:233 remote.c:777 #, c-format msgid "%s: %s" msgstr "%s: %s" #: remote.c:255 msgid "Error uploading keymap" msgstr "Erreur chargement tables de touches" #: remote.c:336 msgid "Press any key to use pre-loaded keymap" msgstr "Appuyez sur une touche pour utiliser un Keymap préchargé" #: remote.c:341 msgid "User-supplied keymap will be used" msgstr "Keymap personnalisé va être utilisé" #: remote.c:347 msgid "Remote control test - press and hold down any key" msgstr "Test télécommande - Appuyer et maintenir une touche enfoncée" #: remote.c:366 msgid "RC5 protocol detected" msgstr "Protocole RC5 détecté" #: remote.c:390 msgid "RC5 protocol detected (inverted signal)" msgstr "Protocole RC5 détecté (signal inversé)" #: remote.c:401 msgid "RCMM protocol detected" msgstr "Protocole RCMM détecté" #: remote.c:412 msgid "RCMM protocol detected (inverted signal)" msgstr "Protocole RCMM détecté (signal inversé)" #: remote.c:420 msgid "No remote control detected" msgstr "Aucune télécommande détectée" remote-0.5.0/po/pl_PL.po0000644000175000017500000000332212066465457014712 0ustar endrissendriss# Remote Control plugin language source file. # Copyright (C) 2007 Oliver Endriss # This file is distributed under the same license as the Remote Control plugin package. # Jakub Wolnicki, 2006 # msgid "" msgstr "" "Project-Id-Version: Remote Control plugin 0.4.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-05-27 17:56+0200\n" "PO-Revision-Date: 2007-10-05 06:58+0200\n" "Last-Translator: Jakub Wolnicki, 2006\n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" #: remote.c:52 msgid "Remote control" msgstr "Zdalne sterowanie" #: remote.c:233 remote.c:777 #, c-format msgid "%s: %s" msgstr "%s: %s" #: remote.c:255 msgid "Error uploading keymap" msgstr "Blad przy przesylaniu mapy klawiszy" #: remote.c:336 msgid "Press any key to use pre-loaded keymap" msgstr "Nacisnij dowolny klawisz, aby uzyc zaladowanej mapy klawiszy" #: remote.c:341 msgid "User-supplied keymap will be used" msgstr "Uzyta zostanie mapa klawiszy, zdefinowana przez uzytkownika" #: remote.c:347 msgid "Remote control test - press and hold down any key" msgstr "Test zdalnego sterowania - nacisnij i przytrzymaj dowolny klawisz" #: remote.c:366 msgid "RC5 protocol detected" msgstr "Wykryto protokol RC5" #: remote.c:390 msgid "RC5 protocol detected (inverted signal)" msgstr "Wykryto protokol RC5 (sygnal odwrocony)" #: remote.c:401 msgid "RCMM protocol detected" msgstr "Wykryto protokol RCMM" #: remote.c:412 msgid "RCMM protocol detected (inverted signal)" msgstr "Wykryto protokol RCMM (sygnal odwrocony)" #: remote.c:420 msgid "No remote control detected" msgstr "Nie znaleziono zdalnego sterowania" remote-0.5.0/po/ru_RU.po0000644000175000017500000000327312066465457014745 0ustar endrissendriss# Remote Control plugin language source file. # Copyright (C) 2007 Oliver Endriss # This file is distributed under the same license as the Remote Control plugin package. # Waldemar Nikel, 2006 # msgid "" msgstr "" "Project-Id-Version: Remote Control plugin 0.4.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-05-27 17:56+0200\n" "PO-Revision-Date: 2007-10-05 06:58+0200\n" "Last-Translator: Waldemar Nikel, 2006\n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-5\n" "Content-Transfer-Encoding: 8bit\n" #: remote.c:52 msgid "Remote control" msgstr "¿ãÛìâ ãßàÐÒÛÕÝØï" #: remote.c:233 remote.c:777 #, c-format msgid "%s: %s" msgstr "%s: %s" #: remote.c:255 msgid "Error uploading keymap" msgstr "¾èØÑÚÐ ßàØ ×ÐÓàã×ÚÕ àÐáÚÛÐÔÚØ" #: remote.c:336 msgid "Press any key to use pre-loaded keymap" msgstr "½ÐÖÜØâÕ ÛîÑãî ÚÝÞßÚã ÔÛï ØáßÞÛì×ÞÒÐÝØï àÐÝÕÕ ×ÐÓàãÖÕÝÞÙ àÐáÚÛÐÔÚØ" #: remote.c:341 msgid "User-supplied keymap will be used" msgstr "±ãÔÕâ ØáßÞÛì×ÞÒÐâìáï àÐáÚÛÐÔÚÐ ßÞÛì×ÞÒÐâÕÛï" #: remote.c:347 msgid "Remote control test - press and hold down any key" msgstr "¿àÞÒÕàÚÐ ßãÛìâÐ - ÝÐÖÜØâÕ Ø ãÔÕàÖØâÕ ÛîÑãî ÚÝÞßÚã" #: remote.c:366 msgid "RC5 protocol detected" msgstr "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RC5" #: remote.c:390 msgid "RC5 protocol detected (inverted signal)" msgstr "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RC5 (á ØÝÒÕàâØàÞÒÐÝØÕÜ áØÓÝÐÛÐ)" #: remote.c:401 msgid "RCMM protocol detected" msgstr "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RCMM" #: remote.c:412 msgid "RCMM protocol detected (inverted signal)" msgstr "¾ßÞ×ÝÐÝ ßàÞâÞÚÞÛ RCMM (á ØÝÒÕàâØàÞÒÐÝØÕÜ áØÓÝÐÛÐ)" #: remote.c:420 msgid "No remote control detected" msgstr "¿ãÛìâ ãßàÐÒÛÕÝØï ÝÕ ÞßÞ×ÝÐÝ" remote-0.5.0/po/de_DE.po0000644000175000017500000000333712066465457014652 0ustar endrissendriss# Remote Control plugin language source file. # Copyright (C) 2007 Oliver Endriss # This file is distributed under the same license as the Remote Control plugin package. # Oliver Endriss , 2002-2007 # msgid "" msgstr "" "Project-Id-Version: Remote Control plugin 0.4.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-05-27 17:56+0200\n" "PO-Revision-Date: 2007-10-05 06:58+0200\n" "Last-Translator: Oliver Endriss , 2002-2007\n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" #: remote.c:52 msgid "Remote control" msgstr "Fernbedienung" #: remote.c:233 remote.c:777 #, c-format msgid "%s: %s" msgstr "%s: %s" #: remote.c:255 msgid "Error uploading keymap" msgstr "Fehler beim Laden der Tastenbelegung" #: remote.c:336 msgid "Press any key to use pre-loaded keymap" msgstr "Taste drücken, um zuvor geladene Keymap zu verwenden" #: remote.c:341 msgid "User-supplied keymap will be used" msgstr "Benutzerdefinierte Keymap wird verwendet" #: remote.c:347 msgid "Remote control test - press and hold down any key" msgstr "Test der Fernbedienung - beliebige Taste gedrückt halten" #: remote.c:366 msgid "RC5 protocol detected" msgstr "RC5-Protokoll erkannt" #: remote.c:390 msgid "RC5 protocol detected (inverted signal)" msgstr "RC5-Protokoll erkannt (invertiertes Signal)" #: remote.c:401 msgid "RCMM protocol detected" msgstr "RCMM-Protokoll erkannt" #: remote.c:412 msgid "RCMM protocol detected (inverted signal)" msgstr "RCMM-Protokoll erkannt (invertiertes Signal)" #: remote.c:420 msgid "No remote control detected" msgstr "Keine Fernbedienung erkannt" remote-0.5.0/po/fi_FI.po0000644000175000017500000000346212066465457014665 0ustar endrissendriss# Remote Control plugin language source file. # Copyright (C) 2007 Oliver Endriss # This file is distributed under the same license as the Remote Control plugin package. # Ville Skyttä , 2004 # msgid "" msgstr "" "Project-Id-Version: Remote Control plugin 0.4.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-05-27 17:56+0200\n" "PO-Revision-Date: 2007-10-05 06:58+0200\n" "Last-Translator: Ville Skyttä , 2004\n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" #: remote.c:52 msgid "Remote control" msgstr "Kaukosäädin" #: remote.c:233 remote.c:777 #, c-format msgid "%s: %s" msgstr "%s: %s" #: remote.c:255 msgid "Error uploading keymap" msgstr "Näppäinkartan lataaminen epäonnistui" #: remote.c:336 msgid "Press any key to use pre-loaded keymap" msgstr "Paina mitä tahansa näppäintä käyttääksesi oletusnäppäinkarttaa" #: remote.c:341 msgid "User-supplied keymap will be used" msgstr "Käytetään käyttäjän määrittelemää näppäinkarttaa" #: remote.c:347 msgid "Remote control test - press and hold down any key" msgstr "Kaukosäädintesti - paina ja pidä alhaalla jotain kaukosäätimen näppäintä" #: remote.c:366 msgid "RC5 protocol detected" msgstr "RC5-yhteyskäytäntö tunnistettu" #: remote.c:390 msgid "RC5 protocol detected (inverted signal)" msgstr "RC5-yhteyskäytäntö tunnistettu (käänteinen signaali)" #: remote.c:401 msgid "RCMM protocol detected" msgstr "RCMM-yhteyskäytäntö tunnistettu" #: remote.c:412 msgid "RCMM protocol detected (inverted signal)" msgstr "RCMM-yhteyskäytäntö tunnistettu (käänteinen signaali)" #: remote.c:420 msgid "No remote control detected" msgstr "Kaukosäädintä ei tunnistettu" remote-0.5.0/po/it_IT.po0000644000175000017500000000305012066465457014712 0ustar endrissendriss# Remote Control plugin language source file. # Copyright (C) 2007 Oliver Endriss # This file is distributed under the same license as the Remote Control plugin package. # Nicola Franchi , 2006 # msgid "" msgstr "" "Project-Id-Version: Remote Control plugin 0.4.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-12-26 02:52+0100\n" "PO-Revision-Date: 2007-12-29 02:22+0100\n" "Last-Translator: Gringo \n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-15\n" "Content-Transfer-Encoding: 8bit\n" msgid "Remote control" msgstr "Telecomando" #, c-format msgid "%s: %s" msgstr "%s: %s" msgid "Error uploading keymap" msgstr "Errore caricamento tabella dei tasti" msgid "Press any key to use pre-loaded keymap" msgstr "Premi un tasto per usare una tabella dei tasti precaricata" msgid "User-supplied keymap will be used" msgstr "Verrà usata una mappa dei tasti fornita dall'utente" msgid "Remote control test - press and hold down any key" msgstr "Prova telecomando - premi e tieni premuto un tasto" msgid "RC5 protocol detected" msgstr "Rilevato protocollo RC5" msgid "RC5 protocol detected (inverted signal)" msgstr "Rilevato protocollo RC5 (segnale invertito)" msgid "RCMM protocol detected" msgstr "Rilevato protocollo RCMM" msgid "RCMM protocol detected (inverted signal)" msgstr "Rilevato protocollo RCMM (segnale invertito)" msgid "No remote control detected" msgstr "Nessun telecomando rilevato" remote-0.5.0/README0000644000175000017500000001644512066463304013605 0ustar endrissendrissremote - Remote Control plugin for the Video Disk Recorder (VDR) ================================================================ Version: 0.5.0 Written by: Oliver Endriss 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) Distributed under GPL, see the file COPYING for license information. Description: ------------ This plugin extends the remote control capabilities of vdr. 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 TT DVB-S2 6400 (HD full-featured card). - Built-in remote control port of the av711x-based DVB cards (SD full-featured cards), e.g. DVB-S Nexus. - Remote control port of some budget cards, e.g. Nova-CI. - Other input devices. See file FAQ for a list of cards which have been reported to work. (b) keyboard (tty driver): /dev/console, /dev/ttyX (c) TCP connection (telnet) (d) LIRC Notes: [1] supported by DVB and dvb-kernel [2] supported by dvb-kernel only Installation: ------------- The Remote Control plugin is installed the same way as any other plugin: - cd VDR/PLUGINS/src - tar xfz vdr-remote-0.5.0.tgz - ln -s remote-0.5.0 remote - cd ../.. - make plugins Edit runvdr (or whatever script you use) to load the Remote Control plugin, e.g. vdr -Premote will start the Remote Control plugin using default (autodetect) mode. Key Learning: ------------- When a remote control device is used for the first time, vdr will enter key learning mode. Please follow the instructions on the OSD carefully! For full-featured cards, you will be asked whether you want to use an user-defined keymap. This keymap must be loaded with av7110_loadkeys - *after* the driver has been loaded and - *before* vdr has been started. This way you can use your old keymaps if you are upgrading an existing installation. Most people don't want to do this, and won't press a key here! If you don't care about keymaps (or don't even know what a keymap is ;-), the Remote Control plugin will now try to autodetect the remote control. It will load a one-for-all keymap and detect protocol type and device address. Please see note [3] below! You will be prompted to press and hold down any key. It is *important* to keep the key pressed until there is a OSD message that - protocol ... has been detected or - no remote control could be detected. Note that the remote control transmitter can be detected only, if it uses a infrared protocol supported by the receiver hardware. The receivers of the Nexus cards support the RC5 protocol, which is supported by virtually all universal remote controls (try 'Philips' codes). After key learning, entries like these will be added to the remote.conf file: ... remote-event0._Setup /proc/av7110_ir 00000000 18 remote-event0.Up 0000000100010021 remote-event0.Down 0000000100010022 remote-event0.Menu 0000000100010024 ... If you have to re-learn keys, edit remote.conf and delete these lines. (If you delete the file remote.conf, you have to repeat key learning for all remote controls.) Notes: [3] There is a restriction: By default, /proc/av7110 is owned by root with permissions -rw-r-r- (0644). Therefore, the new autodetect feature can be used only, - if vdr runs as root or - if you are running kernel 2.6.10.7 or later: Use chown/chmod to set ownership/permissions. For example, add chown $VDRUSR /proc/av7110_ir to your runvdr script (after loading the driver). or - if the driver has been patched using the patch in directory 'misc': cd DVB/driver/av7110 patch < av7110_ir-permission-666-kernel-2.4.diff The patch will change permissions of /proc/av7110_ir to 666, so any user may load new keymaps. (Don't install the patch if you consider loading keymaps a security risc.) After applying the patch the driver has to be recompiled. DVB and dvb-kernel driver (version 1.0.x "DVB", version 1.1.x "dvb-kernel") --------------------------------------------------------------------------- Remote control events are passed through '/device/input/eventX'. (Since the /dev/input protocol is standardized in the kernel, there is a chance that this plugin will work with other /dev/input devices, too. However, this has not been tested yet...) The -i option allows you to specify the name of the /dev/input device. Before submitting a bug report, please verify that driver and remote control are working properly. You may do this using the 'evtest' tool supplied with the driver (directory 'DVB/apps/av7110_loadkeys' or 'DVB-APPS/util/av7110_loadkeys'). Verify that the device node exists and you have read access rights. For testing or if you want to build your own keymap: You have to select the correct protocol type, inversion setting and keymap using the tool 'av7110_loadkeys'. Please read the file README in the directory 'DVB/apps/av7110_loadkeys' or 'DVB-APPS/util/av7110_loadkeys'. If you still have problems, have a look on the checklist in file 'FAQ'. TTY devices ----------- The -t option may be used to specify a virtual console as an input device. This is useful, if you haven't compiled keyboard support into your VDR. Option -T does the same, plus displays a simple 'OSD' on the terminal. Note that this is _not_ the real OSD. Information supplied by the cStatus class is used to create a display which looks _like_ the OSD. Please don't complain if some features don't work. For example, the screens for remote control/keyboard learning cannot be displayed on this kind of OSD. There are probably some display errors, too. TCP connection (telnet) ----------------------- Option -p can be used to control vdr over one or more TCP ports. Access restrictions apply as specified in svdrphosts.conf (see 'man 5 vdr'). Otherwise, behaviour should be the same as remote control type -T. LIRC ---- The LIRC remote control (option '-l') just starts the LIRC code of vdr. Please note that I do not use LIRC and cannot provide any support. Summary of command line options: -------------------------------- -i dev, --input=dev select device which supports the /dev/input protocol -l dev, --lirc=dev select LIRC device -t dev, --tty=dev select terminal device -T dev, --TTY=dev select terminal device with 'OSD' -p tcp:n, --port=tcp:n select connection on tcp port Examples: --------- vdr -Premote vdr -P"remote -i autodetect" Try to autodetect device '/dev/input/eventX' (X = 0,1,2,...). If no device can be identified, '-i /dev/input/ir' is used. vdr -P"remote -i /dev/input/event2" use specified input device '/dev/input/event2' vdr -P"remote -i /dev/input/by-path/pci-0000:02:06.0--event-ir" select input device by pci slot (udev support required) vdr -P"remote -l /dev/lircd" select LIRC remote control 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 Have fun, Oliver remote-0.5.0/misc/0000755000175000017500000000000011101407231013630 5ustar endrissendrissremote-0.5.0/misc/remote.conf.tcp33330000644000175000017500000000273010701704552017110 0ustar endrissendrissremote-tcp:3333.Up 0000000000415B1B remote-tcp:3333.Down 0000000000425B1B remote-tcp:3333.Menu 000000007E315B1B remote-tcp:3333.Ok 000000000000000D remote-tcp:3333.Back 000000007E345B1B remote-tcp:3333.Left 0000000000445B1B remote-tcp:3333.Right 0000000000435B1B remote-tcp:3333.Red 00000000415B5B1B remote-tcp:3333.Green 00000000425B5B1B remote-tcp:3333.Yellow 00000000435B5B1B remote-tcp:3333.Blue 00000000445B5B1B remote-tcp:3333.0 0000000000000030 remote-tcp:3333.1 0000000000000031 remote-tcp:3333.2 0000000000000032 remote-tcp:3333.3 0000000000000033 remote-tcp:3333.4 0000000000000034 remote-tcp:3333.5 0000000000000035 remote-tcp:3333.6 0000000000000036 remote-tcp:3333.7 0000000000000037 remote-tcp:3333.8 0000000000000038 remote-tcp:3333.9 0000000000000039 remote-tcp:3333.Channel+ 000000007E355B1B remote-tcp:3333.Channel- 000000007E365B1B remote-tcp:3333.Volume+ 000000007E325B1B remote-tcp:3333.Volume- 000000007E335B1B remote-tcp:3333.User1 00000000455B5B1B remote-tcp:3333.User2 0000007E37315B1B remote-tcp:3333.User3 0000007E38315B1B remote-tcp:3333.User4 0000007E39315B1B remote-tcp:3333.User5 0000007E30325B1B remote-tcp:3333.User6 0000007E31325B1B remote-tcp:3333.User7 0000007E33325B1B remote-tcp:3333.User8 0000007E34325B1B remote-tcp:3333.User9 0000000000505B1B remote-0.5.0/misc/runvdr.remote0000644000175000017500000000232210007056666016404 0ustar endrissendriss#!/bin/sh # runvdr: Loads the DVB driver and runs VDR # # If VDR exits abnormally, the driver will be reloaded # and VDR restarted. # # Set the environment variable VDRUSR to the user id you # want VDR to run with. If VDRUSR is not set, VDR will run # as 'root', which is not necessarily advisable. # # Since this script loads the DVB driver, it must be started # as user 'root'. # # Any command line parameters will be passed on to the # actual 'vdr' program. # # See the main source file 'vdr.c' for copyright information and # how to reach the author. DVBDIR="../DVB/driver" DVBREM="$DVBDIR/../apps/av7110_loadkeys" VDRPRG="./vdr" VDRCMD="$VDRPRG -w 60 -Premote $*" LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`" KILL="/usr/bin/killall -q -TERM" # Load driver if it hasn't been loaded already: if [ $LSMOD -eq 0 ] ; then (cd $DVBDIR; make insmod) fi while (true) do # next line is _not_ required if autodetect mode is used $DVBREM/av7110_loadkeys $DVBREM/hauppauge.rc5 > /proc/av7110_ir su $VDRUSR -c "$VDRCMD" if test $? -eq 0 -o $? -eq 2; then exit; fi date echo "restarting VDR" $KILL $VDRPRG sleep 10 (cd $DVBDIR; make rmmod; make insmod) date done remote-0.5.0/misc/av7110_ir-permission-666-kernel-2.4.diff0000644000175000017500000000066207742113366022406 0ustar endrissendriss--- av7110_ir.c.org Wed May 21 16:11:17 2003 +++ av7110_ir.c Fri Oct 10 21:07:49 2003 @@ -185,7 +185,7 @@ int __init av7110_ir_init (void) av7110_setup_irc_config (NULL, 0x0001); av7110_register_irc_handler (av7110_emit_key); - e = create_proc_entry ("av7110_ir", S_IFREG | S_IRUGO | S_IWUSR, NULL); + e = create_proc_entry ("av7110_ir", S_IFREG | S_IRUGO | S_IWUGO, NULL); if (e) { e->write_proc = av7110_ir_write_proc; remote-0.5.0/misc/remote.conf.tcp3333.readme0000644000175000017500000000353311013441200020327 0ustar endrissendrissKey mapping for telnet over TCP port 3333 ========================================= Note: This works for telnet started from a linux _console_. vdr key code keyboard --------------------------------------------------------- remote-tcp:3333.Up 0000000000415B1B up remote-tcp:3333.Down 0000000000425B1B down remote-tcp:3333.Menu 000000007E315B1B home remote-tcp:3333.Ok 000000000000000D return remote-tcp:3333.Back 000000007E345B1B end remote-tcp:3333.Left 0000000000445B1B left remote-tcp:3333.Right 0000000000435B1B right remote-tcp:3333.Red 00000000415B5B1B F1 remote-tcp:3333.Green 00000000425B5B1B F2 remote-tcp:3333.Yellow 00000000435B5B1B F3 remote-tcp:3333.Blue 00000000445B5B1B F4 remote-tcp:3333.0 0000000000000030 0 remote-tcp:3333.1 0000000000000031 1 remote-tcp:3333.2 0000000000000032 2 remote-tcp:3333.3 0000000000000033 3 remote-tcp:3333.4 0000000000000034 4 remote-tcp:3333.5 0000000000000035 5 remote-tcp:3333.6 0000000000000036 6 remote-tcp:3333.7 0000000000000037 7 remote-tcp:3333.8 0000000000000038 8 remote-tcp:3333.9 0000000000000039 9 remote-tcp:3333.Channel+ 000000007E355B1B page up remote-tcp:3333.Channel- 000000007E365B1B page down remote-tcp:3333.Volume+ 000000007E325B1B ins remote-tcp:3333.Volume- 000000007E335B1B del remote-tcp:3333.User1 00000000455B5B1B F5 remote-tcp:3333.User2 0000007E37315B1B F6 remote-tcp:3333.User3 0000007E38315B1B F7 remote-tcp:3333.User4 0000007E39315B1B F8 remote-tcp:3333.User5 0000007E30325B1B F9 remote-tcp:3333.User6 0000007E31325B1B F10 remote-tcp:3333.User7 0000007E33325B1B F11 remote-tcp:3333.User8 0000007E34325B1B F12 remote-tcp:3333.User9 0000000000505B1B pause remote-0.5.0/misc/av7110_ir-permission-666-kernel-2.6.diff0000644000175000017500000000072010031664036022371 0ustar endrissendriss--- av7110_ir.c.orig Mon Mar 29 01:58:31 2004 +++ av7110_ir.c Mon Mar 29 02:03:51 2004 @@ -188,7 +188,7 @@ int __init av7110_ir_init(void) av7110_setup_irc_config(NULL, 0x0001); av7110_register_irc_handler(av7110_emit_key); - e = create_proc_entry("av7110_ir", S_IFREG | S_IRUGO | S_IWUSR, NULL); + e = create_proc_entry("av7110_ir", S_IFREG | S_IRUGO | S_IWUGO, NULL); if (e) { e->write_proc = av7110_ir_write_proc; e->size = 4 + 256 * sizeof(u16); remote-0.5.0/misc/remote.conf.event20000644000175000017500000000164610701704462017216 0ustar endrissendrissremote-event2._Setup /proc/av7110_ir 00008000 0 remote-event2.Up 0000000100010021 remote-event2.Down 0000000100010022 remote-event2.Menu 000000010001000E remote-event2.Ok 000000010001002F remote-event2.Back 0000000100010023 remote-event2.Left 0000000100010012 remote-event2.Right 0000000100010011 remote-event2.Red 0000000100010010 remote-event2.Green 000000010001000D remote-event2.Yellow 000000010001001F remote-event2.Blue 0000000100010027 remote-event2.0 0000000100010001 remote-event2.1 0000000100010002 remote-event2.2 0000000100010003 remote-event2.3 0000000100010004 remote-event2.4 0000000100010005 remote-event2.5 0000000100010006 remote-event2.6 0000000100010007 remote-event2.7 0000000100010008 remote-event2.8 0000000100010009 remote-event2.9 000000010001000A remote-0.5.0/misc/kernel-2.4-keybdev-patch.diff0000644000175000017500000000062407742523302021007 0ustar endrissendriss--- keybdev.c.org Thu Jun 26 00:10:52 2003 +++ keybdev.c Mon Oct 13 13:58:45 2003 @@ -191,6 +191,9 @@ static struct input_handle *keybdev_conn if (i == BTN_MISC) return NULL; + if (dev->name[0]=='D' && dev->name[1]=='V' && dev->name[2] == 'B') + return NULL; + if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL))) return NULL; memset(handle, 0, sizeof(struct input_handle)); remote-0.5.0/misc/remote.conf.tty100000644000175000017500000000244010701704650016764 0ustar endrissendrissremote-tty10.Up 0000000000415B1B remote-tty10.Down 0000000000425B1B remote-tty10.Menu 000000007E315B1B remote-tty10.Ok 000000000000000A remote-tty10.Back 000000007E345B1B remote-tty10.Left 0000000000445B1B remote-tty10.Right 0000000000435B1B remote-tty10.Red 00000000415B5B1B remote-tty10.Green 00000000425B5B1B remote-tty10.Yellow 00000000435B5B1B remote-tty10.Blue 00000000445B5B1B remote-tty10.0 0000000000000030 remote-tty10.1 0000000000000031 remote-tty10.2 0000000000000032 remote-tty10.3 0000000000000033 remote-tty10.4 0000000000000034 remote-tty10.5 0000000000000035 remote-tty10.6 0000000000000036 remote-tty10.7 0000000000000037 remote-tty10.8 0000000000000038 remote-tty10.9 0000000000000039 remote-tty10.Power 000000000000001B remote-tty10.Channel+ 000000007E355B1B remote-tty10.Channel- 000000007E365B1B remote-tty10.Volume+ 000000000000002A remote-tty10.Volume- 000000000000002F remote-tty10.Mute 000000007E325B1B remote-tty10.User5 00000000455B5B1B remote-tty10.User6 0000007E37315B1B remote-tty10.User7 0000007E38315B1B remote-tty10.User8 0000007E39315B1B remote-tty10.User9 0000007E30325B1B remote-0.5.0/CONTRIBUTORS0000644000175000017500000000221312066452257014576 0ustar endrissendrissSpecial thanks go to the following individuals (if your name is missing here, please send an email to the plugin author): Frank Krömmelbein for reporting that the tcp remote control is causing high cpu load Mike Gratsas for fixing the LIRC remote control code Ville Skyttä for translating OSD texts to the Finnish language Ronny Kornexl for reporting that cTtyStatus::Recording() and cTtyStatus::Replaying() may cause a segfault due to missing null-pointer checks Pierre Briec for translating OSD texts to the French language Nicola Franchi for translating OSD texts to the Italian language Jakub Wolnicki for translating OSD texts to the Polish language Waldemar Nikel for translating OSD texts to the Russian language Joachim Selinger for suggesting to implement selection of the input device by path. Tobias Grimm tobias dot grimm at e-tobi dot net for providing a better gettext detection using i18n.h. remote-0.5.0/remotetcp.c0000644000175000017500000000505612066453760015074 0ustar endrissendriss/* * Remote Control plugin for the Video Disk Recorder * * remotetcp.c: tcp/telnet remote control * * Copyright (C) 2002-2012 Oliver Endriss * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Or, point your browser to http://www.gnu.org/licenses/old-licenses/gpl-2.0.html */ #include "remote.h" #include "remotetcp.h" cTcpRemote::cTcpRemote(const char *name, int f, char *d) : cRemoteDevTty(name, f, d) { cstatus = NULL; csock = NULL; Start(); } cTcpRemote::~cTcpRemote() { Cancel(); if (cstatus) { delete cstatus; cstatus = NULL; } if (fh != -1) close(fh); if (csock) delete csock; } uint64_t cTcpRemote::getKey(void) { if (csock == NULL) { int port; sscanf (device, "tcp:%d", &port); csock = new cSocket(port); if (! csock) { esyslog("error creating socket"); Cancel(); } if (! csock->Open()) { esyslog("error opening socket"); Cancel(); } } while (fh < 0) { usleep(100000); fh = csock->Accept(); if (fh >= 0) { char str[80]; // hack for telnet sprintf(str, "%c%c%c", 255,251,1); // WILL ECHO write(fh, str, strlen(str)); sprintf(str, "%c%c%c", 255,251,3); // WILL SGA write(fh, str, strlen(str)); sprintf(str, "VDR Remote Plugin - %s\n\r", device); write(fh, str, strlen(str)); // skip telnet stuff read(fh, str, sizeof str); cstatus = new cTtyStatus(fh); } } uint64_t key = cRemoteDevTty::getKey(); if (key == INVALID_KEY) { if (cstatus) { delete cstatus; cstatus = NULL; } close(fh); fh = -1; } return key; }