From e86d019878a4315cc5a75450d2753c543fbe5a1a Mon Sep 17 00:00:00 2001 From: schmirl Date: Mon, 19 Feb 2007 12:08:16 +0000 Subject: Added commandline switch -r/--remux for specifying name of externremux script (thanks to Rolf Ahrenberg) Modified Files: streamdev-server.c streamdev-server.h remux/extern.c remux/extern.h --- streamdev-server.c | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'streamdev-server.c') diff --git a/streamdev-server.c b/streamdev-server.c index 2d81652..af5f104 100644 --- a/streamdev-server.c +++ b/streamdev-server.c @@ -3,13 +3,15 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: streamdev-server.c,v 1.4 2006/11/24 11:45:36 schmirl Exp $ + * $Id: streamdev-server.c,v 1.5 2007/02/19 12:08:16 schmirl Exp $ */ +#include #include "streamdev-server.h" #include "server/setup.h" #include "server/server.h" #include "server/suspend.h" +#include "remux/extern.h" #include "i18n.h" const char *cPluginStreamdevServer::DESCRIPTION = "VDR Streaming Server"; @@ -27,6 +29,33 @@ const char *cPluginStreamdevServer::Description(void) return tr(DESCRIPTION); } +const char *cPluginStreamdevServer::CommandLineHelp(void) +{ + // return a string that describes all known command line options. + return " -r , --remux= Define an external command for remuxing.\n"; +} + +bool cPluginStreamdevServer::ProcessArgs(int argc, char *argv[]) +{ + // implement command line argument processing here if applicable. + static const struct option long_options[] = { + { "remux", required_argument, NULL, 'r' }, + { NULL, 0, NULL, 0 } + }; + + int c; + while((c = getopt_long(argc, argv, "r:", long_options, NULL)) != -1) { + switch (c) { + case 'r': + g_ExternRemux = optarg; + break; + default: + return false; + } + } + return true; +} + bool cPluginStreamdevServer::Start(void) { i18n_name = Name(); -- cgit v1.2.3