From e3ce4d1e7e47af0efe5bc1015ba38598e68a149d Mon Sep 17 00:00:00 2001 From: methodus Date: Fri, 12 Oct 2012 11:46:24 +0200 Subject: Added DVBProfiler for recordings and Live-TV channels --- plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp 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 +#include +#include +#include +#include +#include +#include + +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); + +} -- cgit v1.2.3