summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-02-06 14:43:42 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-02-06 14:43:42 +0100
commitf7831543b31ba77702ef0ea19e6ebd3f5baa2724 (patch)
tree27b5cb48d1da1aceb963536639493fbd63a71fe6
parent644a9f07f26df58b7d79cea8ea961c2232a092be (diff)
downloadvdr-f7831543b31ba77702ef0ea19e6ebd3f5baa2724.tar.gz
vdr-f7831543b31ba77702ef0ea19e6ebd3f5baa2724.tar.bz2
Implemented cDevice::GetCurrentlyTunedTransponder()
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--device.c7
-rw-r--r--device.h7
-rw-r--r--dvbdevice.c8
-rw-r--r--dvbdevice.h3
6 files changed, 23 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 58045fc9..d2eb7d32 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1247,6 +1247,7 @@ Reinhard Nissl <rnissl@gmx.de>
for improving handling frames at the beginning and end of a recording in cDvbPlayer
for devices with large buffers
for implementing cDeviceHook
+ for implementing cDevice::GetCurrentlyTunedTransponder()
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index 12b411f3..b827e111 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6321,3 +6321,4 @@ Video Disk Recorder Revision History
devices with large buffers (thanks to Reinhard Nissl).
- Implemented cDeviceHook to allow plugins more control over which device can
provide which transponder (thanks to Reinhard Nissl).
+- Implemented cDevice::GetCurrentlyTunedTransponder() (thanks to Reinhard Nissl).
diff --git a/device.c b/device.c
index 88c46736..4a30b69c 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 2.33 2010/02/06 13:55:50 kls Exp $
+ * $Id: device.c 2.34 2010/02/06 14:34:18 kls Exp $
*/
#include "device.h"
@@ -618,6 +618,11 @@ int cDevice::NumProvidedSystems(void) const
return 0;
}
+const cChannel *cDevice::GetCurrentlyTunedTransponder(void) const
+{
+ return NULL;
+}
+
bool cDevice::IsTunedToTransponder(const cChannel *Channel)
{
return false;
diff --git a/device.h b/device.h
index 9318bb1b..9ce814a1 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 2.20 2010/02/06 13:55:41 kls Exp $
+ * $Id: device.h 2.21 2010/02/06 14:34:41 kls Exp $
*/
#ifndef __DEVICE_H
@@ -247,6 +247,11 @@ public:
///< actually provide channels must implement this function.
///< The result of this function is used when selecting a device, in order
///< to avoid devices that provide more than one system.
+ virtual const cChannel *GetCurrentlyTunedTransponder(void) const;
+ ///< Returns a pointer to the currently tuned transponder.
+ ///< This is not one of the channels in the global cChannels list, but rather
+ ///< a local copy. The result may be NULL if the device is not tuned to any
+ ///< transponder.
virtual bool IsTunedToTransponder(const cChannel *Channel);
///< Returns true if this device is currently tuned to the given Channel's
///< transponder.
diff --git a/dvbdevice.c b/dvbdevice.c
index 05b89fc1..373628b6 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 2.25 2010/02/06 13:44:08 kls Exp $
+ * $Id: dvbdevice.c 2.26 2010/02/06 14:38:44 kls Exp $
*/
#include "dvbdevice.h"
@@ -48,6 +48,7 @@ private:
public:
cDvbTuner(int Fd_Frontend, int Adapter, int Frontend, fe_delivery_system FrontendType);
virtual ~cDvbTuner();
+ const cChannel *GetTransponder(void) const { return &channel; }
bool IsTunedTo(const cChannel *Channel) const;
void Set(const cChannel *Channel);
bool Locked(int TimeoutMs = 0);
@@ -655,6 +656,11 @@ int cDvbDevice::NumProvidedSystems(void) const
return numProvidedSystems;
}
+const cChannel *cDvbDevice::GetCurrentlyTunedTransponder(void) const
+{
+ return dvbTuner->GetTransponder();
+}
+
bool cDvbDevice::IsTunedToTransponder(const cChannel *Channel)
{
return dvbTuner->IsTunedTo(Channel);
diff --git a/dvbdevice.h b/dvbdevice.h
index b6cc950a..4f7c6e57 100644
--- a/dvbdevice.h
+++ b/dvbdevice.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.h 2.11 2010/01/04 14:07:12 kls Exp $
+ * $Id: dvbdevice.h 2.12 2010/02/06 14:36:24 kls Exp $
*/
#ifndef __DVBDEVICE_H
@@ -75,6 +75,7 @@ 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 const cChannel *GetCurrentlyTunedTransponder(void) const;
virtual bool IsTunedToTransponder(const cChannel *Channel);
protected:
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);