diff options
author | phintuka <phintuka> | 2010-02-07 01:05:04 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-02-07 01:05:04 +0000 |
commit | 379a31a202580c461e4a6005a484a31fea6dbec2 (patch) | |
tree | 90d8cea3ea823fccc4896cd3155cb2bcf56f1455 | |
parent | 4a07f86c2b3d3886213f46cdbdf623ffb526baf5 (diff) | |
download | xineliboutput-379a31a202580c461e4a6005a484a31fea6dbec2.tar.gz xineliboutput-379a31a202580c461e4a6005a484a31fea6dbec2.tar.bz2 |
Merge:
revision 1.42
Added missing parameter error messages to SVDRP commands
revision 1.41
Added SVDRP command to start/stop local frontend
(closes feature request #2424072)
revision 1.40
Added StartFrontend-1.0 service (Thanks to durchflieger)
http://vdrportal.de/board/thread.php?threadid=86804&threadview=0&hilight=&hilightuser=0&page=1
-rw-r--r-- | xineliboutput.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/xineliboutput.c b/xineliboutput.c index e935eebf..3917fdd8 100644 --- a/xineliboutput.c +++ b/xineliboutput.c @@ -21,7 +21,7 @@ * * xineliboutput.c: VDR Plugin interface * - * $Id: xineliboutput.c,v 1.30.2.7 2009-10-08 13:08:37 phintuka Exp $ + * $Id: xineliboutput.c,v 1.30.2.8 2010-02-07 01:05:04 phintuka Exp $ * */ @@ -292,6 +292,22 @@ bool cPluginXinelibOutput::Service(const char *Id, void *Data) return true; } + else if(!strcmp(Id, "StartFrontend-1.0")) { + if(CData && *CData) { + LOGMSG("Service(%s, %s)", Id, CData); + int local_frontend = strstra(CData, xc.s_frontends, -1); + if (local_frontend >= 0 && local_frontend < FRONTEND_count && strcmp(CData, xc.local_frontend)) { + strn0cpy(xc.local_frontend, xc.s_frontends[local_frontend], sizeof(xc.local_frontend)); + cXinelibDevice::Instance().ConfigureWindow( + xc.fullscreen, xc.width, xc.height, xc.modeswitch, xc.modeline, + xc.display_aspect, xc.scale_video, xc.field_order); + } + return true; + } + LOGMSG("Service(%s) -> true", Id); + return true; + } + } return false; } @@ -309,6 +325,8 @@ const char **cPluginXinelibOutput::SVDRPHelpPages(void) " Play/show image file.", "QMSC <file>\n" " Queue music file to playlist.", + "LFRO <frontend>\n" + " Start/stop local frontend. <frontend> can be none, sxfe or fbfe.", NULL }; return HelpPages; @@ -323,6 +341,7 @@ cString cPluginXinelibOutput::SVDRPCommand(const char *Command, const char *Opti return cString("Playing video file"); } else { ReplyCode = 550; // Requested action not taken + return cString("File name missing"); } } @@ -343,6 +362,7 @@ cString cPluginXinelibOutput::SVDRPCommand(const char *Command, const char *Opti return cString("Playing music file"); } else { ReplyCode = 550; // Requested action not taken + return cString("Music file name missing"); } } @@ -356,6 +376,7 @@ cString cPluginXinelibOutput::SVDRPCommand(const char *Command, const char *Opti return cString("Showing image file"); } else { ReplyCode = 550; // Requested action not taken + return cString("Image file name missing"); } } @@ -366,6 +387,18 @@ cString cPluginXinelibOutput::SVDRPCommand(const char *Command, const char *Opti return cString("Queueing music file"); } else { ReplyCode = 550; // Requested action not taken + return cString("Music file name missing"); + } + } + + else if(strcasecmp(Command, "LFRO") == 0) { + if(*Option) { + LOGMSG("SVDRP(%s, %s)", Command, Option); + Service("StartFrontend-1.0", (void*)Option); + return cString::sprintf("Local frontend: %s", xc.local_frontend); + } else { + ReplyCode = 550; // Requested action not taken + return cString("Local frontend name missing"); } } |