vdr
1.7.27
|
00001 /* 00002 * dvbsddevice.c: A plugin for the Video Disk Recorder 00003 * 00004 * See the README file for copyright information and how to reach the author. 00005 * 00006 * $Id: dvbsddevice.c 1.6 2012/03/07 13:58:08 kls Exp $ 00007 */ 00008 00009 #include <getopt.h> 00010 #include <vdr/plugin.h> 00011 #include "dvbsdffdevice.h" 00012 00013 static const char *VERSION = "0.0.6"; 00014 static const char *DESCRIPTION = "SD Full Featured DVB device"; 00015 00016 class cPluginDvbsddevice : public cPlugin { 00017 private: 00018 cDvbSdFfDeviceProbe *probe; 00019 public: 00020 cPluginDvbsddevice(void); 00021 virtual ~cPluginDvbsddevice(); 00022 virtual const char *Version(void) { return VERSION; } 00023 virtual const char *Description(void) { return DESCRIPTION; } 00024 virtual const char *CommandLineHelp(void); 00025 virtual bool ProcessArgs(int argc, char *argv[]); 00026 }; 00027 00028 cPluginDvbsddevice::cPluginDvbsddevice(void) 00029 { 00030 probe = new cDvbSdFfDeviceProbe; 00031 } 00032 00033 cPluginDvbsddevice::~cPluginDvbsddevice() 00034 { 00035 delete probe; 00036 } 00037 00038 const char *cPluginDvbsddevice::CommandLineHelp(void) 00039 { 00040 return " -o --outputonly do not receive, just use as output device\n"; 00041 } 00042 00043 bool cPluginDvbsddevice::ProcessArgs(int argc, char *argv[]) 00044 { 00045 static struct option long_options[] = { 00046 { "outputonly", no_argument, NULL, 'o' }, 00047 { NULL, no_argument, NULL, 0 } 00048 }; 00049 00050 int c; 00051 while ((c = getopt_long(argc, argv, "", long_options, NULL)) != -1) { 00052 switch (c) { 00053 case 'o': probe->SetOutputOnly(true); 00054 break; 00055 default: return false; 00056 } 00057 } 00058 return true; 00059 } 00060 00061 VDRPLUGINCREATOR(cPluginDvbsddevice); // Don't touch this!