summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2009-09-16 16:59:36 +0000
committerphintuka <phintuka>2009-09-16 16:59:36 +0000
commitce5af9a379716895194a3d1a16f7d980a2dafa6a (patch)
tree9df7e6036cecaff8a71941062f12acfef719f7af
parent8a8f58656118c98e0d51c2118cc0032f61400ca4 (diff)
downloadxineliboutput-ce5af9a379716895194a3d1a16f7d980a2dafa6a.tar.gz
xineliboutput-ce5af9a379716895194a3d1a16f7d980a2dafa6a.tar.bz2
Merge:
revision 1.39 Added vdpau to help text video drivers revision 1.38 Added QMSC command. revision 1.35 Added preliminary SVDRP interface
-rw-r--r--xineliboutput.c85
1 files changed, 82 insertions, 3 deletions
diff --git a/xineliboutput.c b/xineliboutput.c
index e2eb312e..d5112f65 100644
--- a/xineliboutput.c
+++ b/xineliboutput.c
@@ -21,7 +21,7 @@
*
* xineliboutput.c: VDR Plugin interface
*
- * $Id: xineliboutput.c,v 1.30.2.4 2009-02-12 10:59:07 phintuka Exp $
+ * $Id: xineliboutput.c,v 1.30.2.5 2009-09-16 16:59:36 phintuka Exp $
*
*/
@@ -76,8 +76,8 @@ class cPluginXinelibOutput : public cPlugin
virtual bool SetupParse(const char *Name, const char *Value);
virtual bool Service(const char *Id, void *Data = NULL);
- //virtual const char **SVDRPHelpPages(void);
- //virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
+ virtual const char **SVDRPHelpPages(void);
+ virtual cString SVDRPCommand(const char *Command, const char *Option, int &ReplyCode);
};
cPluginXinelibOutput::cPluginXinelibOutput(void)
@@ -111,6 +111,9 @@ const char cmdLineHelp[] =
" -V NAME --video=NAME Use video driver NAME for local frontend\n"
" Supported values:\n"
" for sxfe: auto, x11, xshm, xv, xvmc, xxmc,\n"
+#ifdef HAVE_VDPAU
+ "vdpau, "
+#endif
" vidix, sdl, opengl, none\n"
" for fbfe: auto, fb, DirectFB, vidixfb,\n"
" sdl, dxr3, aadxr3, none\n"
@@ -273,6 +276,82 @@ bool cPluginXinelibOutput::Service(const char *Id, void *Data)
return false;
}
+const char **cPluginXinelibOutput::SVDRPHelpPages(void)
+{
+ static const char *HelpPages[] = {
+ "PMDA <file>\n"
+ " Play media file.",
+ "PDVD <file>\n"
+ " Play DVD disc.",
+ "PMSC <file>\n"
+ " Play music file.",
+ "PIMG <file>\n"
+ " Play/show image file.",
+ "QMSC <file>\n"
+ " Queue music file to playlist.",
+ NULL
+ };
+ return HelpPages;
+}
+
+cString cPluginXinelibOutput::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode)
+{
+ if(strcasecmp(Command, "PMDA") == 0) {
+ if(*Option) {
+ LOGMSG("SVDRP(%s, %s)", Command, Option);
+ cControl::Launch(new cXinelibPlayerControl(ShowFiles, Option));
+ return cString("Playing video file");
+ } else {
+ ReplyCode = 550; // Requested action not taken
+ }
+ }
+
+ else if(strcasecmp(Command, "PDVD") == 0) {
+ if(*Option) {
+ LOGMSG("SVDRP(%s, %s)", Command, Option);
+ cControl::Launch(new cXinelibDvdPlayerControl(Option));
+ return cString("Playing DVD disc");
+ } else {
+ ReplyCode = 550; // Requested action not taken
+ }
+ }
+
+ else if(strcasecmp(Command, "PMSC") == 0) {
+ if(*Option) {
+ LOGMSG("SVDRP(%s, %s)", Command, Option);
+ cControl::Launch(new cXinelibPlayerControl(ShowMusic, Option));
+ return cString("Playing music file");
+ } else {
+ ReplyCode = 550; // Requested action not taken
+ }
+ }
+
+ else if(strcasecmp(Command, "PIMG") == 0) {
+ if(*Option) {
+ char **list = new char*[2];
+ list[0] = strdup(Option);
+ list[1] = NULL;
+ LOGMSG("SVDRP(%s, %s)", Command, Option);
+ cControl::Launch(new cXinelibImagesControl(list, 0, 1));
+ return cString("Showing image file");
+ } else {
+ ReplyCode = 550; // Requested action not taken
+ }
+ }
+
+ else if(strcasecmp(Command, "QMSC") == 0) {
+ if(*Option) {
+ LOGMSG("SVDRP(%s, %s)", Command, Option);
+ cXinelibPlayerControl::Queue(Option);
+ return cString("Queueing music file");
+ } else {
+ ReplyCode = 550; // Requested action not taken
+ }
+ }
+
+ return NULL;
+}
+
extern "C"
void *VDRPluginCreator(void) __attribute__((visibility("default")));