diff options
author | methodus <methodus@web.de> | 2012-10-12 11:46:24 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-12 11:46:24 +0200 |
commit | e3ce4d1e7e47af0efe5bc1015ba38598e68a149d (patch) | |
tree | 43a0b7ba5f44ab460f0dd39ab1357f16e917be59 | |
parent | b0e2b9d4f39d5adf322280269e096c8464a8fda2 (diff) | |
download | vdr-plugin-upnp-e3ce4d1e7e47af0efe5bc1015ba38598e68a149d.tar.gz vdr-plugin-upnp-e3ce4d1e7e47af0efe5bc1015ba38598e68a149d.tar.bz2 |
Added DVBProfiler for recordings and Live-TV channels
-rw-r--r-- | plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp b/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp new file mode 100644 index 0000000..eb578a0 --- /dev/null +++ b/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp @@ -0,0 +1,55 @@ +/* + * dvbProvider.cpp + * + * Created on: 12.10.2012 + * Author: savop + */ + +#include <vdr/channels.h> +#include <vdr/epg.h> +#include <vdr/tools.h> +#include <plugin.h> +#include <tools.h> +#include <string> +#include <sstream> + +using namespace std; + +namespace upnp { + +class DVBProfiler : public cMediaProfiler { +public: + virtual bool CanHandleSchema(const string& schema){ + if(schema.find("vdr",0) == 0 || schema.find("rec",0) == 0){ + return true; + } else { + return false; + } + } + + virtual bool GetMetadata(const string& uri, cMetadata& metadata){ + if (uri.find("vdr",0) == 0){ + return GetChannelMetadata(uri, metadata); + } else if (uri.find("rec",0) == 0){ + return GetRecordingMetadata(uri, metadata); + } else { + return false; + } + } + +private: + + virtual bool GetRecordingMetadata(const string& uri, cMetadata& metadata){ + dsyslog("DvbProfiler\tGetting recording metadata for '%s'", uri.c_str()); + return false; + } + + virtual bool GetChannelMetadata(const string& uri, cMetadata& metadata){ + dsyslog("DvbProfiler\tGetting channel metadata for '%s'", uri.c_str()); + return false; + } +}; + +UPNP_REGISTER_MEDIA_PLUGIN(DVBProfiler); + +} |