diff options
| -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"); |
