summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-11-24 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-11-24 18:00:00 +0100
commitfe9499ba901f5c32dd0b3841a2b6e599fefc144f (patch)
tree3a9efdef4b928aeffea51fc36a011ef367c14b21 /vdr.c
parent8b5d4040832f9a11119002fef5144a7d6705f19c (diff)
downloadvdr-patch-lnbsharing-fe9499ba901f5c32dd0b3841a2b6e599fefc144f.tar.gz
vdr-patch-lnbsharing-fe9499ba901f5c32dd0b3841a2b6e599fefc144f.tar.bz2
Version 1.1.17vdr-1.1.17
- Added new entries to 'ca.conf'. - Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this one). - Added more examples to 'diseqc.conf' (thanks to Oliver Endriss). - Fixed disabling multiple recordings on a single DVB card (comment out the definition of the macros DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and DO_MULTIPLE_RECORDINGS in dvbdevice.c). - Plugins can now have their very own OSD setup in the object they return from a call to cPlugin::MainMenuAction(). In order to implement this, the return type of cPlugin::MainMenuAction() had to be changed from (cOsdMenu *) to (cOsdObject *). So in case you are compiling an existing plugin with this version of VDR and you get an error message, simply change cOsdMenu to cOsdObject in the plugin's source for the MainMenuAction() function. Plugin authors who have so far (ab)used the cControl mechanism to implement their own raw OSD should take a look at the new demo plugin 'osddemo'. It implements a very primitive game that shows how a plugin can have its own raw OSD. Especially look into cLineGame and see how it implements the Show() function. See also the chapter on "User interaction" in PLUGINS.html. - Added three new fields to the lines in 'channels.conf': NID, TID and RID. NID and TID are the Network and Transport Stream IDs, respectively. RID is an additional ID that can be used to tell apart channels that would otherwise be indistinguishable. This is typically the case with radio channels, which may have the same NID, TID and SID, but different "radio IDs". This new field is therefore called RID ("radio ID"). Currently NID and TID are not yet used by VDR and should always be 0. The RID is actually used when building the "unique channel ID", so if you have channels in your 'channels.conf' file that cause error messages when loading, you can set the RIDs of these channels to different values. When reading an old 'channels.conf' these new fields will be automatically initialized to 0 and once the file is written back to disk they will be appended to the channel definitions. Thanks to Régis Bossut for pointing out that with some providers the channels can only be distinguished through the RID. - The "unique channel ID" now contains an optional 5th part (the RID). See man vdr(5). - Updated 'channels.conf.cable' and made some channels unique using the new RID (thanks to Andreas Kool for pointing out the problems). - Made some channels unique in 'channels.conf.terr' using the new RID. - Extended the '-l' option to allow logging to LOG_LOCALn (n=0..7) by writing, for instance, '-l 3.7' (suggested by Jürgen Schmidt). - Now deleting stale lock files if they have a time stamp that is outside the window 'now +/- LOCKFILESTALETIME'. This improves things in cases where the system time makes far jumps, so that a lock file might end up with a time stamp that lies in the distant future (thanks to Oliver Endriss).
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c45
1 files changed, 34 insertions, 11 deletions
diff --git a/vdr.c b/vdr.c
index 1285ae7..d27f302 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.132 2002/11/03 13:54:39 kls Exp $
+ * $Id: vdr.c 1.134 2002/11/24 15:50:16 kls Exp $
*/
#include <getopt.h>
@@ -93,6 +93,7 @@ int main(int argc, char *argv[])
bool DisplayHelp = false;
bool DisplayVersion = false;
bool DaemonMode = false;
+ int SysLogTarget = LOG_USER;
bool MuteAudio = false;
int WatchdogTimeout = DEFAULTWATCHDOG;
const char *Terminal = NULL;
@@ -142,15 +143,31 @@ int main(int argc, char *argv[])
break;
case 'h': DisplayHelp = true;
break;
- case 'l': if (isnumber(optarg)) {
- int l = atoi(optarg);
- if (0 <= l && l <= 3) {
- SysLogLevel = l;
- break;
- }
- }
+ case 'l': {
+ char *p = strchr(optarg, '.');
+ if (p)
+ *p = 0;
+ if (isnumber(optarg)) {
+ int l = atoi(optarg);
+ if (0 <= l && l <= 3) {
+ SysLogLevel = l;
+ if (!p)
+ break;
+ if (isnumber(p + 1)) {
+ int l = atoi(optarg);
+ if (0 <= l && l <= 7) {
+ int targets[] = { LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7 };
+ SysLogTarget = targets[l];
+ break;
+ }
+ }
+ }
+ }
+ if (p)
+ *p = '.';
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
return 2;
+ }
break;
case 'L': if (access(optarg, R_OK | X_OK) == 0)
PluginManager.SetDirectory(optarg);
@@ -182,8 +199,7 @@ int main(int argc, char *argv[])
while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/')
optarg[strlen(optarg) - 1] = 0;
break;
- case 'w': if (isnumber(optarg)) {
- int t = atoi(optarg);
+ case 'w': if (isnumber(optarg)) { int t = atoi(optarg);
if (t >= 0) {
WatchdogTimeout = t;
break;
@@ -219,6 +235,8 @@ int main(int argc, char *argv[])
" -l LEVEL, --log=LEVEL set log level (default: 3)\n"
" 0 = no logging, 1 = errors only,\n"
" 2 = errors and info, 3 = errors, info and debug\n"
+ " if logging should be done to LOG_LOCALn instead of\n"
+ " LOG_USER, add '.n' to LEVEL, as in 3.7 (n=0..7)\n"
" -L DIR, --lib=DIR search for plugins in DIR (default is %s)\n"
" -m, --mute mute audio of the primary DVB device at startup\n"
" -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n"
@@ -264,7 +282,7 @@ int main(int argc, char *argv[])
// Log file:
if (SysLogLevel > 0)
- openlog("vdr", LOG_PID | LOG_CONS, LOG_USER);
+ openlog("vdr", LOG_PID | LOG_CONS, SysLogTarget);
// Check the video directory:
@@ -551,6 +569,11 @@ int main(int argc, char *argv[])
Interface->Info(tr("Switching primary DVB..."));
cDevice::SetPrimaryDevice(Setup.PrimaryDVB);
break;
+ case osPlugin: DELETENULL(Menu);
+ Menu = Temp = cMenuMain::PluginOsdObject();
+ if (Menu)
+ Menu->Show();
+ break;
case osBack:
case osEnd: if (Interact == Menu)
DELETENULL(Menu);