1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Implemented cDevice::GetCurrentlyTunedTransponder()

This commit is contained in:
Klaus Schmidinger 2010-02-06 14:43:42 +01:00
parent 644a9f07f2
commit f7831543b3
6 changed files with 23 additions and 4 deletions

View File

@ -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

View File

@ -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).

View File

@ -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;

View File

@ -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.

View File

@ -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);

View File

@ -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);