vdr  2.2.0
dvbsddevice.c
Go to the documentation of this file.
1 /*
2  * dvbsddevice.c: A plugin for the Video Disk Recorder
3  *
4  * See the README file for copyright information and how to reach the author.
5  *
6  * $Id: dvbsddevice.c 3.4 2015/02/17 13:11:55 kls Exp $
7  */
8 
9 #include <getopt.h>
10 #include <vdr/plugin.h>
11 #include "dvbsdffdevice.h"
12 
13 static const char *VERSION = "2.2.0";
14 static const char *DESCRIPTION = "SD Full Featured DVB device";
15 
16 class cPluginDvbsddevice : public cPlugin {
17 private:
19 public:
20  cPluginDvbsddevice(void);
21  virtual ~cPluginDvbsddevice();
22  virtual const char *Version(void) { return VERSION; }
23  virtual const char *Description(void) { return DESCRIPTION; }
24  virtual const char *CommandLineHelp(void);
25  virtual bool ProcessArgs(int argc, char *argv[]);
26  };
27 
29 {
31 }
32 
34 {
35  delete probe;
36 }
37 
39 {
40  return " -o --outputonly do not receive, just use as output device\n";
41 }
42 
43 bool cPluginDvbsddevice::ProcessArgs(int argc, char *argv[])
44 {
45  static struct option long_options[] = {
46  { "outputonly", no_argument, NULL, 'o' },
47  { NULL, no_argument, NULL, 0 }
48  };
49 
50  int c;
51  while ((c = getopt_long(argc, argv, "o", long_options, NULL)) != -1) {
52  switch (c) {
53  case 'o': probe->SetOutputOnly(true);
54  break;
55  default: return false;
56  }
57  }
58  return true;
59 }
60 
61 VDRPLUGINCREATOR(cPluginDvbsddevice); // Don't touch this!
cPluginDvbsddevice(void)
Definition: dvbsddevice.c:28
cDvbSdFfDeviceProbe * probe
Definition: dvbsddevice.c:18
static const char * DESCRIPTION
Definition: dvbsddevice.c:14
Definition: plugin.h:20
virtual const char * Version(void)
Definition: dvbsddevice.c:22
virtual ~cPluginDvbsddevice()
Definition: dvbsddevice.c:33
void SetOutputOnly(bool On)
virtual bool ProcessArgs(int argc, char *argv[])
Definition: dvbsddevice.c:43
static const char * VERSION
Definition: dvbsddevice.c:13
virtual const char * Description(void)
Definition: dvbsddevice.c:23
virtual const char * CommandLineHelp(void)
Definition: dvbsddevice.c:38
VDRPLUGINCREATOR(cPluginDvbsddevice)