summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.c17
-rw-r--r--sourceparams.h3
2 files changed, 5 insertions, 15 deletions
diff --git a/device.c b/device.c
index 37eb509..049f553 100644
--- a/device.c
+++ b/device.c
@@ -2,11 +2,6 @@
#include <linux/dvb/video.h>
#include <stdlib.h>
-#if VDRVERSNUM > 10712
-#define PVR_SOURCEPARAMS
-#include <vdr/sourceparams.h>
-#endif
-
char DRIVERNAME[][15] = {
"undef", "ivtv", "cx18", "pvrusb2", "cx88_blackbird", "hdpvr"
};
@@ -944,15 +939,9 @@ bool cPvrDevice::GetTSPacket(uchar *&Data)
bool cPvrDevice::ProvidesSource(int Source) const
{
-#ifdef PVR_SOURCEPARAMS
- if (cPvrSourceParam::IsPvr(Source)) {
-#else
- if (cSource::IsPlug(Source)) {
-#endif
- log(pvrDEBUG3, "cPvrDevice::ProvidesSource Source=%s -> true", (const char*)cSource::ToString(Source));
- return true;
- }
- return false;
+ bool isPvr = cPvrSourceParam::IsPvr(Source);
+ log(pvrDEBUG2, "cPvrDevice::ProvidesSource Source=%s (%d) -> %s", (const char*)cSource::ToString(Source), Source, isPvr ? "true" : "false");
+ return isPvr;
}
bool cPvrDevice::ProvidesTransponder(const cChannel *Channel) const
diff --git a/sourceparams.h b/sourceparams.h
index bdf70d1..9af66cb 100644
--- a/sourceparams.h
+++ b/sourceparams.h
@@ -27,11 +27,12 @@ public:
#ifdef PVR_SOURCEPARAMS
static const char *sPluginId;
static const char sSourceID = 'V';
+ static const uint stPvr = (sSourceID << 24);
#else
static const char *sPluginId;
static const char sSourceID = 'P';
+ static const uint stPvr = cSource::stPlug;
#endif
- static const uint stPvr = (sSourceID << 24);
static const int sNumInputs = 12;
static const char *sInputName[];