diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-08-27 11:40:21 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-08-27 11:40:21 +0200 |
commit | d2342ae2ef163ca35727dcc1f72df4b253a06154 (patch) | |
tree | 7eb6ab1253a44ee543f75d1f856fc301eae5369f /PLUGINS/src/dvbsddevice/dvbsddevice.c | |
parent | 6700e772e5da3757a91fcc500128adc7c16bb355 (diff) | |
download | vdr-d2342ae2ef163ca35727dcc1f72df4b253a06154.tar.gz vdr-d2342ae2ef163ca35727dcc1f72df4b253a06154.tar.bz2 |
The dvbsddevice plugin now supports the new option --outputonly
Diffstat (limited to 'PLUGINS/src/dvbsddevice/dvbsddevice.c')
-rw-r--r-- | PLUGINS/src/dvbsddevice/dvbsddevice.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/PLUGINS/src/dvbsddevice/dvbsddevice.c b/PLUGINS/src/dvbsddevice/dvbsddevice.c index 6f042d8b..2aa8c77d 100644 --- a/PLUGINS/src/dvbsddevice/dvbsddevice.c +++ b/PLUGINS/src/dvbsddevice/dvbsddevice.c @@ -3,13 +3,14 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbsddevice.c 1.4 2011/04/17 12:55:43 kls Exp $ + * $Id: dvbsddevice.c 1.5 2011/08/27 11:34:58 kls Exp $ */ +#include <getopt.h> #include <vdr/plugin.h> #include "dvbsdffdevice.h" -static const char *VERSION = "0.0.4"; +static const char *VERSION = "0.0.5"; static const char *DESCRIPTION = "SD Full Featured DVB device"; class cPluginDvbsddevice : public cPlugin { @@ -20,6 +21,8 @@ public: virtual ~cPluginDvbsddevice(); virtual const char *Version(void) { return VERSION; } virtual const char *Description(void) { return DESCRIPTION; } + virtual const char *CommandLineHelp(void); + virtual bool ProcessArgs(int argc, char *argv[]); }; cPluginDvbsddevice::cPluginDvbsddevice(void) @@ -32,4 +35,27 @@ cPluginDvbsddevice::~cPluginDvbsddevice() delete probe; } +const char *cPluginDvbsddevice::CommandLineHelp(void) +{ + return " -o --outputonly do not receive, just use as output device\n"; +} + +bool cPluginDvbsddevice::ProcessArgs(int argc, char *argv[]) +{ + static struct option long_options[] = { + { "outputonly", no_argument, NULL, 'o' }, + { NULL, no_argument, NULL, 0 } + }; + + int c; + while ((c = getopt_long(argc, argv, "", long_options, NULL)) != -1) { + switch (c) { + case 'o': probe->SetOutputOnly(true); + break; + default: return false; + } + } + return true; +} + VDRPLUGINCREATOR(cPluginDvbsddevice); // Don't touch this! |