diff options
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | device.c | 7 | ||||
-rw-r--r-- | device.h | 7 | ||||
-rw-r--r-- | dvbdevice.c | 8 | ||||
-rw-r--r-- | dvbdevice.h | 3 |
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 @@ -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). @@ -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; @@ -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); |