diff options
-rw-r--r-- | device.c | 16 | ||||
-rw-r--r-- | device.h | 6 |
2 files changed, 9 insertions, 13 deletions
@@ -355,7 +355,7 @@ bool cMcliDevice::ProvidesTransponder (const cChannel * Channel) const return ret; } -bool cMcliDevice::IsTunedToTransponderConst (const cChannel * Channel) const +bool cMcliDevice::IsTunedToTransponder(const cChannel * Channel) const { // printf ("IsTunedToTransponder %s == %s \n", Channel->Name (), m_chan.Name ()); if (!m_enable || !m_tuned) { @@ -382,10 +382,6 @@ bool cMcliDevice::IsTunedToTransponderConst (const cChannel * Channel) const return false; } -bool cMcliDevice::IsTunedToTransponder (const cChannel * Channel) -{ - return IsTunedToTransponderConst(Channel); -} bool cMcliDevice::CheckCAM(const cChannel * Channel, bool steal) const { @@ -426,7 +422,7 @@ bool cMcliDevice::ProvidesChannel (const cChannel * Channel, int Priority, bool result = hasPriority; if (Priority >= 0 && Receiving (true)) { - if (!IsTunedToTransponderConst(Channel)) { + if (!IsTunedToTransponder(Channel)) { needsDetachReceivers = true; } else { result = true; @@ -729,16 +725,16 @@ bool cMcliDevice::SetChannelDevice (const cChannel * Channel, bool LiveView) return true; } -bool cMcliDevice::HasLock (int TimeoutMs) +bool cMcliDevice::HasLock (int TimeoutMs) const { -// printf ("HasLock TimeoutMs:%d\n", TimeoutMs); + dbg ("HasLock TimeoutMs:%d\n", TimeoutMs); if ((m_ten.s.st & FE_HAS_LOCK) || !TimeoutMs) { return m_ten.s.st & FE_HAS_LOCK; } - cMutexLock MutexLock (&mutex); + cMutexLock MutexLock ((cMutex*)&mutex); // ugly hack to lock a mutex in a const member if (TimeoutMs && !(m_ten.s.st & FE_HAS_LOCK)) { - m_locked.TimedWait (mutex, TimeoutMs); + ((cCondVar&)m_locked).TimedWait ((cMutex&)mutex, TimeoutMs); // ugly hack to lock a mutex in a const member } if (m_ten.s.st & FE_HAS_LOCK) { return true; @@ -48,7 +48,8 @@ class cMcliDevice:public cDevice protected: cPluginMcli *m_mcli; virtual bool SetChannelDevice (const cChannel * Channel, bool LiveView); - virtual bool HasLock (int TimeoutMs); + virtual bool HasLock(int TimeoutMs = 0) const; + virtual bool SetPid (cPidHandle * Handle, int Type, bool On); virtual bool OpenDvr (void); virtual void CloseDvr (void); @@ -61,7 +62,6 @@ class cMcliDevice:public cDevice #ifdef GET_TS_PACKETS virtual int GetTSPackets (uchar *, int); #endif - bool IsTunedToTransponderConst (const cChannel * Channel) const; void TranslateTypePos(int &type, int &pos, const int Source) const; @@ -106,7 +106,7 @@ class cMcliDevice:public cDevice 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 IsTunedToTransponder (const cChannel * Channel); + virtual bool IsTunedToTransponder (const cChannel * Channel) const; virtual int HandleTsData (unsigned char *buffer, size_t len); tra_t *GetTenData (void) { |