mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
VDR developer version 1.7.37 is now available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.37.tar.bz2 A 'diff' against the previous version is available at ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.36-1.7.37.diff MD5 checksums: 602dc7e678bcfcf075da36344a337562 vdr-1.7.37.tar.bz2 34e953fcffc112f316cbfc1f53915324 vdr-1.7.36-1.7.37.diff WARNING: ======== This is a developer version. Even though I use it in my productive environment. I strongly recommend that you only use it under controlled conditions and for testing and debugging. Approaching version 2.0.0: ========================== If all goes well, there should be no more functional or API changes before the final version 2.0.0. There will just be a few more fixes. From the HISTORY file: - Now also using FindHeader() in cMpeg2Fixer::AdjTref() (pointed out by Sören Moch). - Added missing template for DVBDIR to Make.config.template (reported by Derek Kelly). - The LCARS menu now also works if the OSD has only 1bpp (two colors). - Fixed possible garbage in the remaining time of the LCARS replay display in case the hours change from two to one digit. - Fixed upscaling bitmaps. The last row and column of the scaled bitmap was not filled, which resulted in empty lines between scaled subtitles. - Fixed a leftover line in case a two line subtitle was followed by a one line subtitle on the dvbhddevice in "high level" OSD mode. - Returning 0 from cDvbSdFfDevice::NumProvidedSystems() if option --outputonly is given. - The index file is now closed after initially reading it if it is older than 3600 seconds. - Improved responsiveness during replay when close to the recording's end. - Fixed a leftover progress display in the LCARS main menu when replay of a recording ends while the menu is open, and the live channel has no EPG information. - Fixed possible audio chatter when a recording is replayed to its very end. - Added dependency on 'i18n' to 'install-i18n' in the VDR Makefile (thanks to Tobias Grimm). - Changed several calls to Skins.Message() in vdr.c to Skins.QueueMessage() in order to avoid a black screen while such a message is displayed in case the channel will be switched (reported by Uwe Scheffler). - Updated the Slovakian language texts (thanks to Milan Hrala). - Improved LIRC timing for repeat function. - When pausing live video, the current audio and subtitle tracks are now retained. - Added some notes about plugin Makefiles to PLUGINS.html. - Avoiding an extra key press event if the repeat function kicks in when controlling VDR via the PC keyboard. - The new options "Setup/Miscellaneous/Remote control repeat delay" and "Setup/Miscellaneous/Remote control repeat delta" can be used to adjust the behavior of the remote control in case a key is held pressed down for a while, so that the repeat function kicks in (see MANUAL). The builtin LIRC and KBD remote controls already use these parameters. It is recommended that plugins that implement an interface to any kind of remote controls also use the parameters Setup.RcRepeatDelay and Setup.RcRepeatDelta for the desired purpose, and remove any setup options they might have that serve the same purpose. - cTimer no longer does any special "VFAT" handling to shorten directory names to 40 characters. When a string is used as a directory name for a recording, the maximum length of the directory path, as well as the individual directory names, is now limited to the values specified by the new command line option --dirnames (see man vdr(1) for details). For backwards compatibility the option --vfat is still available and has the same effect as --dirnames=250,40,1. - The macro MaxFileName is now obsolete and may be removed in future versions. Use NAME_MAX directly instead. - There is no more fixed limit to the maximum number of cPixmap objects an OSD can create. However, a particular device may still be unable to create an arbitrary number of pixmaps, due to limited resources. So it's always a good idea to use as few pixmaps as possible. - Fixed formatting and removed some superfluous break statements in vdr.c's command line option switch.
124 lines
3.5 KiB
C++
124 lines
3.5 KiB
C++
/*
|
|
* remote.h: General Remote Control handling
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: remote.h 2.1 2013/02/03 14:34:56 kls Exp $
|
|
*/
|
|
|
|
#ifndef __REMOTE_H
|
|
#define __REMOTE_H
|
|
|
|
#include <stdio.h>
|
|
#include <termios.h>
|
|
#include <time.h>
|
|
#include "keys.h"
|
|
#include "thread.h"
|
|
#include "tools.h"
|
|
|
|
class cRemote : public cListObject {
|
|
private:
|
|
enum { MaxKeys = 2 * MAXKEYSINMACRO };
|
|
static eKeys keys[MaxKeys];
|
|
static int in;
|
|
static int out;
|
|
static cTimeMs repeatTimeout;
|
|
static cRemote *learning;
|
|
static char *unknownCode;
|
|
static cMutex mutex;
|
|
static cCondVar keyPressed;
|
|
static time_t lastActivity;
|
|
static const char *keyMacroPlugin;
|
|
static const char *callPlugin;
|
|
static bool enabled;
|
|
char *name;
|
|
protected:
|
|
cRemote(const char *Name);
|
|
const char *GetSetup(void);
|
|
void PutSetup(const char *Setup);
|
|
bool Put(uint64_t Code, bool Repeat = false, bool Release = false);
|
|
bool Put(const char *Code, bool Repeat = false, bool Release = false);
|
|
public:
|
|
virtual ~cRemote();
|
|
virtual bool Ready(void) { return true; }
|
|
virtual bool Initialize(void);
|
|
const char *Name(void) { return name; }
|
|
static void SetLearning(cRemote *Learning) { learning = Learning; }
|
|
static bool IsLearning() { return learning != NULL; }
|
|
static bool Enabled(void) { return enabled; }
|
|
static void SetEnabled(bool Enabled) { enabled = Enabled; }
|
|
static void Clear(void);
|
|
static bool Put(eKeys Key, bool AtFront = false);
|
|
static bool PutMacro(eKeys Key);
|
|
static bool CallPlugin(const char *Plugin);
|
|
///< Initiates calling the given plugin's main menu function.
|
|
///< The Plugin parameter is the name of the plugin, and must be
|
|
///< a static string. Returns true if the plugin call was successfully
|
|
///< initiated (the actual call to the plugin's main menu function
|
|
///< will take place some time later, during the next execution
|
|
///< of VDR's main loop). If there is already a plugin call pending
|
|
///< false will be returned and the caller should try again later.
|
|
static const char *GetPlugin(void);
|
|
///< Returns the name of the plugin that was set with a previous
|
|
///< call to PutMacro() or CallPlugin(). The internally stored pointer to the
|
|
///< plugin name will be reset to NULL by this call.
|
|
static bool HasKeys(void);
|
|
static eKeys Get(int WaitMs = 1000, char **UnknownCode = NULL);
|
|
static time_t LastActivity(void) { return lastActivity; }
|
|
///< Absolute time when last key was delivered by Get().
|
|
static void TriggerLastActivity(void);
|
|
///< Simulates user activity, for instance to keep the current menu open
|
|
///< even if no remote control key has been pressed.
|
|
};
|
|
|
|
class cRemotes : public cList<cRemote> {};
|
|
|
|
extern cRemotes Remotes;
|
|
|
|
enum eKbdFunc {
|
|
kfNone,
|
|
kfF1 = 0x100,
|
|
kfF2,
|
|
kfF3,
|
|
kfF4,
|
|
kfF5,
|
|
kfF6,
|
|
kfF7,
|
|
kfF8,
|
|
kfF9,
|
|
kfF10,
|
|
kfF11,
|
|
kfF12,
|
|
kfUp,
|
|
kfDown,
|
|
kfLeft,
|
|
kfRight,
|
|
kfHome,
|
|
kfEnd,
|
|
kfPgUp,
|
|
kfPgDown,
|
|
kfIns,
|
|
kfDel,
|
|
};
|
|
|
|
class cKbdRemote : public cRemote, private cThread {
|
|
private:
|
|
static bool kbdAvailable;
|
|
static bool rawMode;
|
|
struct termios savedTm;
|
|
virtual void Action(void);
|
|
int ReadKey(void);
|
|
uint64_t ReadKeySequence(void);
|
|
int MapCodeToFunc(uint64_t Code);
|
|
void PutKey(uint64_t Code, bool Repeat = false, bool Release = false);
|
|
public:
|
|
cKbdRemote(void);
|
|
virtual ~cKbdRemote();
|
|
static bool KbdAvailable(void) { return kbdAvailable; }
|
|
static uint64_t MapFuncToCode(int Func);
|
|
static void SetRawMode(bool RawMode);
|
|
};
|
|
|
|
#endif //__REMOTE_H
|