Implemented automatic PID switching and channel detection

This commit is contained in:
Klaus Schmidinger
2004-01-04 12:30:00 +01:00
parent 3a1058fe1f
commit 8976ebcec5
31 changed files with 1069 additions and 300 deletions

View File

@@ -12,3 +12,7 @@ VDR Plugin 'sky' Revision History
2003-05-09: Version 0.1.1
- Changed Start() to Initialize().
2004-01-04: Version 0.2.0
- Implemented automatic PID switching and channel detection

View File

@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: sky.c 1.3 2003/05/09 15:27:16 kls Exp $
* $Id: sky.c 1.4 2004/01/04 12:30:00 kls Exp $
*/
#include <sys/socket.h>
@@ -14,7 +14,7 @@
#include <vdr/plugin.h>
#include <vdr/sources.h>
static const char *VERSION = "0.1.1";
static const char *VERSION = "0.2.0";
static const char *DESCRIPTION = "Sky Digibox interface";
// --- cDigiboxDevice --------------------------------------------------------
@@ -37,6 +37,7 @@ public:
cDigiboxDevice(void);
virtual ~cDigiboxDevice();
virtual bool ProvidesSource(int Source) const;
virtual bool ProvidesTransponder(const cChannel *Channel) const;
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsSetChannel = NULL) const;
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
};
@@ -137,13 +138,18 @@ bool cDigiboxDevice::ProvidesSource(int Source) const
return source == Source;
}
bool cDigiboxDevice::ProvidesTransponder(const cChannel *Channel) const
{
return false; // can't provide any actual transponder
}
bool cDigiboxDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
{
bool result = false;
bool hasPriority = Priority < 0 || Priority > this->Priority();
bool needsDetachReceivers = true;
if (ProvidesSource(Channel->Source()) && ProvidesCa(Channel->Ca())) {
if (ProvidesSource(Channel->Source()) && Channel->Ca() == 0x30) {//XXX
if (Receiving()) {
if (digiboxChannelNumber == Channel->Frequency()) {
needsDetachReceivers = false;