From d5c85f5ff84ffea666c63eca5dbe04632283cb04 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 11 Sep 2005 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.3.32=20-=20Added=20some=20missing=20braces?= =?UTF-8?q?=20in=20remux.c=20(thanks=20to=20Wayne=20Keer=20for=20reporting?= =?UTF-8?q?=20this=20one).=20-=20Removed=20unused=20MAINMENUENTRY=20from?= =?UTF-8?q?=20svdrpdemo.c=20(thanks=20to=20Udo=20Richter=20for=20reporting?= =?UTF-8?q?=20=20=20this=20one).=20-=20Fixed=20appending=20sequence=20end?= =?UTF-8?q?=20code=20in=20cDvbPlayer::Goto()=20(thanks=20to=20Reinhard=20N?= =?UTF-8?q?issl).=20-=20Fixed=20syncing=20in=20cRepacker=20(thanks=20to=20?= =?UTF-8?q?Reinhard=20Nissl).=20-=20Now=20always=20using=20stream=20id=200?= =?UTF-8?q?xE0=20for=20the=20video=20stream,=20to=20avoid=20problems=20wit?= =?UTF-8?q?h=20=20=20post=20processing=20tools=20that=20choke=20on=20diffe?= =?UTF-8?q?rent=20ids=20(suggested=20by=20Reinhard=20Nissl).=20-=20Updated?= =?UTF-8?q?=20the=20Estonian=20OSD=20texts=20(thanks=20to=20Arthur=20Konov?= =?UTF-8?q?alov).=20-=20Fixed=20cDvbPlayer::SkipFrames()=20to=20properly?= =?UTF-8?q?=20handle=20radio=20recordings=20(thanks=20to=20=20=20Reinhard?= =?UTF-8?q?=20Nissl).=20-=20Updated=20the=20Swedish=20OSD=20texts=20(thank?= =?UTF-8?q?s=20to=20Tomas=20Prybil).=20-=20Updated=20the=20Slovenian=20OSD?= =?UTF-8?q?=20texts=20(thanks=20to=20Matjaz=20Thaler).=20-=20Updated=20the?= =?UTF-8?q?=20Danish=20OSD=20texts=20(thanks=20to=20Mogens=20Elneff).=20-?= =?UTF-8?q?=20Made=20LIRC=20command=20parsing=20more=20robust=20(thanks=20?= =?UTF-8?q?to=20Ville=20Skytt=C3=A4).=20-=20Introduced=20a=20separate=20'p?= =?UTF-8?q?lugins-install'=20target=20in=20the=20Makefile=20(thanks=20to?= =?UTF-8?q?=20Daniel=20=20=20Thompson).=20-=20Re-introduced=20the=20code?= =?UTF-8?q?=20that=20waits=20for=20a=20tuner=20lock=20in=20VDR/device.c,?= =?UTF-8?q?=20since=20=20=20apparently=20some=20users=20actually=20need=20?= =?UTF-8?q?it.=20It's=20not=20active=20by=20default,=20you'll=20have=20=20?= =?UTF-8?q?=20to=20define=20the=20WAIT=5FFOR=5FTUNER=5FLOCK=20macro=20in?= =?UTF-8?q?=20that=20file=20if=20you=20need=20it=20(suggested=20=20=20by?= =?UTF-8?q?=20Malcolm=20Caldwell).=20-=20Adjusted=20the=20Makefile=20to=20?= =?UTF-8?q?the=20dvb-kernel=20driver=20on=20kernel=202.6=20and=20up=20(tha?= =?UTF-8?q?nks=20to=20=20=20Lauri=20Tischler).=20-=20Repeat=20keys=20are?= =?UTF-8?q?=20now=20ignored=20when=20waiting=20for=20a=20keypress=20to=20c?= =?UTF-8?q?ancel=20an=20operation=20=20=20(thanks=20to=20Marko=20M=C3=A4ke?= =?UTF-8?q?l=C3=A4).=20-=20The=20main=20menu=20function=20of=20a=20plugin?= =?UTF-8?q?=20can=20now=20be=20activated=20through=20a=20key=20macro=20of?= =?UTF-8?q?=20=20=20the=20form=20"@plugin"=20even=20if=20that=20plugin=20d?= =?UTF-8?q?oesn't=20have=20a=20main=20menu=20entry=20(using=20=20=20part?= =?UTF-8?q?=20of=20a=20patch=20by=20Hardy=20Flor,=20which=20originally=20i?= =?UTF-8?q?mplemented=20calling=20plugins=20from=20=20=20SVDRP).=20-=20The?= =?UTF-8?q?=20menu=20timeout=20handling=20is=20now=20done=20centrally=20in?= =?UTF-8?q?=20the=20main=20program=20loop.=20-=20Added=20missing=20help=20?= =?UTF-8?q?for=20the=20'help'=20keyword=20in=20the=20SVDRP=20command=20PLU?= =?UTF-8?q?G.=20-=20The=20main=20menu=20function=20of=20a=20plugin=20can?= =?UTF-8?q?=20now=20be=20called=20programmatically=20through=20=20=20the?= =?UTF-8?q?=20static=20function=20cRemote::CallPlugin().=20-=20The=20SVDRP?= =?UTF-8?q?=20command=20PLUG=20now=20has=20a=20new=20option=20'main'=20whi?= =?UTF-8?q?ch=20can=20be=20used=20to=20initiate=20=20=20a=20call=20to=20th?= =?UTF-8?q?e=20main=20menu=20function=20of=20a=20plugin=20(using=20part=20?= =?UTF-8?q?of=20a=20patch=20by=20Hardy=20Flor).=20-=20The=20new=20command?= =?UTF-8?q?=20line=20option=20'--vfat'=20can=20be=20used=20to=20make=20VDR?= =?UTF-8?q?=20encode=20special=20=20=20characters=20in=20recording=20file?= =?UTF-8?q?=20names,=20even=20if=20it=20wasn't=20compiled=20with=20VFAT=3D?= =?UTF-8?q?1=20=20=20(suggested=20by=20Peter=20Bieringer).=20The=20compile?= =?UTF-8?q?=20time=20option=20VFAT=20still=20exists=20and=20=20=20creates?= =?UTF-8?q?=20a=20VDR=20that=20always=20behaves=20as=20if=20it=20were=20ca?= =?UTF-8?q?lled=20with=20'--vfat'.=20-=20Replaced=20the=20':'=20delimiter?= =?UTF-8?q?=20between=20hour=20and=20minute=20in=20recording=20file=20name?= =?UTF-8?q?s=20with=20=20=20a=20'.'=20under=20Linux,=20too.=20Existing=20r?= =?UTF-8?q?ecordings=20with=20':'=20as=20delimiter=20will=20still=20work.?= =?UTF-8?q?=20-=20Implemented=20the=20SVDRP=20command=20MOVC=20(thanks=20t?= =?UTF-8?q?o=20Andreas=20Brachold).=20-=20Added=20support=20for=20multiple?= =?UTF-8?q?=20audio=20language=20codes=20in=20ISO639LanguageDescriptors=20?= =?UTF-8?q?to=20=20=20'libsi'=20(thanks=20to=20Marcel=20Wiesweg).=20-=20Ch?= =?UTF-8?q?anged=20the=20audio=20PID=20language=20codes=20to=20hold=20up?= =?UTF-8?q?=20to=20two=203=20letter=20codes,=20separated=20=20=20by=20'+',?= =?UTF-8?q?=20to=20store=20separate=20languages=20broadcast=20in=20two=20c?= =?UTF-8?q?hannel=20audio=20mode.=20-=20If=20the=20preferred=20audio=20lan?= =?UTF-8?q?guage=20is=20broadcast=20on=20a=20PID=20that=20has=20two=20diff?= =?UTF-8?q?erent=20=20=20languages=20in=20the=20two=20stereo=20channels,?= =?UTF-8?q?=20the=20audio=20channel=20is=20now=20properly=20set=20when=20?= =?UTF-8?q?=20=20switching=20to=20such=20a=20channel=20(thanks=20to=20Moge?= =?UTF-8?q?ns=20Elneff=20for=20his=20help=20in=20testing=20this).=20-=20Fi?= =?UTF-8?q?xed=20some=20typos=20in=20MANUAL=20(thanks=20to=20Ville=20Skytt?= =?UTF-8?q?=C3=A4).=20-=20Fixed=20the=20default=20value=20for=20"Setup/EPG?= =?UTF-8?q?=20bugfix=20level"=20(thanks=20to=20Ville=20Skytt=C3=A4=20for?= =?UTF-8?q?=20=20=20reporting=20this=20one).=20-=20Fixed=20defining=20time?= =?UTF-8?q?rs=20that=20only=20differ=20in=20the=20day=20of=20week=20(thank?= =?UTF-8?q?s=20to=20Patrick=20=20=20Rother=20for=20reporting=20this=20one)?= =?UTF-8?q?.=20-=20Fixed=20converting=20summary.vdr=20files=20that=20would?= =?UTF-8?q?=20result=20in=20a=20very=20long=20'short=20text'=20=20=20(than?= =?UTF-8?q?ks=20to=20Carsten=20Koch).=20-=20Implemented=20a=20hash=20for?= =?UTF-8?q?=20the=20channels=20to=20reduce=20the=20system=20load=20in=20th?= =?UTF-8?q?e=20EIT=20scanning=20=20=20thread=20(based=20on=20a=20patch=20b?= =?UTF-8?q?y=20Georg=20Acher).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svdrp.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 5 deletions(-) (limited to 'svdrp.c') diff --git a/svdrp.c b/svdrp.c index 889ffe4..2c567aa 100644 --- a/svdrp.c +++ b/svdrp.c @@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 1.77 2005/08/28 14:12:00 kls Exp $ + * $Id: svdrp.c 1.80 2005/09/03 14:09:02 kls Exp $ */ #include "svdrp.h" @@ -269,12 +269,16 @@ const char *HelpPages[] = { " at the position where any previous replay was stopped, or from the beginning\n" " by default. To control or stop the replay session, use the usual remote\n" " control keypresses via the HITK command.", - "PLUG [ [ ]]\n" + "PLUG [ help | main ] [ [ ]]\n" " Send a command to a plugin.\n" " The PLUG command without any parameters lists all plugins.\n" " If only a name is given, all commands known to that plugin are listed.\n" " If a command is given (optionally followed by parameters), that command\n" - " is sent to the plugin, and the result will be displayed.", + " is sent to the plugin, and the result will be displayed.\n" + " The keyword 'help' lists all the SVDRP commands known to the named plugin.\n" + " If 'help' is followed by a command, the detailed help for that command is\n" + " given. The keyword 'main' initiates a call to the main menu function of the\n" + " given plugin.\n", "PUTE\n" " Put data into the EPG list. The data entered has to strictly follow the\n" " format defined in vdr(5) for the 'epg.data' file. A '.' on a line\n" @@ -1035,8 +1039,51 @@ void cSVDRP::CmdMODT(const char *Option) void cSVDRP::CmdMOVC(const char *Option) { - //TODO combine this with menu action (timers must be updated) - Reply(502, "MOVC not yet implemented"); + if (*Option) { + if (!Channels.BeingEdited() && !Timers.BeingEdited()) { + char *tail; + int From = strtol(Option, &tail, 10); + if (tail && tail != Option) { + tail = skipspace(tail); + if (tail && tail != Option) { + int To = strtol(tail, NULL, 10); + int CurrentChannelNr = cDevice::CurrentChannel(); + cChannel *CurrentChannel = Channels.GetByNumber(CurrentChannelNr); + cChannel *FromChannel = Channels.GetByNumber(From); + if (FromChannel) { + cChannel *ToChannel = Channels.GetByNumber(To); + if (ToChannel) { + int FromNumber = FromChannel->Number(); + int ToNumber = ToChannel->Number(); + if (FromNumber != ToNumber) { + Channels.Move(FromChannel, ToChannel); + Channels.ReNumber(); + Channels.SetModified(true); + if (CurrentChannel && CurrentChannel->Number() != CurrentChannelNr) + Channels.SwitchTo(CurrentChannel->Number()); + isyslog("channel %d moved to %d", FromNumber, ToNumber); + Reply(250,"Channel \"%d\" moved to \"%d\"", From, To); + } + else + Reply(501, "Can't move channel to same postion"); + } + else + Reply(501, "Channel \"%d\" not defined", To); + } + else + Reply(501, "Channel \"%d\" not defined", From); + } + else + Reply(501, "Error in channel number"); + } + else + Reply(501, "Error in channel number"); + } + else + Reply(550, "Channels or timers are being edited - try again later"); + } + else + Reply(501, "Missing channel number"); } void cSVDRP::CmdMOVT(const char *Option) @@ -1204,6 +1251,10 @@ void cSVDRP::CmdPLUG(const char *Option) Reply(214, "This plugin has no SVDRP commands"); } } + else if (strcasecmp(cmd, "MAIN") == 0) { + cRemote::CallPlugin(plugin->Name()); + Reply(250, "Initiated call to main menu function of plugin \"%s\"", plugin->Name()); + } else { int ReplyCode = 900; cString s = plugin->SVDRPCommand(cmd, option, ReplyCode); -- cgit v1.2.3