vdr: update to vdr-1.7.23

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2012-01-15 20:47:56 +01:00
parent 22476d73d9
commit 80e50a3fa2
4 changed files with 82 additions and 87 deletions

View File

@ -20,7 +20,7 @@
################################################################################ ################################################################################
PKG_NAME="vdr" PKG_NAME="vdr"
PKG_VERSION="1.7.22" PKG_VERSION="1.7.23"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -1,8 +1,7 @@
diff --git a/ci.h b/ci.h diff -Naur vdr-1.7.23/ci.h vdr-1.7.23.patch/ci.h
index 71bbdf9..70303d1 100644 --- vdr-1.7.23/ci.h 2011-12-04 14:38:17.000000000 +0100
--- a/ci.h +++ vdr-1.7.23.patch/ci.h 2012-01-15 20:43:01.098635790 +0100
+++ b/ci.h @@ -115,6 +115,8 @@
@@ -115,6 +115,8 @@ public:
///< The derived class must call Cancel(3) in its destructor. ///< The derived class must call Cancel(3) in its destructor.
virtual bool Ready(void); virtual bool Ready(void);
///< Returns 'true' if all present CAMs in this adapter are ready. ///< Returns 'true' if all present CAMs in this adapter are ready.
@ -11,11 +10,10 @@ index 71bbdf9..70303d1 100644
}; };
class cTPDU; class cTPDU;
diff --git a/device.c b/device.c diff -Naur vdr-1.7.23/device.c vdr-1.7.23.patch/device.c
index 0bab66c..60382dd 100644 --- vdr-1.7.23/device.c 2011-10-16 16:36:43.000000000 +0200
--- a/device.c +++ vdr-1.7.23.patch/device.c 2012-01-15 20:43:01.099635807 +0100
+++ b/device.c @@ -72,12 +72,22 @@
@@ -72,12 +72,22 @@ cDevice *cDevice::device[MAXDEVICES] = { NULL };
cDevice *cDevice::primaryDevice = NULL; cDevice *cDevice::primaryDevice = NULL;
cDevice *cDevice::avoidDevice = NULL; cDevice *cDevice::avoidDevice = NULL;
cList<cDeviceHook> cDevice::deviceHooks; cList<cDeviceHook> cDevice::deviceHooks;
@ -43,7 +41,7 @@ index 0bab66c..60382dd 100644
SetDescription("receiver on device %d", CardIndex() + 1); SetDescription("receiver on device %d", CardIndex() + 1);
@@ -110,10 +120,14 @@ cDevice::cDevice(void) @@ -110,10 +120,14 @@
for (int i = 0; i < MAXRECEIVERS; i++) for (int i = 0; i < MAXRECEIVERS; i++)
receiver[i] = NULL; receiver[i] = NULL;
@ -61,7 +59,7 @@ index 0bab66c..60382dd 100644
} }
cDevice::~cDevice() cDevice::~cDevice()
@@ -122,6 +136,29 @@ cDevice::~cDevice() @@ -122,6 +136,29 @@
DetachAllReceivers(); DetachAllReceivers();
delete liveSubtitle; delete liveSubtitle;
delete dvbSubtitleConverter; delete dvbSubtitleConverter;
@ -91,7 +89,7 @@ index 0bab66c..60382dd 100644
} }
bool cDevice::WaitForAllDevicesReady(int Timeout) bool cDevice::WaitForAllDevicesReady(int Timeout)
@@ -160,6 +197,8 @@ int cDevice::NextCardIndex(int n) @@ -160,6 +197,8 @@
int cDevice::DeviceNumber(void) const int cDevice::DeviceNumber(void) const
{ {
@ -100,7 +98,7 @@ index 0bab66c..60382dd 100644
for (int i = 0; i < numDevices; i++) { for (int i = 0; i < numDevices; i++) {
if (device[i] == this) if (device[i] == this)
return i; return i;
@@ -330,6 +369,8 @@ bool cDevice::HasCi(void) @@ -330,6 +369,8 @@
void cDevice::SetCamSlot(cCamSlot *CamSlot) void cDevice::SetCamSlot(cCamSlot *CamSlot)
{ {
@ -109,7 +107,7 @@ index 0bab66c..60382dd 100644
camSlot = CamSlot; camSlot = CamSlot;
} }
@@ -533,6 +574,10 @@ bool cDevice::SetPid(cPidHandle *Handle, int Type, bool On) @@ -533,6 +574,10 @@
void cDevice::StartSectionHandler(void) void cDevice::StartSectionHandler(void)
{ {
@ -120,7 +118,7 @@ index 0bab66c..60382dd 100644
if (!sectionHandler) { if (!sectionHandler) {
sectionHandler = new cSectionHandler(this); sectionHandler = new cSectionHandler(this);
AttachFilter(eitFilter = new cEitFilter); AttachFilter(eitFilter = new cEitFilter);
@@ -544,6 +589,10 @@ void cDevice::StartSectionHandler(void) @@ -544,6 +589,10 @@
void cDevice::StopSectionHandler(void) void cDevice::StopSectionHandler(void)
{ {
@ -131,7 +129,7 @@ index 0bab66c..60382dd 100644
if (sectionHandler) { if (sectionHandler) {
delete nitFilter; delete nitFilter;
delete sdtFilter; delete sdtFilter;
@@ -570,12 +619,17 @@ void cDevice::CloseFilter(int Handle) @@ -570,12 +619,17 @@
void cDevice::AttachFilter(cFilter *Filter) void cDevice::AttachFilter(cFilter *Filter)
{ {
@ -149,7 +147,7 @@ index 0bab66c..60382dd 100644
if (sectionHandler) if (sectionHandler)
sectionHandler->Detach(Filter); sectionHandler->Detach(Filter);
} }
@@ -737,6 +791,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) @@ -737,6 +791,7 @@
sectionHandler->SetStatus(false); sectionHandler->SetStatus(false);
sectionHandler->SetChannel(NULL); sectionHandler->SetChannel(NULL);
} }
@ -157,7 +155,7 @@ index 0bab66c..60382dd 100644
// Tell the camSlot about the channel switch and add all PIDs of this // Tell the camSlot about the channel switch and add all PIDs of this
// channel to it, for possible later decryption: // channel to it, for possible later decryption:
if (camSlot) if (camSlot)
@@ -783,19 +838,27 @@ void cDevice::ForceTransferMode(void) @@ -783,19 +838,27 @@
{ {
if (!cTransferControl::ReceiverDevice()) { if (!cTransferControl::ReceiverDevice()) {
cChannel *Channel = Channels.GetByNumber(CurrentChannel()); cChannel *Channel = Channels.GetByNumber(CurrentChannel());
@ -186,7 +184,7 @@ index 0bab66c..60382dd 100644
if (Seconds >= 0) if (Seconds >= 0)
occupiedTimeout = time(NULL) + min(Seconds, MAXOCCUPIEDTIMEOUT); occupiedTimeout = time(NULL) + min(Seconds, MAXOCCUPIEDTIMEOUT);
} }
@@ -1167,7 +1230,10 @@ bool cDevice::Transferring(void) const @@ -1167,7 +1230,10 @@
bool cDevice::AttachPlayer(cPlayer *Player) bool cDevice::AttachPlayer(cPlayer *Player)
{ {
@ -197,7 +195,7 @@ index 0bab66c..60382dd 100644
if (player) if (player)
Detach(player); Detach(player);
DELETENULL(liveSubtitle); DELETENULL(liveSubtitle);
@@ -1186,6 +1252,8 @@ bool cDevice::AttachPlayer(cPlayer *Player) @@ -1186,6 +1252,8 @@
void cDevice::Detach(cPlayer *Player) void cDevice::Detach(cPlayer *Player)
{ {
@ -206,7 +204,7 @@ index 0bab66c..60382dd 100644
if (Player && player == Player) { if (Player && player == Player) {
cPlayer *p = player; cPlayer *p = player;
player = NULL; // avoids recursive calls to Detach() player = NULL; // avoids recursive calls to Detach()
@@ -1205,6 +1273,8 @@ void cDevice::Detach(cPlayer *Player) @@ -1205,6 +1273,8 @@
void cDevice::StopReplay(void) void cDevice::StopReplay(void)
{ {
@ -215,7 +213,7 @@ index 0bab66c..60382dd 100644
if (player) { if (player) {
Detach(player); Detach(player);
if (IsPrimaryDevice()) if (IsPrimaryDevice())
@@ -1487,6 +1557,8 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) @@ -1487,6 +1557,8 @@
int cDevice::Priority(void) const int cDevice::Priority(void) const
{ {
@ -224,7 +222,7 @@ index 0bab66c..60382dd 100644
int priority = IsPrimaryDevice() ? Setup.PrimaryLimit - 1 : DEFAULTPRIORITY; int priority = IsPrimaryDevice() ? Setup.PrimaryLimit - 1 : DEFAULTPRIORITY;
cMutexLock MutexLock(&mutexReceiver); cMutexLock MutexLock(&mutexReceiver);
for (int i = 0; i < MAXRECEIVERS; i++) { for (int i = 0; i < MAXRECEIVERS; i++) {
@@ -1503,6 +1575,8 @@ bool cDevice::Ready(void) @@ -1503,6 +1575,8 @@
bool cDevice::Receiving(bool CheckAny) const bool cDevice::Receiving(bool CheckAny) const
{ {
@ -233,7 +231,7 @@ index 0bab66c..60382dd 100644
cMutexLock MutexLock(&mutexReceiver); cMutexLock MutexLock(&mutexReceiver);
for (int i = 0; i < MAXRECEIVERS; i++) { for (int i = 0; i < MAXRECEIVERS; i++) {
if (receiver[i] && (CheckAny || receiver[i]->priority >= 0)) // cReceiver with priority < 0 doesn't count if (receiver[i] && (CheckAny || receiver[i]->priority >= 0)) // cReceiver with priority < 0 doesn't count
@@ -1583,10 +1657,13 @@ bool cDevice::GetTSPacket(uchar *&Data) @@ -1583,10 +1657,13 @@
bool cDevice::AttachReceiver(cReceiver *Receiver) bool cDevice::AttachReceiver(cReceiver *Receiver)
{ {
@ -247,7 +245,7 @@ index 0bab66c..60382dd 100644
// activate the following line if you need it - actually the driver should be fixed! // activate the following line if you need it - actually the driver should be fixed!
//#define WAIT_FOR_TUNER_LOCK //#define WAIT_FOR_TUNER_LOCK
#ifdef WAIT_FOR_TUNER_LOCK #ifdef WAIT_FOR_TUNER_LOCK
@@ -1625,6 +1702,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver) @@ -1625,6 +1702,8 @@
void cDevice::Detach(cReceiver *Receiver) void cDevice::Detach(cReceiver *Receiver)
{ {
@ -256,7 +254,7 @@ index 0bab66c..60382dd 100644
if (!Receiver || Receiver->device != this) if (!Receiver || Receiver->device != this)
return; return;
bool receiversLeft = false; bool receiversLeft = false;
@@ -1650,6 +1729,8 @@ void cDevice::Detach(cReceiver *Receiver) @@ -1650,6 +1729,8 @@
void cDevice::DetachAll(int Pid) void cDevice::DetachAll(int Pid)
{ {
@ -265,7 +263,7 @@ index 0bab66c..60382dd 100644
if (Pid) { if (Pid) {
cMutexLock MutexLock(&mutexReceiver); cMutexLock MutexLock(&mutexReceiver);
for (int i = 0; i < MAXRECEIVERS; i++) { for (int i = 0; i < MAXRECEIVERS; i++) {
@@ -1662,6 +1743,8 @@ void cDevice::DetachAll(int Pid) @@ -1662,6 +1743,8 @@
void cDevice::DetachAllReceivers(void) void cDevice::DetachAllReceivers(void)
{ {
@ -274,7 +272,7 @@ index 0bab66c..60382dd 100644
cMutexLock MutexLock(&mutexReceiver); cMutexLock MutexLock(&mutexReceiver);
for (int i = 0; i < MAXRECEIVERS; i++) for (int i = 0; i < MAXRECEIVERS; i++)
Detach(receiver[i]); Detach(receiver[i]);
@@ -1733,3 +1816,25 @@ uchar *cTSBuffer::Get(void) @@ -1733,3 +1816,25 @@
} }
return NULL; return NULL;
} }
@ -300,11 +298,10 @@ index 0bab66c..60382dd 100644
+{ +{
+ DynamicDeviceProbes.Del(this, false); + DynamicDeviceProbes.Del(this, false);
+} +}
diff --git a/device.h b/device.h diff -Naur vdr-1.7.23/device.h vdr-1.7.23.patch/device.h
index e2ff812..1db0d9d 100644 --- vdr-1.7.23/device.h 2011-12-04 14:38:17.000000000 +0100
--- a/device.h +++ vdr-1.7.23.patch/device.h 2012-01-15 20:43:01.100635824 +0100
+++ b/device.h @@ -164,7 +164,6 @@
@@ -164,7 +164,6 @@ private:
static int nextCardIndex; static int nextCardIndex;
int cardIndex; int cardIndex;
protected: protected:
@ -312,7 +309,7 @@ index e2ff812..1db0d9d 100644
virtual ~cDevice(); virtual ~cDevice();
virtual bool Ready(void); virtual bool Ready(void);
///< Returns true if this device is ready. Devices with conditional ///< Returns true if this device is ready. Devices with conditional
@@ -191,9 +190,6 @@ protected: @@ -191,9 +190,6 @@
///< A derived class must call the MakePrimaryDevice() function of its ///< A derived class must call the MakePrimaryDevice() function of its
///< base class. ///< base class.
public: public:
@ -322,7 +319,7 @@ index e2ff812..1db0d9d 100644
int DeviceNumber(void) const; int DeviceNumber(void) const;
///< Returns the number of this device (0 ... numDevices). ///< Returns the number of this device (0 ... numDevices).
virtual bool HasDecoder(void) const; virtual bool HasDecoder(void) const;
@@ -397,9 +393,6 @@ public: @@ -397,9 +393,6 @@
///< Returns true if this device has a Common Interface. ///< Returns true if this device has a Common Interface.
void SetCamSlot(cCamSlot *CamSlot); void SetCamSlot(cCamSlot *CamSlot);
///< Sets the given CamSlot to be used with this device. ///< Sets the given CamSlot to be used with this device.
@ -332,7 +329,7 @@ index e2ff812..1db0d9d 100644
// Image Grab facilities // Image Grab facilities
@@ -555,9 +548,6 @@ private: @@ -555,9 +548,6 @@
cTsToPes tsToPesSubtitle; cTsToPes tsToPesSubtitle;
bool isPlayingVideo; bool isPlayingVideo;
protected: protected:
@ -342,7 +339,7 @@ index e2ff812..1db0d9d 100644
virtual bool CanReplay(void) const; virtual bool CanReplay(void) const;
///< Returns true if this device can currently start a replay session. ///< Returns true if this device can currently start a replay session.
virtual bool SetPlayMode(ePlayMode PlayMode); virtual bool SetPlayMode(ePlayMode PlayMode);
@@ -743,6 +733,38 @@ public: @@ -743,6 +733,38 @@
///< Detaches all receivers from this device for this pid. ///< Detaches all receivers from this device for this pid.
virtual void DetachAllReceivers(void); virtual void DetachAllReceivers(void);
///< Detaches all receivers from this device. ///< Detaches all receivers from this device.
@ -381,7 +378,7 @@ index e2ff812..1db0d9d 100644
}; };
/// Derived cDevice classes that can receive channels will have to provide /// Derived cDevice classes that can receive channels will have to provide
@@ -766,4 +788,47 @@ public: @@ -766,4 +788,47 @@
uchar *Get(void); uchar *Get(void);
}; };
@ -429,10 +426,9 @@ index e2ff812..1db0d9d 100644
+extern cList<cDynamicDeviceProbe> DynamicDeviceProbes; +extern cList<cDynamicDeviceProbe> DynamicDeviceProbes;
+ +
#endif //__DEVICE_H #endif //__DEVICE_H
diff --git a/dvbci.c b/dvbci.c diff -Naur vdr-1.7.23/dvbci.c vdr-1.7.23.patch/dvbci.c
index 5289bbd..fea3a83 100644 --- vdr-1.7.23/dvbci.c 2007-01-04 13:49:10.000000000 +0100
--- a/dvbci.c +++ vdr-1.7.23.patch/dvbci.c 2012-01-15 20:43:01.101635842 +0100
+++ b/dvbci.c
@@ -10,15 +10,18 @@ @@ -10,15 +10,18 @@
#include "dvbci.h" #include "dvbci.h"
#include <linux/dvb/ca.h> #include <linux/dvb/ca.h>
@ -454,7 +450,7 @@ index 5289bbd..fea3a83 100644
ca_caps_t Caps; ca_caps_t Caps;
if (ioctl(fd, CA_GET_CAP, &Caps) == 0) { if (ioctl(fd, CA_GET_CAP, &Caps) == 0) {
if ((Caps.slot_type & CA_CI_LINK) != 0) { if ((Caps.slot_type & CA_CI_LINK) != 0) {
@@ -41,10 +44,44 @@ cDvbCiAdapter::cDvbCiAdapter(cDevice *Device, int Fd) @@ -41,10 +44,44 @@
cDvbCiAdapter::~cDvbCiAdapter() cDvbCiAdapter::~cDvbCiAdapter()
{ {
Cancel(3); Cancel(3);
@ -499,7 +495,7 @@ index 5289bbd..fea3a83 100644
if (Buffer && MaxLength > 0) { if (Buffer && MaxLength > 0) {
struct pollfd pfd[1]; struct pollfd pfd[1];
pfd[0].fd = fd; pfd[0].fd = fd;
@@ -61,6 +98,8 @@ int cDvbCiAdapter::Read(uint8_t *Buffer, int MaxLength) @@ -61,6 +98,8 @@
void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length) void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length)
{ {
@ -508,7 +504,7 @@ index 5289bbd..fea3a83 100644
if (Buffer && Length > 0) { if (Buffer && Length > 0) {
if (safe_write(fd, Buffer, Length) != Length) if (safe_write(fd, Buffer, Length) != Length)
esyslog("ERROR: can't write to CI adapter on device %d: %m", device->DeviceNumber()); esyslog("ERROR: can't write to CI adapter on device %d: %m", device->DeviceNumber());
@@ -69,6 +108,8 @@ void cDvbCiAdapter::Write(const uint8_t *Buffer, int Length) @@ -69,6 +108,8 @@
bool cDvbCiAdapter::Reset(int Slot) bool cDvbCiAdapter::Reset(int Slot)
{ {
@ -517,7 +513,7 @@ index 5289bbd..fea3a83 100644
if (ioctl(fd, CA_RESET, 1 << Slot) != -1) if (ioctl(fd, CA_RESET, 1 << Slot) != -1)
return true; return true;
else else
@@ -78,6 +119,8 @@ bool cDvbCiAdapter::Reset(int Slot) @@ -78,6 +119,8 @@
eModuleStatus cDvbCiAdapter::ModuleStatus(int Slot) eModuleStatus cDvbCiAdapter::ModuleStatus(int Slot)
{ {
@ -526,7 +522,7 @@ index 5289bbd..fea3a83 100644
ca_slot_info_t sinfo; ca_slot_info_t sinfo;
sinfo.num = Slot; sinfo.num = Slot;
if (ioctl(fd, CA_GET_SLOT_INFO, &sinfo) != -1) { if (ioctl(fd, CA_GET_SLOT_INFO, &sinfo) != -1) {
@@ -99,10 +142,10 @@ bool cDvbCiAdapter::Assign(cDevice *Device, bool Query) @@ -99,10 +142,10 @@
return true; return true;
} }
@ -539,11 +535,10 @@ index 5289bbd..fea3a83 100644
+ return new cDvbCiAdapter(Device, Fd, Adapter, Frontend); + return new cDvbCiAdapter(Device, Fd, Adapter, Frontend);
return NULL; return NULL;
} }
diff --git a/dvbci.h b/dvbci.h diff -Naur vdr-1.7.23/dvbci.h vdr-1.7.23.patch/dvbci.h
index adbe40d..6d117b2 100644 --- vdr-1.7.23/dvbci.h 2006-11-26 12:19:42.000000000 +0100
--- a/dvbci.h +++ vdr-1.7.23.patch/dvbci.h 2012-01-15 20:43:01.101635842 +0100
+++ b/dvbci.h @@ -16,16 +16,24 @@
@@ -16,16 +16,24 @@ class cDvbCiAdapter : public cCiAdapter {
private: private:
cDevice *device; cDevice *device;
int fd; int fd;
@ -570,13 +565,12 @@ index adbe40d..6d117b2 100644
}; };
#endif //__DVBCI_H #endif //__DVBCI_H
diff --git a/dvbdevice.c b/dvbdevice.c diff -Naur vdr-1.7.23/dvbdevice.c vdr-1.7.23.patch/dvbdevice.c
index 163fce3..fd3f212 100644 --- vdr-1.7.23/dvbdevice.c 2012-01-15 15:31:47.000000000 +0100
--- a/dvbdevice.c +++ vdr-1.7.23.patch/dvbdevice.c 2012-01-15 20:43:56.452618963 +0100
+++ b/dvbdevice.c @@ -305,12 +305,16 @@
@@ -280,12 +280,16 @@ private:
bool bondedMaster;
bool bondedMasterFailed; bool bondedMasterFailed;
bool SetFrontendType(const cChannel *Channel);
cString GetBondingParams(const cChannel *Channel = NULL) const; cString GetBondingParams(const cChannel *Channel = NULL) const;
- void ClearEventQueue(void) const; - void ClearEventQueue(void) const;
- bool GetFrontendStatus(fe_status_t &Status) const; - bool GetFrontendStatus(fe_status_t &Status) const;
@ -591,9 +585,9 @@ index 163fce3..fd3f212 100644
+ bool OpenFrontend(void); + bool OpenFrontend(void);
+ bool CloseFrontend(void); + bool CloseFrontend(void);
public: public:
cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int Frontend, fe_delivery_system FrontendType); cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int Frontend);
virtual ~cDvbTuner(); virtual ~cDvbTuner();
@@ -298,8 +302,11 @@ public: @@ -323,8 +327,11 @@
bool IsTunedTo(const cChannel *Channel) const; bool IsTunedTo(const cChannel *Channel) const;
void SetChannel(const cChannel *Channel); void SetChannel(const cChannel *Channel);
bool Locked(int TimeoutMs = 0); bool Locked(int TimeoutMs = 0);
@ -607,15 +601,15 @@ index 163fce3..fd3f212 100644
}; };
cMutex cDvbTuner::bondMutex; cMutex cDvbTuner::bondMutex;
@@ -321,6 +328,7 @@ cDvbTuner::cDvbTuner(const cDvbDevice *Device, int Fd_Frontend, int Adapter, int @@ -346,6 +353,7 @@
bondedTuner = NULL; bondedTuner = NULL;
bondedMaster = false; bondedMaster = false;
bondedMasterFailed = false; bondedMasterFailed = false;
+ isIdle = false; + isIdle = false;
if (frontendType == SYS_DVBS || frontendType == SYS_DVBS2)
ResetToneAndVoltage(); // must explicitly turn on LNB power
SetDescription("tuner on frontend %d/%d", adapter, frontend); SetDescription("tuner on frontend %d/%d", adapter, frontend);
@@ -340,6 +348,8 @@ cDvbTuner::~cDvbTuner() Start();
}
@@ -363,6 +371,8 @@
ExecuteDiseqc(lastDiseqc, &Frequency); ExecuteDiseqc(lastDiseqc, &Frequency);
} }
*/ */
@ -624,7 +618,7 @@ index 163fce3..fd3f212 100644
} }
bool cDvbTuner::Bond(cDvbTuner *Tuner) bool cDvbTuner::Bond(cDvbTuner *Tuner)
@@ -497,8 +507,10 @@ bool cDvbTuner::Locked(int TimeoutMs) @@ -516,8 +526,10 @@
return tunerStatus >= tsLocked; return tunerStatus >= tsLocked;
} }
@ -636,7 +630,7 @@ index 163fce3..fd3f212 100644
cPoller Poller(fd_frontend); cPoller Poller(fd_frontend);
if (Poller.Poll(TUNER_POLL_TIMEOUT)) { if (Poller.Poll(TUNER_POLL_TIMEOUT)) {
dvb_frontend_event Event; dvb_frontend_event Event;
@@ -507,7 +519,7 @@ void cDvbTuner::ClearEventQueue(void) const @@ -526,7 +538,7 @@
} }
} }
@ -645,7 +639,7 @@ index 163fce3..fd3f212 100644
{ {
ClearEventQueue(); ClearEventQueue();
while (1) { while (1) {
@@ -522,7 +534,7 @@ bool cDvbTuner::GetFrontendStatus(fe_status_t &Status) const @@ -541,7 +553,7 @@
//#define DEBUG_SIGNALSTRENGTH //#define DEBUG_SIGNALSTRENGTH
//#define DEBUG_SIGNALQUALITY //#define DEBUG_SIGNALQUALITY
@ -654,7 +648,7 @@ index 163fce3..fd3f212 100644
{ {
ClearEventQueue(); ClearEventQueue();
uint16_t Signal; uint16_t Signal;
@@ -549,7 +561,7 @@ int cDvbTuner::GetSignalStrength(void) const @@ -568,7 +580,7 @@
#define LOCK_THRESHOLD 5 // indicates that all 5 FE_HAS_* flags are set #define LOCK_THRESHOLD 5 // indicates that all 5 FE_HAS_* flags are set
@ -663,7 +657,7 @@ index 163fce3..fd3f212 100644
{ {
fe_status_t Status; fe_status_t Status;
if (GetFrontendStatus(Status)) { if (GetFrontendStatus(Status)) {
@@ -664,6 +676,8 @@ void cDvbTuner::ResetToneAndVoltage(void) @@ -708,6 +720,8 @@
bool cDvbTuner::SetFrontend(void) bool cDvbTuner::SetFrontend(void)
{ {
@ -672,7 +666,7 @@ index 163fce3..fd3f212 100644
#define MAXFRONTENDCMDS 16 #define MAXFRONTENDCMDS 16
#define SETCMD(c, d) { Frontend[CmdSeq.num].cmd = (c);\ #define SETCMD(c, d) { Frontend[CmdSeq.num].cmd = (c);\
Frontend[CmdSeq.num].u.data = (d);\ Frontend[CmdSeq.num].u.data = (d);\
@@ -809,9 +823,11 @@ void cDvbTuner::Action(void) @@ -853,9 +867,11 @@
bool LostLock = false; bool LostLock = false;
fe_status_t Status = (fe_status_t)0; fe_status_t Status = (fe_status_t)0;
while (Running()) { while (Running()) {
@ -687,7 +681,7 @@ index 163fce3..fd3f212 100644
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
switch (tunerStatus) { switch (tunerStatus) {
case tsIdle: case tsIdle:
@@ -867,6 +883,42 @@ void cDvbTuner::Action(void) @@ -911,6 +927,42 @@
} }
} }
@ -730,7 +724,7 @@ index 163fce3..fd3f212 100644
// --- cDvbSourceParam ------------------------------------------------------- // --- cDvbSourceParam -------------------------------------------------------
class cDvbSourceParam : public cSourceParam { class cDvbSourceParam : public cSourceParam {
@@ -948,7 +1000,8 @@ const char *DeliverySystems[] = { @@ -996,7 +1048,8 @@
NULL NULL
}; };
@ -740,7 +734,7 @@ index 163fce3..fd3f212 100644
{ {
adapter = Adapter; adapter = Adapter;
frontend = Frontend; frontend = Frontend;
@@ -967,7 +1020,7 @@ cDvbDevice::cDvbDevice(int Adapter, int Frontend) @@ -1015,7 +1068,7 @@
fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR); fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR);
if (fd_ca >= 0) if (fd_ca >= 0)
@ -749,7 +743,7 @@ index 163fce3..fd3f212 100644
// The DVR device (will be opened and closed as needed): // The DVR device (will be opened and closed as needed):
@@ -1123,7 +1176,11 @@ bool cDvbDevice::BondDevices(const char *Bondings) @@ -1208,7 +1261,11 @@
if (d >= 0) { if (d >= 0) {
int ErrorDevice = 0; int ErrorDevice = 0;
if (cDevice *Device1 = cDevice::GetDevice(i)) { if (cDevice *Device1 = cDevice::GetDevice(i)) {
@ -760,8 +754,8 @@ index 163fce3..fd3f212 100644
+ Device2 = Device2->SubDevice(); + Device2 = Device2->SubDevice();
if (cDvbDevice *DvbDevice1 = dynamic_cast<cDvbDevice *>(Device1)) { if (cDvbDevice *DvbDevice1 = dynamic_cast<cDvbDevice *>(Device1)) {
if (cDvbDevice *DvbDevice2 = dynamic_cast<cDvbDevice *>(Device2)) { if (cDvbDevice *DvbDevice2 = dynamic_cast<cDvbDevice *>(Device2)) {
if (!DvbDevice2->Bond(DvbDevice1)) if (!DvbDevice1->Bond(DvbDevice2))
@@ -1157,7 +1214,10 @@ bool cDvbDevice::BondDevices(const char *Bondings) @@ -1242,7 +1299,10 @@
void cDvbDevice::UnBondDevices(void) void cDvbDevice::UnBondDevices(void)
{ {
for (int i = 0; i < cDevice::NumDevices(); i++) { for (int i = 0; i < cDevice::NumDevices(); i++) {
@ -773,7 +767,7 @@ index 163fce3..fd3f212 100644
d->UnBond(); d->UnBond();
} }
} }
@@ -1211,6 +1271,26 @@ bool cDvbDevice::BondingOk(const cChannel *Channel, bool ConsiderOccupied) const @@ -1296,6 +1356,26 @@
return true; return true;
} }
@ -800,7 +794,7 @@ index 163fce3..fd3f212 100644
bool cDvbDevice::HasCi(void) bool cDvbDevice::HasCi(void)
{ {
return ciAdapter; return ciAdapter;
@@ -1370,7 +1450,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne @@ -1464,7 +1544,7 @@
bool cDvbDevice::ProvidesEIT(void) const bool cDvbDevice::ProvidesEIT(void) const
{ {
@ -809,11 +803,10 @@ index 163fce3..fd3f212 100644
} }
int cDvbDevice::NumProvidedSystems(void) const int cDvbDevice::NumProvidedSystems(void) const
diff --git a/dvbdevice.h b/dvbdevice.h diff -Naur vdr-1.7.23/dvbdevice.h vdr-1.7.23.patch/dvbdevice.h
index 2072ab2..d9f6e8d 100644 --- vdr-1.7.23/dvbdevice.h 2012-01-13 12:32:45.000000000 +0100
--- a/dvbdevice.h +++ vdr-1.7.23.patch/dvbdevice.h 2012-01-15 20:45:09.239911783 +0100
+++ b/dvbdevice.h @@ -106,7 +106,7 @@
@@ -102,7 +102,7 @@ class cDvbTuner;
/// The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API. /// The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
class cDvbDevice : public cDevice { class cDvbDevice : public cDevice {
@ -822,13 +815,15 @@ index 2072ab2..d9f6e8d 100644
static cString DvbName(const char *Name, int Adapter, int Frontend); static cString DvbName(const char *Name, int Adapter, int Frontend);
static int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError = false); static int DvbOpen(const char *Name, int Adapter, int Frontend, int Mode, bool ReportError = false);
private: private:
@@ -126,9 +126,11 @@ private: @@ -132,11 +132,13 @@
cDvbDevice *bondedDevice;
mutable bool needsDetachBondedReceivers; mutable bool needsDetachBondedReceivers;
bool QueryDeliverySystems(int fd_frontend);
public: public:
- cDvbDevice(int Adapter, int Frontend); - cDvbDevice(int Adapter, int Frontend);
+ cDvbDevice(int Adapter, int Frontend, cDevice *ParentDevice = NULL); + cDvbDevice(int Adapter, int Frontend, cDevice *ParentDevice = NULL);
virtual ~cDvbDevice(); virtual ~cDvbDevice();
int Adapter(void) const { return adapter; }
int Frontend(void) const { return frontend; }
virtual bool Ready(void); virtual bool Ready(void);
+ virtual bool SetIdleDevice(bool Idle, bool TestOnly); + virtual bool SetIdleDevice(bool Idle, bool TestOnly);
+ +