diff options
author | Lars Hanisch <dvb@flensrocker.de> | 2011-09-04 17:27:59 +0200 |
---|---|---|
committer | Lars Hanisch <dvb@flensrocker.de> | 2011-09-04 17:27:59 +0200 |
commit | 5b92547524f236b1b08444e8347a64ff657d3ca8 (patch) | |
tree | 7d2f2135ad5959388fa75dd8beddd6738f2f7756 /patches/vdr-1.7.20-dynamite-subdevice.patch | |
parent | c5908321b8f3878fa087a788025339a98714df14 (diff) | |
download | vdr-plugin-dynamite-5b92547524f236b1b08444e8347a64ff657d3ca8.tar.gz vdr-plugin-dynamite-5b92547524f236b1b08444e8347a64ff657d3ca8.tar.bz2 |
add patch for vdr 1.7.21 and refactored patch for vdr 1.7.20 to work with dynamite 0.0.8v0.0.8
Diffstat (limited to 'patches/vdr-1.7.20-dynamite-subdevice.patch')
-rw-r--r-- | patches/vdr-1.7.20-dynamite-subdevice.patch | 96 |
1 files changed, 66 insertions, 30 deletions
diff --git a/patches/vdr-1.7.20-dynamite-subdevice.patch b/patches/vdr-1.7.20-dynamite-subdevice.patch index 30c4803..efd8c19 100644 --- a/patches/vdr-1.7.20-dynamite-subdevice.patch +++ b/patches/vdr-1.7.20-dynamite-subdevice.patch @@ -12,7 +12,7 @@ index c31dccf..daa18f6 100644 class cTPDU; diff --git a/device.c b/device.c -index 0759993..e1ac665 100644 +index 0759993..764cf98 100644 --- a/device.c +++ b/device.c @@ -72,12 +72,22 @@ cDevice *cDevice::device[MAXDEVICES] = { NULL }; @@ -148,7 +148,19 @@ index 0759993..e1ac665 100644 if (sectionHandler) sectionHandler->Detach(Filter); } -@@ -730,6 +784,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) +@@ -613,6 +667,11 @@ bool cDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Needs + return false; + } + ++bool cDevice::ProvidesEIT(void) const ++{ ++ return false; ++} ++ + int cDevice::NumProvidedSystems(void) const + { + return 0; +@@ -730,6 +789,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) sectionHandler->SetStatus(false); sectionHandler->SetChannel(NULL); } @@ -156,7 +168,7 @@ index 0759993..e1ac665 100644 // Tell the camSlot about the channel switch and add all PIDs of this // channel to it, for possible later decryption: if (camSlot) -@@ -776,8 +831,10 @@ void cDevice::ForceTransferMode(void) +@@ -776,8 +836,10 @@ void cDevice::ForceTransferMode(void) { if (!cTransferControl::ReceiverDevice()) { cChannel *Channel = Channels.GetByNumber(CurrentChannel()); @@ -168,7 +180,7 @@ index 0759993..e1ac665 100644 } } -@@ -1148,7 +1205,10 @@ bool cDevice::Transferring(void) const +@@ -1148,7 +1210,10 @@ bool cDevice::Transferring(void) const bool cDevice::AttachPlayer(cPlayer *Player) { @@ -179,7 +191,7 @@ index 0759993..e1ac665 100644 if (player) Detach(player); DELETENULL(liveSubtitle); -@@ -1167,6 +1227,8 @@ bool cDevice::AttachPlayer(cPlayer *Player) +@@ -1167,6 +1232,8 @@ bool cDevice::AttachPlayer(cPlayer *Player) void cDevice::Detach(cPlayer *Player) { @@ -188,7 +200,7 @@ index 0759993..e1ac665 100644 if (Player && player == Player) { cPlayer *p = player; player = NULL; // avoids recursive calls to Detach() -@@ -1186,6 +1248,8 @@ void cDevice::Detach(cPlayer *Player) +@@ -1186,6 +1253,8 @@ void cDevice::Detach(cPlayer *Player) void cDevice::StopReplay(void) { @@ -197,7 +209,7 @@ index 0759993..e1ac665 100644 if (player) { Detach(player); if (IsPrimaryDevice()) -@@ -1468,6 +1532,8 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) +@@ -1468,6 +1537,8 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) int cDevice::Priority(void) const { @@ -206,7 +218,7 @@ index 0759993..e1ac665 100644 int priority = IsPrimaryDevice() ? Setup.PrimaryLimit - 1 : DEFAULTPRIORITY; for (int i = 0; i < MAXRECEIVERS; i++) { if (receiver[i]) -@@ -1483,6 +1549,8 @@ bool cDevice::Ready(void) +@@ -1483,6 +1554,8 @@ bool cDevice::Ready(void) bool cDevice::Receiving(bool CheckAny) const { @@ -215,7 +227,7 @@ index 0759993..e1ac665 100644 for (int i = 0; i < MAXRECEIVERS; i++) { if (receiver[i] && (CheckAny || receiver[i]->priority >= 0)) // cReceiver with priority < 0 doesn't count return true; -@@ -1562,10 +1630,13 @@ bool cDevice::GetTSPacket(uchar *&Data) +@@ -1562,10 +1635,13 @@ bool cDevice::GetTSPacket(uchar *&Data) bool cDevice::AttachReceiver(cReceiver *Receiver) { @@ -229,7 +241,7 @@ index 0759993..e1ac665 100644 // activate the following line if you need it - actually the driver should be fixed! //#define WAIT_FOR_TUNER_LOCK #ifdef WAIT_FOR_TUNER_LOCK -@@ -1604,6 +1675,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver) +@@ -1604,6 +1680,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver) void cDevice::Detach(cReceiver *Receiver) { @@ -238,7 +250,7 @@ index 0759993..e1ac665 100644 if (!Receiver || Receiver->device != this) return; bool receiversLeft = false; -@@ -1629,6 +1702,8 @@ void cDevice::Detach(cReceiver *Receiver) +@@ -1629,6 +1707,8 @@ void cDevice::Detach(cReceiver *Receiver) void cDevice::DetachAll(int Pid) { @@ -247,7 +259,7 @@ index 0759993..e1ac665 100644 if (Pid) { cMutexLock MutexLock(&mutexReceiver); for (int i = 0; i < MAXRECEIVERS; i++) { -@@ -1641,6 +1716,8 @@ void cDevice::DetachAll(int Pid) +@@ -1641,6 +1721,8 @@ void cDevice::DetachAll(int Pid) void cDevice::DetachAllReceivers(void) { @@ -256,7 +268,7 @@ index 0759993..e1ac665 100644 cMutexLock MutexLock(&mutexReceiver); for (int i = 0; i < MAXRECEIVERS; i++) Detach(receiver[i]); -@@ -1712,3 +1789,25 @@ uchar *cTSBuffer::Get(void) +@@ -1712,3 +1794,25 @@ uchar *cTSBuffer::Get(void) } return NULL; } @@ -283,7 +295,7 @@ index 0759993..e1ac665 100644 + DynamicDeviceProbes.Del(this, false); +} diff --git a/device.h b/device.h -index d937e5f..a867799 100644 +index d937e5f..a363c06 100644 --- a/device.h +++ b/device.h @@ -163,7 +163,6 @@ private: @@ -304,7 +316,18 @@ index d937e5f..a867799 100644 int DeviceNumber(void) const; ///< Returns the number of this device (0 ... numDevices). virtual bool HasDecoder(void) const; -@@ -378,9 +374,6 @@ public: +@@ -247,6 +243,10 @@ public: + ///< function itself actually returns true. + ///< The default implementation always returns false, so a derived cDevice + ///< class that can provide channels must implement this function. ++ virtual bool ProvidesEIT(void) const; ++ ///< Returns true if this device provides EIT data and thus wants to be tuned ++ ///< to the channels it can receive regularly to update the data. ++ ///< The default implementation returns false. + virtual int NumProvidedSystems(void) const; + ///< Returns the number of individual "delivery systems" this device provides. + ///< The default implementation returns 0, so any derived class that can +@@ -378,9 +378,6 @@ public: ///< Returns true if this device has a Common Interface. void SetCamSlot(cCamSlot *CamSlot); ///< Sets the given CamSlot to be used with this device. @@ -314,7 +337,7 @@ index d937e5f..a867799 100644 // Image Grab facilities -@@ -536,9 +529,6 @@ private: +@@ -536,9 +533,6 @@ private: cTsToPes tsToPesSubtitle; bool isPlayingVideo; protected: @@ -324,7 +347,7 @@ index d937e5f..a867799 100644 virtual bool CanReplay(void) const; ///< Returns true if this device can currently start a replay session. virtual bool SetPlayMode(ePlayMode PlayMode); -@@ -724,6 +714,39 @@ public: +@@ -724,6 +718,38 @@ public: ///< Detaches all receivers from this device for this pid. void DetachAllReceivers(void); ///< Detaches all receivers from this device. @@ -359,12 +382,11 @@ index d937e5f..a867799 100644 + ///< Called by SetIdle + ///< if TestOnly, don't do anything, just return, if the device + ///< can be set to the new idle state -+ virtual bool CanScanForEPG(void) const { return !IsIdle(); } + // --- dynamite subdevice patch end --- }; /// Derived cDevice classes that can receive channels will have to provide -@@ -747,4 +770,47 @@ public: +@@ -747,4 +773,47 @@ public: uchar *Get(void); }; @@ -554,7 +576,7 @@ index adbe40d..6d117b2 100644 #endif //__DVBCI_H diff --git a/dvbdevice.c b/dvbdevice.c -index b0750dd..65fc33b 100644 +index b0750dd..7ad6ccc 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -272,23 +272,31 @@ private: @@ -750,7 +772,7 @@ index b0750dd..65fc33b 100644 } } else -@@ -940,6 +998,31 @@ bool cDvbDevice::Ready(void) +@@ -940,6 +998,26 @@ bool cDvbDevice::Ready(void) return true; } @@ -774,16 +796,23 @@ index b0750dd..65fc33b 100644 + return true; +} + -+bool cDvbDevice::CanScanForEPG(void) const + bool cDvbDevice::HasCi(void) + { + return ciAdapter; +@@ -1081,6 +1159,11 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne + return result; + } + ++bool cDvbDevice::ProvidesEIT(void) const +{ -+ return !IsIdle() && !dvbTuner->IsIdle() && ((ciAdapter == NULL) || !ciAdapter->IsIdle()); ++ return !IsIdle() && (dvbTuner != NULL) && !dvbTuner->IsIdle() && ((ciAdapter == NULL) || !ciAdapter->IsIdle()); +} + - bool cDvbDevice::HasCi(void) + int cDvbDevice::NumProvidedSystems(void) const { - return ciAdapter; + return numProvidedSystems; diff --git a/dvbdevice.h b/dvbdevice.h -index 0962548..1708969 100644 +index 0962548..8015a89 100644 --- a/dvbdevice.h +++ b/dvbdevice.h @@ -102,7 +102,7 @@ class cDvbTuner; @@ -795,7 +824,7 @@ index 0962548..1708969 100644 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); private: -@@ -123,10 +123,13 @@ private: +@@ -123,10 +123,12 @@ private: fe_delivery_system frontendType; int fd_dvr, fd_ca; public: @@ -805,13 +834,20 @@ index 0962548..1708969 100644 virtual bool Ready(void); + virtual bool SetIdleDevice(bool Idle, bool TestOnly); -+ virtual bool CanScanForEPG(void) const; + // Common Interface facilities: private: +@@ -140,6 +142,7 @@ public: + virtual bool ProvidesSource(int Source) const; + virtual bool ProvidesTransponder(const cChannel *Channel) const; + virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const; ++ virtual bool ProvidesEIT(void) const; + virtual int NumProvidedSystems(void) const; + virtual int SignalStrength(void) const; + virtual int SignalQuality(void) const; diff --git a/eitscan.c b/eitscan.c -index 25b7115..c796432 100644 +index 25b7115..5526ddc 100644 --- a/eitscan.c +++ b/eitscan.c @@ -143,7 +143,7 @@ void cEITScanner::Process(void) @@ -819,7 +855,7 @@ index 25b7115..c796432 100644 for (int i = 0; i < cDevice::NumDevices(); i++) { cDevice *Device = cDevice::GetDevice(i); - if (Device) { -+ if (Device && Device->CanScanForEPG()) { ++ if (Device && Device->ProvidesEIT()) { for (cScanData *ScanData = scanList->First(); ScanData; ScanData = scanList->Next(ScanData)) { const cChannel *Channel = ScanData->GetChannel(); if (Channel) { |