diff options
| author | Lars Hanisch <dvb@flensrocker.de> | 2011-08-18 22:11:24 +0200 |
|---|---|---|
| committer | Lars Hanisch <dvb@flensrocker.de> | 2011-08-18 22:11:24 +0200 |
| commit | 28c8c46c3ebdcc23fe1591300035bb35a9e8e04c (patch) | |
| tree | 06c9e2efc049616c38342d41835a06ef29422da2 | |
| parent | 7ed2883604e3e7e910e043a69a2ab91e890dc638 (diff) | |
| download | vdr-plugin-pvrinput-28c8c46c3ebdcc23fe1591300035bb35a9e8e04c.tar.gz vdr-plugin-pvrinput-28c8c46c3ebdcc23fe1591300035bb35a9e8e04c.tar.bz2 | |
add SignalStrength method of vdr 1.7.20
| -rwxr-xr-x | device.c | 14 | ||||
| -rwxr-xr-x | device.h | 2 | ||||
| -rwxr-xr-x | pvrinput.c | 2 |
3 files changed, 17 insertions, 1 deletions
@@ -1002,6 +1002,20 @@ int cPvrDevice::NumProvidedSystems(void) const return 1; } +int cPvrDevice::SignalStrength(void) const +{ + struct v4l2_tuner tuner; + memset(&tuner, 0, sizeof(tuner)); + if ((IOCTL(v4l2_fd, VIDIOC_G_TUNER, &tuner) == 0) && (tuner.signal >= 0) && (tuner.signal <= 65535)) + return (tuner.signal * 100) / 65535; + return -1; +} + +int cPvrDevice::SignalQuality(void) const +{ + return -1; +} + bool cPvrDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const { bool result = false; @@ -133,6 +133,8 @@ public: virtual bool ProvidesTransponder(const cChannel *Channel) const; virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const; virtual int NumProvidedSystems(void) const; + virtual int SignalStrength(void) const; + virtual int SignalQuality(void) const; bool ParseChannel(const cChannel *Channel, int *input, uint64_t *norm, int *LinesPerFrame, int *card, eInputType *inputType, int *apid, int *vpid, int *tpid) const; int ReOpen(void); @@ -6,7 +6,7 @@ #endif #endif -static const char *VERSION = "2011-02-12"; +static const char *VERSION = "2011-08-18"; static const char *DESCRIPTION = tr("use Hauppauge PVR as input device"); static const char *MAINMENUENTRY = tr("PVR picture settings"); |
