From 03ff27ec6a8e684dfa062d57ddd4229a3031c579 Mon Sep 17 00:00:00 2001 From: methodus Date: Sat, 1 Dec 2012 12:37:26 +0100 Subject: Fixed compile error with VDR 1.7.32, removed recordings if VDR version is below 1.7.5, fixed Makefile --- plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'plugins/profiler/vdrDVBProfiler') diff --git a/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp b/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp index 22285b4..9873fe4 100644 --- a/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp +++ b/plugins/profiler/vdrDVBProfiler/dvbProfiler.cpp @@ -111,7 +111,11 @@ public: } virtual bool CanHandleSchema(const string& schema){ - if(schema.find("vdr",0) == 0 || schema.find("rec",0) == 0){ +#if VDRVERSNUM > 10704 + if( schema.find("vdr",0) == 0 || schema.find("rec",0) == 0 ){ +#else + if( schema.find("vdr",0) == 0 ) { +#endif return true; } else { return false; @@ -121,9 +125,13 @@ public: 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){ + } +#if VDRVERSNUM > 10704 + else if (uri.find("rec",0) == 0){ return GetRecordingMetadata(uri, metadata); - } else { + } +#endif + else { return false; } } @@ -132,6 +140,7 @@ public: private: +#if VDRVERSNUM > 10704 bool GetRecordingMetadata(const string& u, cMetadata& metadata){ string videoDir = string(VideoDirectory), uri = u.substr(6), recStr = videoDir + "/" + uri; cRecording* recording = Recordings.GetByName(recStr.c_str()); @@ -188,7 +197,7 @@ private: #if VDRVERSNUM < 10732 if (pid == parser.PmtPid()) #else - if (PatPmtParser.IsPmtPid(pid)) + if (parser.IsPmtPid(pid)) #endif { parser.ParsePmt(buf, TS_SIZE); @@ -302,6 +311,7 @@ private: return true; } +#endif bool GetChannelMetadata(const string& uri, cMetadata& metadata){ -- cgit v1.2.3