summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2014-01-07 19:19:31 (GMT)
committerLars Hanisch <dvb@flensrocker.de>2014-01-07 19:19:31 (GMT)
commit38ffaa978886f85db84fa893d1fcd3f6fba11e58 (patch)
treebd68e515b6bfdb28d3ca6b92b39c19f11d16006a
parent027ca58137467a44ee382e732781042cacba355c (diff)
downloadvdr-plugin-pvrinput-38ffaa978886f85db84fa893d1fcd3f6fba11e58.tar.gz
vdr-plugin-pvrinput-38ffaa978886f85db84fa893d1fcd3f6fba11e58.tar.bz2
override GetCurrentlyTunedTransponder, IsTunedToTransponder and MaySwitchTransponder from cDevice
-rw-r--r--device.c17
-rw-r--r--device.h3
2 files changed, 19 insertions, 1 deletions
diff --git a/device.c b/device.c
index b90266c..6b86c88 100644
--- a/device.c
+++ b/device.c
@@ -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;
diff --git a/device.h b/device.h
index f2f720a..3714ff2 100644
--- a/device.h
+++ b/device.h
@@ -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);