diff options
-rw-r--r-- | device.c | 17 | ||||
-rw-r--r-- | device.h | 3 |
2 files changed, 19 insertions, 1 deletions
@@ -749,7 +749,7 @@ bool cPvrDevice::SetChannelDevice(const cChannel * Channel, bool LiveView) if (!ParseChannel(Channel, &input, &norm, &LinesPerFrame, &card, &inputType, &apid, &vpid, &tpid)) return false; - if ((Channel->Number() == CurrentChannel.Number()) && (Channel->Frequency() == CurrentFrequency) && (input == CurrentInput) && (norm == CurrentNorm)) + if ((Channel->GetChannelID() == CurrentChannel.GetChannelID()) && (Channel->Frequency() == CurrentFrequency) && (input == CurrentInput) && (norm == CurrentNorm)) return true; log(pvrDEBUG1, "cPvrDevice::SetChannelDevice prepare switch to %d (%s) %3.2fMHz (/dev/video%d = %s)", Channel->Number(), Channel->Name(), (double)Channel->Frequency() / 1000, number, CARDNAME[cardname]); @@ -1021,6 +1021,21 @@ int cPvrDevice::SignalQuality(void) const return -1; } +const cChannel *cPvrDevice::GetCurrentlyTunedTransponder(void) const +{ + return &CurrentChannel; +} + +bool cPvrDevice::IsTunedToTransponder(const cChannel *Channel) const +{ + return CurrentChannel.GetChannelID() == Channel->GetChannelID(); +} + +bool cPvrDevice::MaySwitchTransponder(const cChannel *Channel) const +{ + return CurrentChannel.GetChannelID() == Channel->GetChannelID(); +} + bool cPvrDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const { bool result = false; @@ -135,6 +135,9 @@ public: virtual int NumProvidedSystems(void) const; virtual int SignalStrength(void) const; virtual int SignalQuality(void) const; + virtual const cChannel *GetCurrentlyTunedTransponder(void) const; + virtual bool IsTunedToTransponder(const cChannel *Channel) const; + virtual bool MaySwitchTransponder(const cChannel *Channel) 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); |