From fe9499ba901f5c32dd0b3841a2b6e599fefc144f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 24 Nov 2002 18:00:00 +0100 Subject: =?UTF-8?q?Version=201.1.17=20-=20Added=20new=20entries=20to=20'ca?= =?UTF-8?q?.conf'.=20-=20Fixed=20closing=20unused=20PID=20handles=20(thank?= =?UTF-8?q?s=20to=20Stefan=20Schluenss=20for=20reporting=20this=20=20=20on?= =?UTF-8?q?e).=20-=20Added=20more=20examples=20to=20'diseqc.conf'=20(thank?= =?UTF-8?q?s=20to=20Oliver=20Endriss).=20-=20Fixed=20disabling=20multiple?= =?UTF-8?q?=20recordings=20on=20a=20single=20DVB=20card=20(comment=20out?= =?UTF-8?q?=20the=20definition=20=20=20of=20the=20macros=20DO=5FREC=5FAND?= =?UTF-8?q?=5FPLAY=5FON=5FPRIMARY=5FDEVICE=20and=20DO=5FMULTIPLE=5FRECORDI?= =?UTF-8?q?NGS=20in=20=20=20dvbdevice.c).=20-=20Plugins=20can=20now=20have?= =?UTF-8?q?=20their=20very=20own=20OSD=20setup=20in=20the=20object=20they?= =?UTF-8?q?=20return=20from=20=20=20a=20call=20to=20cPlugin::MainMenuActio?= =?UTF-8?q?n().=20In=20order=20to=20implement=20this,=20the=20return=20typ?= =?UTF-8?q?e=20=20=20of=20cPlugin::MainMenuAction()=20had=20to=20be=20chan?= =?UTF-8?q?ged=20from=20(cOsdMenu=20*)=20to=20(cOsdObject=20*).=20=20=20So?= =?UTF-8?q?=20in=20case=20you=20are=20compiling=20an=20existing=20plugin?= =?UTF-8?q?=20with=20this=20version=20of=20VDR=20and=20you=20=20=20get=20a?= =?UTF-8?q?n=20error=20message,=20simply=20change=20cOsdMenu=20to=20cOsdOb?= =?UTF-8?q?ject=20in=20the=20plugin's=20source=20=20=20for=20the=20MainMen?= =?UTF-8?q?uAction()=20function.=20=20=20Plugin=20authors=20who=20have=20s?= =?UTF-8?q?o=20far=20(ab)used=20the=20cControl=20mechanism=20to=20implemen?= =?UTF-8?q?t=20their=20=20=20own=20raw=20OSD=20should=20take=20a=20look=20?= =?UTF-8?q?at=20the=20new=20demo=20plugin=20'osddemo'.=20It=20implements?= =?UTF-8?q?=20=20=20a=20very=20primitive=20game=20that=20shows=20how=20a?= =?UTF-8?q?=20plugin=20can=20have=20its=20own=20raw=20OSD.=20Especially=20?= =?UTF-8?q?=20=20look=20into=20cLineGame=20and=20see=20how=20it=20implemen?= =?UTF-8?q?ts=20the=20Show()=20function.=20See=20also=20=20=20the=20chapte?= =?UTF-8?q?r=20on=20"User=20interaction"=20in=20PLUGINS.html.=20-=20Added?= =?UTF-8?q?=20three=20new=20fields=20to=20the=20lines=20in=20'channels.con?= =?UTF-8?q?f':=20NID,=20TID=20and=20RID.=20NID=20and=20=20=20TID=20are=20t?= =?UTF-8?q?he=20Network=20and=20Transport=20Stream=20IDs,=20respectively.?= =?UTF-8?q?=20RID=20is=20an=20additional=20ID=20=20=20that=20can=20be=20us?= =?UTF-8?q?ed=20to=20tell=20apart=20channels=20that=20would=20otherwise=20?= =?UTF-8?q?be=20indistinguishable.=20=20=20This=20is=20typically=20the=20c?= =?UTF-8?q?ase=20with=20radio=20channels,=20which=20may=20have=20the=20sam?= =?UTF-8?q?e=20NID,=20TID=20=20=20and=20SID,=20but=20different=20"radio=20?= =?UTF-8?q?IDs".=20This=20new=20field=20is=20therefore=20called=20RID=20("?= =?UTF-8?q?radio=20=20=20ID").=20Currently=20NID=20and=20TID=20are=20not?= =?UTF-8?q?=20yet=20used=20by=20VDR=20and=20should=20always=20be=200.=20Th?= =?UTF-8?q?e=20=20=20RID=20is=20actually=20used=20when=20building=20the=20?= =?UTF-8?q?"unique=20channel=20ID",=20so=20if=20you=20have=20channels=20?= =?UTF-8?q?=20=20in=20your=20'channels.conf'=20file=20that=20cause=20error?= =?UTF-8?q?=20messages=20when=20loading,=20you=20can=20set=20=20=20the=20R?= =?UTF-8?q?IDs=20of=20these=20channels=20to=20different=20values.=20=20=20?= =?UTF-8?q?When=20reading=20an=20old=20'channels.conf'=20these=20new=20fie?= =?UTF-8?q?lds=20will=20be=20automatically=20=20=20initialized=20to=200=20?= =?UTF-8?q?and=20once=20the=20file=20is=20written=20back=20to=20disk=20the?= =?UTF-8?q?y=20will=20be=20appended=20=20=20to=20the=20channel=20definitio?= =?UTF-8?q?ns.=20=20=20Thanks=20to=20R=C3=A9gis=20Bossut=20for=20pointing?= =?UTF-8?q?=20out=20that=20with=20some=20providers=20the=20channels=20can?= =?UTF-8?q?=20=20=20only=20be=20distinguished=20through=20the=20RID.=20-?= =?UTF-8?q?=20The=20"unique=20channel=20ID"=20now=20contains=20an=20option?= =?UTF-8?q?al=205th=20part=20(the=20RID).=20See=20man=20vdr(5).=20-=20Upda?= =?UTF-8?q?ted=20'channels.conf.cable'=20and=20made=20some=20channels=20un?= =?UTF-8?q?ique=20using=20the=20new=20RID=20=20=20(thanks=20to=20Andreas?= =?UTF-8?q?=20Kool=20for=20pointing=20out=20the=20problems).=20-=20Made=20?= =?UTF-8?q?some=20channels=20unique=20in=20'channels.conf.terr'=20using=20?= =?UTF-8?q?the=20new=20RID.=20-=20Extended=20the=20'-l'=20option=20to=20al?= =?UTF-8?q?low=20logging=20to=20LOG=5FLOCALn=20(n=3D0..7)=20by=20writing,?= =?UTF-8?q?=20for=20=20=20instance,=20'-l=203.7'=20(suggested=20by=20J?= =?UTF-8?q?=C3=BCrgen=20Schmidt).=20-=20Now=20deleting=20stale=20lock=20fi?= =?UTF-8?q?les=20if=20they=20have=20a=20time=20stamp=20that=20is=20outside?= =?UTF-8?q?=20the=20window=20=20=20'now=20+/-=20LOCKFILESTALETIME'.=20This?= =?UTF-8?q?=20improves=20things=20in=20cases=20where=20the=20system=20time?= =?UTF-8?q?=20=20=20makes=20far=20jumps,=20so=20that=20a=20lock=20file=20m?= =?UTF-8?q?ight=20end=20up=20with=20a=20time=20stamp=20that=20lies=20=20?= =?UTF-8?q?=20in=20the=20distant=20future=20(thanks=20to=20Oliver=20Endris?= =?UTF-8?q?s).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vdr.c | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) (limited to 'vdr.c') 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 @@ -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); -- cgit v1.2.3